@corti/sdk 1.0.0-alpha.2 → 1.0.0-rc-8
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/README.md +1 -1
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/codes/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/codes/client/Client.js +1 -1
- package/dist/cjs/api/resources/stream/client/Socket.d.ts +1 -1
- package/dist/cjs/api/resources/transcribe/client/Socket.d.ts +1 -1
- package/dist/cjs/api/types/AgentsAgentCard.d.ts +2 -2
- package/dist/cjs/api/types/AgentsErrorResponse.d.ts +2 -2
- package/dist/cjs/api/types/CodesGeneralResponse.d.ts +1 -1
- package/dist/cjs/api/types/CommonCodingSystemEnum.d.ts +9 -0
- package/dist/cjs/api/types/CommonCodingSystemEnum.js +9 -0
- package/dist/cjs/api/types/StreamConfig.d.ts +2 -0
- package/dist/cjs/api/types/StreamConfigStatusMessageType.d.ts +0 -1
- package/dist/cjs/api/types/StreamConfigStatusMessageType.js +0 -1
- package/dist/cjs/api/types/StreamConfigXCortiRetentionPolicy.d.ts +6 -0
- package/dist/cjs/api/types/StreamConfigXCortiRetentionPolicy.js +9 -0
- package/dist/cjs/api/types/StreamDeltaUsageMessage.d.ts +5 -0
- package/dist/cjs/api/types/StreamDeltaUsageMessage.js +3 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessageType.d.ts +2 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessageType.js +2 -0
- package/dist/cjs/api/types/TranscribeDeltaUsageMessage.d.ts +5 -0
- package/dist/cjs/api/types/TranscribeDeltaUsageMessage.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/custom/CortiClient.d.ts +25 -69
- package/dist/cjs/custom/CortiClient.js +70 -1
- package/dist/cjs/custom/agents/CustomAgents.d.ts +20 -0
- package/dist/cjs/custom/agents/CustomAgents.js +73 -0
- package/dist/cjs/custom/auth/CortiAuth.d.ts +27 -0
- package/dist/cjs/custom/auth/CortiAuth.js +10 -4
- package/dist/cjs/custom/auth/OAuthAuthCodeAuthProvider.js +1 -1
- package/dist/cjs/custom/auth/OAuthPkceAuthProvider.js +1 -1
- package/dist/cjs/custom/auth/OAuthRopcAuthProvider.js +1 -1
- package/dist/cjs/custom/overrides/OAuthAuthProvider.js +1 -1
- package/dist/cjs/custom/overrides/fetcher/index.d.ts +2 -2
- package/dist/cjs/custom/overrides/fetcher/index.js +4 -4
- package/dist/cjs/custom/overrides/index.d.ts +5 -5
- package/dist/cjs/custom/overrides/index.js +7 -7
- package/dist/cjs/custom/proxy/CustomProxyStream.d.ts +1 -1
- package/dist/cjs/custom/proxy/CustomProxyTranscribe.d.ts +1 -1
- package/dist/cjs/custom/stream/CustomStream.d.ts +2 -2
- package/dist/cjs/custom/stream/CustomStream.js +9 -7
- package/dist/cjs/custom/transcribe/CustomTranscribe.d.ts +2 -2
- package/dist/cjs/custom/transcribe/CustomTranscribe.js +10 -6
- package/dist/cjs/custom/utils/encodeHeadersAsWsProtocols.js +2 -11
- package/dist/cjs/custom/utils/index.d.ts +2 -2
- package/dist/cjs/custom/utils/index.js +3 -3
- package/dist/cjs/custom/utils/sdkHeaderNames.d.ts +1 -0
- package/dist/cjs/custom/utils/sdkHeaderNames.js +12 -0
- package/dist/cjs/custom/utils/stripFernNormalizedHeaders.d.ts +5 -0
- package/dist/cjs/custom/utils/stripFernNormalizedHeaders.js +27 -0
- package/dist/cjs/custom/utils/withCredentialsConfig.js +1 -1
- package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.d.ts +3 -2
- package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.js +2 -0
- package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.ts +3 -2
- package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.js +2 -0
- package/dist/cjs/serialization/types/AgentsAgentCard.d.ts +2 -2
- package/dist/cjs/serialization/types/AgentsAgentCard.js +2 -2
- package/dist/cjs/serialization/types/AgentsErrorResponse.d.ts +2 -2
- package/dist/cjs/serialization/types/AgentsErrorResponse.js +1 -2
- package/dist/cjs/serialization/types/AgentsValidationErrorResponse.d.ts +3 -2
- package/dist/cjs/serialization/types/AgentsValidationErrorResponse.js +2 -2
- package/dist/cjs/serialization/types/CodesGeneralResponse.d.ts +1 -1
- package/dist/cjs/serialization/types/CodesGeneralResponse.js +1 -1
- package/dist/cjs/serialization/types/CommonCodingSystemEnum.d.ts +1 -1
- package/dist/cjs/serialization/types/CommonCodingSystemEnum.js +15 -1
- package/dist/cjs/serialization/types/StreamConfig.d.ts +2 -0
- package/dist/cjs/serialization/types/StreamConfig.js +2 -0
- package/dist/cjs/serialization/types/StreamConfigStatusMessageType.d.ts +1 -1
- package/dist/cjs/serialization/types/StreamConfigStatusMessageType.js +0 -1
- package/dist/cjs/serialization/types/StreamConfigXCortiRetentionPolicy.d.ts +7 -0
- package/dist/cjs/serialization/types/StreamConfigXCortiRetentionPolicy.js +39 -0
- package/dist/cjs/serialization/types/StreamDeltaUsageMessage.d.ts +10 -0
- package/dist/cjs/serialization/types/StreamDeltaUsageMessage.js +42 -0
- package/dist/cjs/serialization/types/TranscribeConfigStatusMessageType.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeConfigStatusMessageType.js +7 -1
- package/dist/cjs/serialization/types/TranscribeDeltaUsageMessage.d.ts +10 -0
- package/dist/cjs/serialization/types/TranscribeDeltaUsageMessage.js +42 -0
- package/dist/cjs/serialization/types/index.d.ts +3 -0
- package/dist/cjs/serialization/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/codes/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/codes/client/Client.mjs +1 -1
- package/dist/esm/api/resources/stream/client/Socket.d.mts +1 -1
- package/dist/esm/api/resources/transcribe/client/Socket.d.mts +1 -1
- package/dist/esm/api/types/AgentsAgentCard.d.mts +2 -2
- package/dist/esm/api/types/AgentsErrorResponse.d.mts +2 -2
- package/dist/esm/api/types/CodesGeneralResponse.d.mts +1 -1
- package/dist/esm/api/types/CommonCodingSystemEnum.d.mts +9 -0
- package/dist/esm/api/types/CommonCodingSystemEnum.mjs +9 -0
- package/dist/esm/api/types/StreamConfig.d.mts +2 -0
- package/dist/esm/api/types/StreamConfigStatusMessageType.d.mts +0 -1
- package/dist/esm/api/types/StreamConfigStatusMessageType.mjs +0 -1
- package/dist/esm/api/types/StreamConfigXCortiRetentionPolicy.d.mts +6 -0
- package/dist/esm/api/types/StreamConfigXCortiRetentionPolicy.mjs +6 -0
- package/dist/esm/api/types/StreamDeltaUsageMessage.d.mts +5 -0
- package/dist/esm/api/types/StreamDeltaUsageMessage.mjs +2 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessageType.d.mts +2 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessageType.mjs +2 -0
- package/dist/esm/api/types/TranscribeDeltaUsageMessage.d.mts +5 -0
- package/dist/esm/api/types/TranscribeDeltaUsageMessage.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/custom/CortiClient.d.mts +25 -69
- package/dist/esm/custom/CortiClient.mjs +37 -1
- package/dist/esm/custom/agents/CustomAgents.d.mts +20 -0
- package/dist/esm/custom/agents/CustomAgents.mjs +36 -0
- package/dist/esm/custom/auth/CortiAuth.d.mts +27 -0
- package/dist/esm/custom/auth/CortiAuth.mjs +10 -4
- package/dist/esm/custom/auth/OAuthAuthCodeAuthProvider.mjs +1 -1
- package/dist/esm/custom/auth/OAuthPkceAuthProvider.mjs +1 -1
- package/dist/esm/custom/auth/OAuthRopcAuthProvider.mjs +1 -1
- package/dist/esm/custom/overrides/OAuthAuthProvider.mjs +1 -1
- package/dist/esm/custom/overrides/fetcher/index.d.mts +2 -2
- package/dist/esm/custom/overrides/fetcher/index.mjs +2 -2
- package/dist/esm/custom/overrides/index.d.mts +5 -5
- package/dist/esm/custom/overrides/index.mjs +3 -5
- package/dist/esm/custom/proxy/CustomProxyStream.d.mts +1 -1
- package/dist/esm/custom/proxy/CustomProxyStream.mjs +0 -1
- package/dist/esm/custom/proxy/CustomProxyTranscribe.d.mts +1 -1
- package/dist/esm/custom/proxy/CustomProxyTranscribe.mjs +0 -1
- package/dist/esm/custom/stream/CustomStream.d.mts +2 -2
- package/dist/esm/custom/stream/CustomStream.mjs +9 -7
- package/dist/esm/custom/transcribe/CustomTranscribe.d.mts +2 -2
- package/dist/esm/custom/transcribe/CustomTranscribe.mjs +10 -6
- package/dist/esm/custom/utils/encodeHeadersAsWsProtocols.mjs +1 -10
- package/dist/esm/custom/utils/index.d.mts +2 -2
- package/dist/esm/custom/utils/index.mjs +1 -1
- package/dist/esm/custom/utils/sdkHeaderNames.d.mts +1 -0
- package/dist/esm/custom/utils/sdkHeaderNames.mjs +9 -0
- package/dist/esm/custom/utils/stripFernNormalizedHeaders.d.mts +5 -0
- package/dist/esm/custom/utils/stripFernNormalizedHeaders.mjs +24 -0
- package/dist/esm/custom/utils/withCredentialsConfig.mjs +1 -1
- package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.d.mts +3 -2
- package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.mjs +2 -0
- package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.mts +3 -2
- package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.mjs +2 -0
- package/dist/esm/serialization/types/AgentsAgentCard.d.mts +2 -2
- package/dist/esm/serialization/types/AgentsAgentCard.mjs +2 -2
- package/dist/esm/serialization/types/AgentsErrorResponse.d.mts +2 -2
- package/dist/esm/serialization/types/AgentsErrorResponse.mjs +1 -2
- package/dist/esm/serialization/types/AgentsValidationErrorResponse.d.mts +3 -2
- package/dist/esm/serialization/types/AgentsValidationErrorResponse.mjs +2 -2
- package/dist/esm/serialization/types/CodesGeneralResponse.d.mts +1 -1
- package/dist/esm/serialization/types/CodesGeneralResponse.mjs +1 -1
- package/dist/esm/serialization/types/CommonCodingSystemEnum.d.mts +1 -1
- package/dist/esm/serialization/types/CommonCodingSystemEnum.mjs +15 -1
- package/dist/esm/serialization/types/StreamConfig.d.mts +2 -0
- package/dist/esm/serialization/types/StreamConfig.mjs +2 -0
- package/dist/esm/serialization/types/StreamConfigStatusMessageType.d.mts +1 -1
- package/dist/esm/serialization/types/StreamConfigStatusMessageType.mjs +0 -1
- package/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.d.mts +7 -0
- package/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.mjs +3 -0
- package/dist/esm/serialization/types/StreamDeltaUsageMessage.d.mts +10 -0
- package/dist/esm/serialization/types/StreamDeltaUsageMessage.mjs +6 -0
- package/dist/esm/serialization/types/TranscribeConfigStatusMessageType.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeConfigStatusMessageType.mjs +7 -1
- package/dist/esm/serialization/types/TranscribeDeltaUsageMessage.d.mts +10 -0
- package/dist/esm/serialization/types/TranscribeDeltaUsageMessage.mjs +6 -0
- package/dist/esm/serialization/types/index.d.mts +3 -0
- package/dist/esm/serialization/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +3 -2
|
@@ -61,13 +61,19 @@ const buildTokenRequestBody_js_1 = require("../utils/buildTokenRequestBody.js");
|
|
|
61
61
|
const environment_js_1 = require("../utils/environment.js");
|
|
62
62
|
const localStorageHelpers_js_1 = require("../utils/localStorageHelpers.js");
|
|
63
63
|
const pkceHelpers_js_1 = require("../utils/pkceHelpers.js");
|
|
64
|
+
const stripFernNormalizedHeaders_js_1 = require("../utils/stripFernNormalizedHeaders.js");
|
|
64
65
|
class CortiAuth extends Client_js_1.AuthClient {
|
|
65
66
|
/** No-op auth provider so super.token() does not trigger OAuth refresh. When auth is omitted, a dummy token is passed so the base constructor does not throw. */
|
|
66
67
|
constructor(options) {
|
|
67
68
|
var _a;
|
|
68
|
-
const { environment } = options, rest = __rest(options, ["environment"]);
|
|
69
|
-
super(Object.assign(Object.assign({}, rest), {
|
|
69
|
+
const { environment, tenantName } = options, rest = __rest(options, ["environment", "tenantName"]);
|
|
70
|
+
super(Object.assign(Object.assign({}, rest), {
|
|
71
|
+
// @ts-expect-error it suppose to be required, but we need to filter out header without rewriting too much
|
|
72
|
+
tenantName: null, environment: (0, environment_js_1.getEnvironment)(environment), token: (_a = options.token) !== null && _a !== void 0 ? _a : (() => "") }));
|
|
73
|
+
this._tenantName = tenantName;
|
|
70
74
|
this._options.authProvider = new core.NoOpAuthProvider();
|
|
75
|
+
/** Stripping Fern headers to bypass CORS on authentication requests */
|
|
76
|
+
this._options.headers = (0, stripFernNormalizedHeaders_js_1.stripFernNormalizedHeaders)(this._options.headers);
|
|
71
77
|
}
|
|
72
78
|
/**
|
|
73
79
|
* Exchange credentials for a short-lived access token using the tenant token endpoint (client_credentials).
|
|
@@ -92,7 +98,7 @@ class CortiAuth extends Client_js_1.AuthClient {
|
|
|
92
98
|
_getTokenWithTenant(request, requestOptions) {
|
|
93
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
100
|
const authRequest = (0, buildTokenRequestBody_js_1.buildTokenRequestBody)(request);
|
|
95
|
-
const tenantName = yield core.Supplier.get(this.
|
|
101
|
+
const tenantName = yield core.Supplier.get(this._tenantName);
|
|
96
102
|
return this.token(tenantName, authRequest, requestOptions).withRawResponse();
|
|
97
103
|
});
|
|
98
104
|
}
|
|
@@ -168,7 +174,7 @@ class CortiAuth extends Client_js_1.AuthClient {
|
|
|
168
174
|
authorizeURL(_a, options_1) {
|
|
169
175
|
return __awaiter(this, arguments, void 0, function* ({ clientId, redirectUri, codeChallenge, scopes }, options) {
|
|
170
176
|
const envUrls = yield core.Supplier.get(this._options.environment);
|
|
171
|
-
const tenantName = yield core.Supplier.get(this.
|
|
177
|
+
const tenantName = yield core.Supplier.get(this._tenantName);
|
|
172
178
|
const authUrl = new URL(core.url.join(envUrls.login, tenantName, "protocol/openid-connect/auth"));
|
|
173
179
|
authUrl.searchParams.set("response_type", "code");
|
|
174
180
|
const allScopes = ["openid", "profile", ...(scopes !== null && scopes !== void 0 ? scopes : [])];
|
|
@@ -45,8 +45,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
exports.OAuthAuthCodeAuthProvider = void 0;
|
|
46
46
|
const core = __importStar(require("../../core/index.js"));
|
|
47
47
|
const errors = __importStar(require("../../errors/index.js"));
|
|
48
|
-
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
49
48
|
const oauthAuthHelpers_js_1 = require("../utils/oauthAuthHelpers.js");
|
|
49
|
+
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
50
50
|
class OAuthAuthCodeAuthProvider {
|
|
51
51
|
constructor(options) {
|
|
52
52
|
this.options = options;
|
|
@@ -45,8 +45,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
exports.OAuthPkceAuthProvider = void 0;
|
|
46
46
|
const core = __importStar(require("../../core/index.js"));
|
|
47
47
|
const errors = __importStar(require("../../errors/index.js"));
|
|
48
|
-
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
49
48
|
const oauthAuthHelpers_js_1 = require("../utils/oauthAuthHelpers.js");
|
|
49
|
+
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
50
50
|
class OAuthPkceAuthProvider {
|
|
51
51
|
constructor(options) {
|
|
52
52
|
this.options = options;
|
|
@@ -45,8 +45,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
exports.OAuthRopcAuthProvider = void 0;
|
|
46
46
|
const core = __importStar(require("../../core/index.js"));
|
|
47
47
|
const errors = __importStar(require("../../errors/index.js"));
|
|
48
|
-
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
49
48
|
const oauthAuthHelpers_js_1 = require("../utils/oauthAuthHelpers.js");
|
|
49
|
+
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
50
50
|
class OAuthRopcAuthProvider {
|
|
51
51
|
constructor(options) {
|
|
52
52
|
this.options = options;
|
|
@@ -44,12 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.OAuthTokenOverrideAuthProvider = exports.OAuthAuthProvider = exports.USERNAME_REQUIRED_ERROR_MESSAGE = exports.USERNAME_PARAM = exports.REDIRECT_URI_PARAM = exports.PASSWORD_REQUIRED_ERROR_MESSAGE = exports.PASSWORD_PARAM = exports.getExpiresAt = exports.CODE_VERIFIER_PARAM = exports.CODE_PARAM = exports.CLIENT_SECRET_REQUIRED_ERROR_MESSAGE = exports.CLIENT_SECRET_PARAM = exports.CLIENT_ID_REQUIRED_ERROR_MESSAGE = exports.CLIENT_ID_PARAM = exports.BUFFER_IN_MINUTES = void 0;
|
|
46
46
|
const core = __importStar(require("../../core/index.js"));
|
|
47
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
47
48
|
const CortiAuth_js_1 = require("../auth/CortiAuth.js");
|
|
48
49
|
const OAuthAuthCodeAuthProvider_js_1 = require("../auth/OAuthAuthCodeAuthProvider.js");
|
|
49
50
|
const OAuthPkceAuthProvider_js_1 = require("../auth/OAuthPkceAuthProvider.js");
|
|
50
51
|
const OAuthRopcAuthProvider_js_1 = require("../auth/OAuthRopcAuthProvider.js");
|
|
51
52
|
const oauthAuthHelpers_js_1 = require("../utils/oauthAuthHelpers.js");
|
|
52
|
-
const errors = __importStar(require("../../errors/index.js"));
|
|
53
53
|
/** Patch: Re-export for consumers; implementation shared with OAuthRopcAuthProvider, OAuthAuthCodeAuthProvider and OAuthPkceAuthProvider. */
|
|
54
54
|
var oauthAuthHelpers_js_2 = require("../utils/oauthAuthHelpers.js");
|
|
55
55
|
Object.defineProperty(exports, "BUFFER_IN_MINUTES", { enumerable: true, get: function () { return oauthAuthHelpers_js_2.BUFFER_IN_MINUTES; } });
|
|
@@ -3,10 +3,10 @@ export type { BinaryResponse } from "../../../core/fetcher/BinaryResponse.js";
|
|
|
3
3
|
export type { EndpointMetadata } from "../../../core/fetcher/EndpointMetadata.js";
|
|
4
4
|
export { EndpointSupplier } from "../../../core/fetcher/EndpointSupplier.js";
|
|
5
5
|
export type { Fetcher, FetchFunction } from "../../../core/fetcher/Fetcher.js";
|
|
6
|
-
/** Patch: withCredentials - re-export custom fetcher that injects global withCredentials default */
|
|
7
|
-
export { fetcher } from "../../fetcher.js";
|
|
8
6
|
export { getHeader } from "../../../core/fetcher/getHeader.js";
|
|
9
7
|
export { HttpResponsePromise } from "../../../core/fetcher/HttpResponsePromise.js";
|
|
10
8
|
export type { RawResponse, WithRawResponse } from "../../../core/fetcher/RawResponse.js";
|
|
11
9
|
export { abortRawResponse, toRawResponse, unknownRawResponse } from "../../../core/fetcher/RawResponse.js";
|
|
12
10
|
export { Supplier } from "../../../core/fetcher/Supplier.js";
|
|
11
|
+
/** Patch: withCredentials - re-export custom fetcher that injects global withCredentials default */
|
|
12
|
+
export { fetcher } from "../../fetcher.js";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Supplier = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.HttpResponsePromise = exports.getHeader = exports.
|
|
3
|
+
exports.fetcher = exports.Supplier = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.HttpResponsePromise = exports.getHeader = exports.EndpointSupplier = void 0;
|
|
4
4
|
var EndpointSupplier_js_1 = require("../../../core/fetcher/EndpointSupplier.js");
|
|
5
5
|
Object.defineProperty(exports, "EndpointSupplier", { enumerable: true, get: function () { return EndpointSupplier_js_1.EndpointSupplier; } });
|
|
6
|
-
/** Patch: withCredentials - re-export custom fetcher that injects global withCredentials default */
|
|
7
|
-
var fetcher_js_1 = require("../../fetcher.js");
|
|
8
|
-
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return fetcher_js_1.fetcher; } });
|
|
9
6
|
var getHeader_js_1 = require("../../../core/fetcher/getHeader.js");
|
|
10
7
|
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_js_1.getHeader; } });
|
|
11
8
|
var HttpResponsePromise_js_1 = require("../../../core/fetcher/HttpResponsePromise.js");
|
|
@@ -16,3 +13,6 @@ Object.defineProperty(exports, "toRawResponse", { enumerable: true, get: functio
|
|
|
16
13
|
Object.defineProperty(exports, "unknownRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.unknownRawResponse; } });
|
|
17
14
|
var Supplier_js_1 = require("../../../core/fetcher/Supplier.js");
|
|
18
15
|
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_js_1.Supplier; } });
|
|
16
|
+
/** Patch: withCredentials - re-export custom fetcher that injects global withCredentials default */
|
|
17
|
+
var fetcher_js_1 = require("../../fetcher.js");
|
|
18
|
+
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return fetcher_js_1.fetcher; } });
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * as Corti from "../../api/index.js";
|
|
2
2
|
export type { BaseClientOptions, BaseRequestOptions } from "../../BaseClient.js";
|
|
3
|
+
export { JsonError } from "../../core/schemas/builders/schema-utils/JsonError.js";
|
|
4
|
+
export { ParseError } from "../../core/schemas/builders/schema-utils/ParseError.js";
|
|
3
5
|
export { CortiEnvironment, type CortiEnvironmentUrls } from "../../environments.js";
|
|
4
6
|
export { CortiError, CortiTimeoutError } from "../../errors/index.js";
|
|
5
7
|
export * from "../../exports.js";
|
|
6
8
|
export * as serialization from "../../serialization/index.js";
|
|
7
9
|
export { CortiAuth } from "../auth/CortiAuth.js";
|
|
8
10
|
export { CortiClient } from "../CortiClient.js";
|
|
9
|
-
export { CortiWebSocketProxyClient } from "../CortiWebSocketProxyClient.js";
|
|
10
|
-
export { type ProxyOptions } from "../utils/encodeHeadersAsWsProtocols.js";
|
|
11
|
-
export { type CortiInternalEnvironment, type Environment } from "../utils/environment.js";
|
|
12
11
|
export { CortiSDKError, CortiSDKErrorCodes } from "../CortiSDKError.js";
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
12
|
+
export { CortiWebSocketProxyClient } from "../CortiWebSocketProxyClient.js";
|
|
13
|
+
export type { ProxyOptions } from "../utils/encodeHeadersAsWsProtocols.js";
|
|
14
|
+
export type { CortiInternalEnvironment, Environment } from "../utils/environment.js";
|
|
@@ -36,8 +36,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.CortiWebSocketProxyClient = exports.CortiSDKErrorCodes = exports.CortiSDKError = exports.CortiClient = exports.CortiAuth = exports.serialization = exports.CortiTimeoutError = exports.CortiError = exports.CortiEnvironment = exports.ParseError = exports.JsonError = exports.Corti = void 0;
|
|
40
40
|
exports.Corti = __importStar(require("../../api/index.js"));
|
|
41
|
+
var JsonError_js_1 = require("../../core/schemas/builders/schema-utils/JsonError.js");
|
|
42
|
+
Object.defineProperty(exports, "JsonError", { enumerable: true, get: function () { return JsonError_js_1.JsonError; } });
|
|
43
|
+
var ParseError_js_1 = require("../../core/schemas/builders/schema-utils/ParseError.js");
|
|
44
|
+
Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return ParseError_js_1.ParseError; } });
|
|
41
45
|
var environments_js_1 = require("../../environments.js");
|
|
42
46
|
Object.defineProperty(exports, "CortiEnvironment", { enumerable: true, get: function () { return environments_js_1.CortiEnvironment; } });
|
|
43
47
|
var index_js_1 = require("../../errors/index.js");
|
|
@@ -50,12 +54,8 @@ var CortiAuth_js_1 = require("../auth/CortiAuth.js");
|
|
|
50
54
|
Object.defineProperty(exports, "CortiAuth", { enumerable: true, get: function () { return CortiAuth_js_1.CortiAuth; } });
|
|
51
55
|
var CortiClient_js_1 = require("../CortiClient.js");
|
|
52
56
|
Object.defineProperty(exports, "CortiClient", { enumerable: true, get: function () { return CortiClient_js_1.CortiClient; } });
|
|
53
|
-
var CortiWebSocketProxyClient_js_1 = require("../CortiWebSocketProxyClient.js");
|
|
54
|
-
Object.defineProperty(exports, "CortiWebSocketProxyClient", { enumerable: true, get: function () { return CortiWebSocketProxyClient_js_1.CortiWebSocketProxyClient; } });
|
|
55
57
|
var CortiSDKError_js_1 = require("../CortiSDKError.js");
|
|
56
58
|
Object.defineProperty(exports, "CortiSDKError", { enumerable: true, get: function () { return CortiSDKError_js_1.CortiSDKError; } });
|
|
57
59
|
Object.defineProperty(exports, "CortiSDKErrorCodes", { enumerable: true, get: function () { return CortiSDKError_js_1.CortiSDKErrorCodes; } });
|
|
58
|
-
var
|
|
59
|
-
Object.defineProperty(exports, "
|
|
60
|
-
var JsonError_js_1 = require("../../core/schemas/builders/schema-utils/JsonError.js");
|
|
61
|
-
Object.defineProperty(exports, "JsonError", { enumerable: true, get: function () { return JsonError_js_1.JsonError; } });
|
|
60
|
+
var CortiWebSocketProxyClient_js_1 = require("../CortiWebSocketProxyClient.js");
|
|
61
|
+
Object.defineProperty(exports, "CortiWebSocketProxyClient", { enumerable: true, get: function () { return CortiWebSocketProxyClient_js_1.CortiWebSocketProxyClient; } });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StreamClient } from "../../api/resources/stream/client/Client.js";
|
|
2
|
-
import { CustomStreamSocket } from "./CustomStreamSocket.js";
|
|
3
1
|
import * as Corti from "../../api/index.js";
|
|
2
|
+
import { StreamClient } from "../../api/resources/stream/client/Client.js";
|
|
4
3
|
import { type ProxyOptions } from "../utils/encodeHeadersAsWsProtocols.js";
|
|
4
|
+
import { CustomStreamSocket } from "./CustomStreamSocket.js";
|
|
5
5
|
export type CustomStreamConnectArgs = {
|
|
6
6
|
id: string;
|
|
7
7
|
/** When provided, connect() resolves after CONFIG_ACCEPTED or rejects on failure. */
|
|
@@ -54,17 +54,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
54
54
|
};
|
|
55
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
56
|
exports.CustomStream = void 0;
|
|
57
|
-
const Client_js_1 = require("../../api/resources/stream/client/Client.js");
|
|
58
|
-
const CustomStreamSocket_js_1 = require("./CustomStreamSocket.js");
|
|
59
57
|
const Corti = __importStar(require("../../api/index.js"));
|
|
60
|
-
const
|
|
61
|
-
const parseStreamResponseType_js_1 = require("./parseStreamResponseType.js");
|
|
58
|
+
const Client_js_1 = require("../../api/resources/stream/client/Client.js");
|
|
62
59
|
const core = __importStar(require("../../core/index.js"));
|
|
60
|
+
const events_js_1 = require("../../core/websocket/events.js");
|
|
63
61
|
const encodeHeadersAsWsProtocols_js_1 = require("../utils/encodeHeadersAsWsProtocols.js");
|
|
62
|
+
const CustomStreamSocket_js_1 = require("./CustomStreamSocket.js");
|
|
63
|
+
const parseStreamResponseType_js_1 = require("./parseStreamResponseType.js");
|
|
64
64
|
const STREAM_CONFIG_REJECTION_TYPES = [
|
|
65
65
|
Corti.StreamConfigStatusMessageType.ConfigDenied,
|
|
66
66
|
Corti.StreamConfigStatusMessageType.ConfigMissing,
|
|
67
|
-
Corti.StreamConfigStatusMessageType.ConfigTimeout,
|
|
68
67
|
Corti.StreamConfigStatusMessageType.ConfigNotProvided,
|
|
69
68
|
];
|
|
70
69
|
class CustomStream extends Client_js_1.StreamClient {
|
|
@@ -134,7 +133,9 @@ class CustomStream extends Client_js_1.StreamClient {
|
|
|
134
133
|
});
|
|
135
134
|
socket.socket.addEventListener("message", (event) => {
|
|
136
135
|
const type = (0, parseStreamResponseType_js_1.parseStreamResponseType)(event.data);
|
|
137
|
-
if (type == null ||
|
|
136
|
+
if (type == null ||
|
|
137
|
+
type === Corti.StreamConfigStatusMessageType.ConfigAccepted ||
|
|
138
|
+
type === Corti.StreamConfigStatusMessageType.ConfigAlreadyReceived) {
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
141
|
if (STREAM_CONFIG_REJECTION_TYPES.includes(type) || type === "error") {
|
|
@@ -162,7 +163,8 @@ class CustomStream extends Client_js_1.StreamClient {
|
|
|
162
163
|
const type = (0, parseStreamResponseType_js_1.parseStreamResponseType)(event.data);
|
|
163
164
|
if (type == null)
|
|
164
165
|
return;
|
|
165
|
-
if (type === Corti.StreamConfigStatusMessageType.ConfigAccepted
|
|
166
|
+
if (type === Corti.StreamConfigStatusMessageType.ConfigAccepted ||
|
|
167
|
+
type === Corti.StreamConfigStatusMessageType.ConfigAlreadyReceived) {
|
|
166
168
|
cleanup();
|
|
167
169
|
resolve();
|
|
168
170
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TranscribeClient } from "../../api/resources/transcribe/client/Client.js";
|
|
2
|
-
import { CustomTranscribeSocket } from "./CustomTranscribeSocket.js";
|
|
3
1
|
import * as Corti from "../../api/index.js";
|
|
2
|
+
import { TranscribeClient } from "../../api/resources/transcribe/client/Client.js";
|
|
4
3
|
import { type ProxyOptions } from "../utils/encodeHeadersAsWsProtocols.js";
|
|
4
|
+
import { CustomTranscribeSocket } from "./CustomTranscribeSocket.js";
|
|
5
5
|
export type CustomTranscribeConnectArgs = {
|
|
6
6
|
/** When provided, connect() resolves after CONFIG_ACCEPTED or rejects on failure. */
|
|
7
7
|
configuration?: Corti.TranscribeConfig;
|
|
@@ -54,16 +54,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
54
54
|
};
|
|
55
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
56
|
exports.CustomTranscribe = void 0;
|
|
57
|
-
const Client_js_1 = require("../../api/resources/transcribe/client/Client.js");
|
|
58
|
-
const CustomTranscribeSocket_js_1 = require("./CustomTranscribeSocket.js");
|
|
59
57
|
const Corti = __importStar(require("../../api/index.js"));
|
|
60
|
-
const
|
|
61
|
-
const parseTranscribeResponseType_js_1 = require("./parseTranscribeResponseType.js");
|
|
58
|
+
const Client_js_1 = require("../../api/resources/transcribe/client/Client.js");
|
|
62
59
|
const core = __importStar(require("../../core/index.js"));
|
|
60
|
+
const events_js_1 = require("../../core/websocket/events.js");
|
|
63
61
|
const encodeHeadersAsWsProtocols_js_1 = require("../utils/encodeHeadersAsWsProtocols.js");
|
|
62
|
+
const CustomTranscribeSocket_js_1 = require("./CustomTranscribeSocket.js");
|
|
63
|
+
const parseTranscribeResponseType_js_1 = require("./parseTranscribeResponseType.js");
|
|
64
64
|
const TRANSCRIBE_CONFIG_REJECTION_TYPES = [
|
|
65
65
|
Corti.TranscribeConfigStatusMessageType.ConfigDenied,
|
|
66
66
|
Corti.TranscribeConfigStatusMessageType.ConfigTimeout,
|
|
67
|
+
Corti.TranscribeConfigStatusMessageType.ConfigMissing,
|
|
67
68
|
];
|
|
68
69
|
class CustomTranscribe extends Client_js_1.TranscribeClient {
|
|
69
70
|
constructor(options) {
|
|
@@ -132,7 +133,9 @@ class CustomTranscribe extends Client_js_1.TranscribeClient {
|
|
|
132
133
|
});
|
|
133
134
|
socket.socket.addEventListener("message", (event) => {
|
|
134
135
|
const type = (0, parseTranscribeResponseType_js_1.parseTranscribeResponseType)(event.data);
|
|
135
|
-
if (type == null ||
|
|
136
|
+
if (type == null ||
|
|
137
|
+
type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted ||
|
|
138
|
+
type === Corti.TranscribeConfigStatusMessageType.ConfigAlreadyReceived) {
|
|
136
139
|
return;
|
|
137
140
|
}
|
|
138
141
|
if (TRANSCRIBE_CONFIG_REJECTION_TYPES.includes(type) || type === "error") {
|
|
@@ -160,7 +163,8 @@ class CustomTranscribe extends Client_js_1.TranscribeClient {
|
|
|
160
163
|
const type = (0, parseTranscribeResponseType_js_1.parseTranscribeResponseType)(event.data);
|
|
161
164
|
if (type == null)
|
|
162
165
|
return;
|
|
163
|
-
if (type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted
|
|
166
|
+
if (type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted ||
|
|
167
|
+
type === Corti.TranscribeConfigStatusMessageType.ConfigAlreadyReceived) {
|
|
164
168
|
cleanup();
|
|
165
169
|
resolve();
|
|
166
170
|
}
|
|
@@ -49,16 +49,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
49
49
|
exports.buildProtocolsFromHeaders = buildProtocolsFromHeaders;
|
|
50
50
|
exports.getWsProtocols = getWsProtocols;
|
|
51
51
|
const core = __importStar(require("../../core/index.js"));
|
|
52
|
-
|
|
53
|
-
const SDK_HEADER_NAMES = new Set([
|
|
54
|
-
"Tenant-Name",
|
|
55
|
-
"X-Fern-Language",
|
|
56
|
-
"X-Fern-SDK-Name",
|
|
57
|
-
"X-Fern-SDK-Version",
|
|
58
|
-
"User-Agent",
|
|
59
|
-
"X-Fern-Runtime",
|
|
60
|
-
"X-Fern-Runtime-Version",
|
|
61
|
-
]);
|
|
52
|
+
const sdkHeaderNames_js_1 = require("./sdkHeaderNames.js");
|
|
62
53
|
/**
|
|
63
54
|
* Resolves header values (including suppliers/functions) and returns a flat array
|
|
64
55
|
* of [name, encodeURIComponent(value)] for each header, skipping undefined/empty values.
|
|
@@ -71,7 +62,7 @@ function buildProtocolsFromHeaders(headers_1) {
|
|
|
71
62
|
}
|
|
72
63
|
const protocols = [];
|
|
73
64
|
for (const [name, valueOrSupplier] of Object.entries(headers)) {
|
|
74
|
-
if (filterSdkHeaders && SDK_HEADER_NAMES.has(name)) {
|
|
65
|
+
if (filterSdkHeaders && sdkHeaderNames_js_1.SDK_HEADER_NAMES.has(name)) {
|
|
75
66
|
continue;
|
|
76
67
|
}
|
|
77
68
|
const value = yield core.Supplier.get(valueOrSupplier);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { generateCodeChallenge, generateCodeVerifier } from "./pkceHelpers.js";
|
|
1
|
+
export { type DecodedToken, decodeToken } from "./decodeToken.js";
|
|
3
2
|
export { getEnvironment } from "./environment.js";
|
|
3
|
+
export { generateCodeChallenge, generateCodeVerifier } from "./pkceHelpers.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateCodeVerifier = exports.generateCodeChallenge = exports.getEnvironment = exports.decodeToken = void 0;
|
|
4
4
|
var decodeToken_js_1 = require("./decodeToken.js");
|
|
5
5
|
Object.defineProperty(exports, "decodeToken", { enumerable: true, get: function () { return decodeToken_js_1.decodeToken; } });
|
|
6
|
+
var environment_js_1 = require("./environment.js");
|
|
7
|
+
Object.defineProperty(exports, "getEnvironment", { enumerable: true, get: function () { return environment_js_1.getEnvironment; } });
|
|
6
8
|
var pkceHelpers_js_1 = require("./pkceHelpers.js");
|
|
7
9
|
Object.defineProperty(exports, "generateCodeChallenge", { enumerable: true, get: function () { return pkceHelpers_js_1.generateCodeChallenge; } });
|
|
8
10
|
Object.defineProperty(exports, "generateCodeVerifier", { enumerable: true, get: function () { return pkceHelpers_js_1.generateCodeVerifier; } });
|
|
9
|
-
var environment_js_1 = require("./environment.js");
|
|
10
|
-
Object.defineProperty(exports, "getEnvironment", { enumerable: true, get: function () { return environment_js_1.getEnvironment; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_HEADER_NAMES: ReadonlySet<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SDK_HEADER_NAMES = void 0;
|
|
4
|
+
exports.SDK_HEADER_NAMES = new Set([
|
|
5
|
+
"Tenant-Name",
|
|
6
|
+
"X-Fern-Language",
|
|
7
|
+
"X-Fern-SDK-Name",
|
|
8
|
+
"X-Fern-SDK-Version",
|
|
9
|
+
"User-Agent",
|
|
10
|
+
"X-Fern-Runtime",
|
|
11
|
+
"X-Fern-Runtime-Version",
|
|
12
|
+
]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BaseClientOptions } from "../../BaseClient.js";
|
|
2
|
+
type Headers = BaseClientOptions["headers"];
|
|
3
|
+
type HeaderValue = NonNullable<Headers>[string];
|
|
4
|
+
export declare function stripFernNormalizedHeaders(headers: Headers): Record<string, HeaderValue>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripFernNormalizedHeaders = stripFernNormalizedHeaders;
|
|
4
|
+
const sdkHeaderNames_js_1 = require("./sdkHeaderNames.js");
|
|
5
|
+
function normalizeHeaderKeys(headers) {
|
|
6
|
+
const result = {};
|
|
7
|
+
if (headers == null) {
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
11
|
+
const insensitiveKey = key.toLowerCase();
|
|
12
|
+
if (value != null) {
|
|
13
|
+
result[insensitiveKey] = value;
|
|
14
|
+
}
|
|
15
|
+
else if (insensitiveKey in result) {
|
|
16
|
+
delete result[insensitiveKey];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
function stripFernNormalizedHeaders(headers) {
|
|
22
|
+
const normalized = normalizeHeaderKeys(headers);
|
|
23
|
+
for (const headerName of sdkHeaderNames_js_1.SDK_HEADER_NAMES) {
|
|
24
|
+
delete normalized[headerName.toLowerCase()];
|
|
25
|
+
}
|
|
26
|
+
return normalized;
|
|
27
|
+
}
|
|
@@ -6,7 +6,7 @@ exports.setDefaultWithCredentials = setDefaultWithCredentials;
|
|
|
6
6
|
* Global default for fetcher withCredentials. Set by CortiClient when withCredentials
|
|
7
7
|
* is passed in options; the core fetcher reads this when args.withCredentials is undefined.
|
|
8
8
|
*/
|
|
9
|
-
let defaultWithCredentials
|
|
9
|
+
let defaultWithCredentials;
|
|
10
10
|
function getDefaultWithCredentials() {
|
|
11
11
|
return defaultWithCredentials;
|
|
12
12
|
}
|
|
@@ -2,13 +2,14 @@ import type * as Corti from "../../../../../api/index.js";
|
|
|
2
2
|
import * as core from "../../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../../index.js";
|
|
4
4
|
import { StreamConfigStatusMessage } from "../../../../types/StreamConfigStatusMessage.js";
|
|
5
|
+
import { StreamDeltaUsageMessage } from "../../../../types/StreamDeltaUsageMessage.js";
|
|
5
6
|
import { StreamEndedMessage } from "../../../../types/StreamEndedMessage.js";
|
|
6
7
|
import { StreamErrorMessage } from "../../../../types/StreamErrorMessage.js";
|
|
7
8
|
import { StreamFactsMessage } from "../../../../types/StreamFactsMessage.js";
|
|
8
9
|
import { StreamFlushedMessage } from "../../../../types/StreamFlushedMessage.js";
|
|
9
10
|
import { StreamTranscriptMessage } from "../../../../types/StreamTranscriptMessage.js";
|
|
10
11
|
import { StreamUsageMessage } from "../../../../types/StreamUsageMessage.js";
|
|
11
|
-
export declare const StreamSocketResponse: core.serialization.Schema<serializers.StreamSocketResponse.Raw, Corti.StreamTranscriptMessage | Corti.StreamFactsMessage | Corti.StreamFlushedMessage | Corti.StreamEndedMessage | Corti.StreamUsageMessage | Corti.StreamErrorMessage | Corti.StreamConfigStatusMessage>;
|
|
12
|
+
export declare const StreamSocketResponse: core.serialization.Schema<serializers.StreamSocketResponse.Raw, Corti.StreamTranscriptMessage | Corti.StreamFactsMessage | Corti.StreamFlushedMessage | Corti.StreamDeltaUsageMessage | Corti.StreamEndedMessage | Corti.StreamUsageMessage | Corti.StreamErrorMessage | Corti.StreamConfigStatusMessage>;
|
|
12
13
|
export declare namespace StreamSocketResponse {
|
|
13
|
-
type Raw = StreamTranscriptMessage.Raw | StreamFactsMessage.Raw | StreamFlushedMessage.Raw | StreamEndedMessage.Raw | StreamUsageMessage.Raw | StreamErrorMessage.Raw | StreamConfigStatusMessage.Raw;
|
|
14
|
+
type Raw = StreamTranscriptMessage.Raw | StreamFactsMessage.Raw | StreamFlushedMessage.Raw | StreamDeltaUsageMessage.Raw | StreamEndedMessage.Raw | StreamUsageMessage.Raw | StreamErrorMessage.Raw | StreamConfigStatusMessage.Raw;
|
|
14
15
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.StreamSocketResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
39
39
|
const StreamConfigStatusMessage_js_1 = require("../../../../types/StreamConfigStatusMessage.js");
|
|
40
|
+
const StreamDeltaUsageMessage_js_1 = require("../../../../types/StreamDeltaUsageMessage.js");
|
|
40
41
|
const StreamEndedMessage_js_1 = require("../../../../types/StreamEndedMessage.js");
|
|
41
42
|
const StreamErrorMessage_js_1 = require("../../../../types/StreamErrorMessage.js");
|
|
42
43
|
const StreamFactsMessage_js_1 = require("../../../../types/StreamFactsMessage.js");
|
|
@@ -47,6 +48,7 @@ exports.StreamSocketResponse = core.serialization.undiscriminatedUnion([
|
|
|
47
48
|
StreamTranscriptMessage_js_1.StreamTranscriptMessage,
|
|
48
49
|
StreamFactsMessage_js_1.StreamFactsMessage,
|
|
49
50
|
StreamFlushedMessage_js_1.StreamFlushedMessage,
|
|
51
|
+
StreamDeltaUsageMessage_js_1.StreamDeltaUsageMessage,
|
|
50
52
|
StreamEndedMessage_js_1.StreamEndedMessage,
|
|
51
53
|
StreamUsageMessage_js_1.StreamUsageMessage,
|
|
52
54
|
StreamErrorMessage_js_1.StreamErrorMessage,
|
package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.ts
CHANGED
|
@@ -3,12 +3,13 @@ import * as core from "../../../../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../../../../index.js";
|
|
4
4
|
import { TranscribeCommandMessage } from "../../../../types/TranscribeCommandMessage.js";
|
|
5
5
|
import { TranscribeConfigStatusMessage } from "../../../../types/TranscribeConfigStatusMessage.js";
|
|
6
|
+
import { TranscribeDeltaUsageMessage } from "../../../../types/TranscribeDeltaUsageMessage.js";
|
|
6
7
|
import { TranscribeEndedMessage } from "../../../../types/TranscribeEndedMessage.js";
|
|
7
8
|
import { TranscribeErrorMessage } from "../../../../types/TranscribeErrorMessage.js";
|
|
8
9
|
import { TranscribeFlushedMessage } from "../../../../types/TranscribeFlushedMessage.js";
|
|
9
10
|
import { TranscribeTranscriptMessage } from "../../../../types/TranscribeTranscriptMessage.js";
|
|
10
11
|
import { TranscribeUsageMessage } from "../../../../types/TranscribeUsageMessage.js";
|
|
11
|
-
export declare const TranscribeSocketResponse: core.serialization.Schema<serializers.TranscribeSocketResponse.Raw, Corti.TranscribeUsageMessage | Corti.TranscribeFlushedMessage | Corti.TranscribeEndedMessage | Corti.TranscribeErrorMessage | Corti.TranscribeTranscriptMessage | Corti.TranscribeCommandMessage | Corti.TranscribeConfigStatusMessage>;
|
|
12
|
+
export declare const TranscribeSocketResponse: core.serialization.Schema<serializers.TranscribeSocketResponse.Raw, Corti.TranscribeUsageMessage | Corti.TranscribeFlushedMessage | Corti.TranscribeDeltaUsageMessage | Corti.TranscribeEndedMessage | Corti.TranscribeErrorMessage | Corti.TranscribeTranscriptMessage | Corti.TranscribeCommandMessage | Corti.TranscribeConfigStatusMessage>;
|
|
12
13
|
export declare namespace TranscribeSocketResponse {
|
|
13
|
-
type Raw = TranscribeUsageMessage.Raw | TranscribeFlushedMessage.Raw | TranscribeEndedMessage.Raw | TranscribeErrorMessage.Raw | TranscribeTranscriptMessage.Raw | TranscribeCommandMessage.Raw | TranscribeConfigStatusMessage.Raw;
|
|
14
|
+
type Raw = TranscribeUsageMessage.Raw | TranscribeFlushedMessage.Raw | TranscribeDeltaUsageMessage.Raw | TranscribeEndedMessage.Raw | TranscribeErrorMessage.Raw | TranscribeTranscriptMessage.Raw | TranscribeCommandMessage.Raw | TranscribeConfigStatusMessage.Raw;
|
|
14
15
|
}
|
package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.js
CHANGED
|
@@ -38,6 +38,7 @@ exports.TranscribeSocketResponse = void 0;
|
|
|
38
38
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
39
39
|
const TranscribeCommandMessage_js_1 = require("../../../../types/TranscribeCommandMessage.js");
|
|
40
40
|
const TranscribeConfigStatusMessage_js_1 = require("../../../../types/TranscribeConfigStatusMessage.js");
|
|
41
|
+
const TranscribeDeltaUsageMessage_js_1 = require("../../../../types/TranscribeDeltaUsageMessage.js");
|
|
41
42
|
const TranscribeEndedMessage_js_1 = require("../../../../types/TranscribeEndedMessage.js");
|
|
42
43
|
const TranscribeErrorMessage_js_1 = require("../../../../types/TranscribeErrorMessage.js");
|
|
43
44
|
const TranscribeFlushedMessage_js_1 = require("../../../../types/TranscribeFlushedMessage.js");
|
|
@@ -46,6 +47,7 @@ const TranscribeUsageMessage_js_1 = require("../../../../types/TranscribeUsageMe
|
|
|
46
47
|
exports.TranscribeSocketResponse = core.serialization.undiscriminatedUnion([
|
|
47
48
|
TranscribeUsageMessage_js_1.TranscribeUsageMessage,
|
|
48
49
|
TranscribeFlushedMessage_js_1.TranscribeFlushedMessage,
|
|
50
|
+
TranscribeDeltaUsageMessage_js_1.TranscribeDeltaUsageMessage,
|
|
49
51
|
TranscribeEndedMessage_js_1.TranscribeEndedMessage,
|
|
50
52
|
TranscribeErrorMessage_js_1.TranscribeErrorMessage,
|
|
51
53
|
TranscribeTranscriptMessage_js_1.TranscribeTranscriptMessage,
|
|
@@ -17,9 +17,9 @@ export declare namespace AgentsAgentCard {
|
|
|
17
17
|
additionalInterfaces?: (AgentsAgentInterface.Raw[] | null | undefined) | null;
|
|
18
18
|
iconUrl?: (string | null | undefined) | null;
|
|
19
19
|
documentationUrl?: (string | null | undefined) | null;
|
|
20
|
-
provider?: AgentsAgentProvider.Raw | null;
|
|
20
|
+
provider?: (AgentsAgentProvider.Raw | null | undefined) | null;
|
|
21
21
|
version: string;
|
|
22
|
-
capabilities
|
|
22
|
+
capabilities?: AgentsAgentCapabilities.Raw | null;
|
|
23
23
|
securitySchemes?: (Record<string, unknown> | null | undefined) | null;
|
|
24
24
|
security?: (Record<string, unknown> | null | undefined) | null;
|
|
25
25
|
defaultInputModes: string[];
|
|
@@ -50,9 +50,9 @@ exports.AgentsAgentCard = core.serialization.object({
|
|
|
50
50
|
additionalInterfaces: core.serialization.list(AgentsAgentInterface_js_1.AgentsAgentInterface).optionalNullable(),
|
|
51
51
|
iconUrl: core.serialization.string().optionalNullable(),
|
|
52
52
|
documentationUrl: core.serialization.string().optionalNullable(),
|
|
53
|
-
provider: AgentsAgentProvider_js_1.AgentsAgentProvider.
|
|
53
|
+
provider: AgentsAgentProvider_js_1.AgentsAgentProvider.optionalNullable(),
|
|
54
54
|
version: core.serialization.string(),
|
|
55
|
-
capabilities: AgentsAgentCapabilities_js_1.AgentsAgentCapabilities,
|
|
55
|
+
capabilities: AgentsAgentCapabilities_js_1.AgentsAgentCapabilities.nullable(),
|
|
56
56
|
securitySchemes: core.serialization
|
|
57
57
|
.record(core.serialization.string(), core.serialization.unknown())
|
|
58
58
|
.optionalNullable(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Corti from "../../api/index.js";
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
|
-
import * as serializers from "../index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
4
|
export declare const AgentsErrorResponse: core.serialization.ObjectSchema<serializers.AgentsErrorResponse.Raw, Corti.AgentsErrorResponse>;
|
|
5
5
|
export declare namespace AgentsErrorResponse {
|
|
6
6
|
interface Raw {
|
|
@@ -8,6 +8,6 @@ export declare namespace AgentsErrorResponse {
|
|
|
8
8
|
description: string;
|
|
9
9
|
howToFix?: string | null;
|
|
10
10
|
details?: Record<string, unknown> | null;
|
|
11
|
-
cause?:
|
|
11
|
+
cause?: Record<string, unknown> | null;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -36,11 +36,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.AgentsErrorResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../core/index.js"));
|
|
39
|
-
const serializers = __importStar(require("../index.js"));
|
|
40
39
|
exports.AgentsErrorResponse = core.serialization.object({
|
|
41
40
|
code: core.serialization.string(),
|
|
42
41
|
description: core.serialization.string(),
|
|
43
42
|
howToFix: core.serialization.string().optional(),
|
|
44
43
|
details: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
|
|
45
|
-
cause: core.serialization.
|
|
44
|
+
cause: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
|
|
46
45
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type * as Corti from "../../api/index.js";
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
|
-
import * as serializers from "../index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
import { AgentsErrorResponse } from "./AgentsErrorResponse.js";
|
|
4
5
|
import { AgentsValidationError } from "./AgentsValidationError.js";
|
|
5
6
|
export declare const AgentsValidationErrorResponse: core.serialization.ObjectSchema<serializers.AgentsValidationErrorResponse.Raw, Corti.AgentsValidationErrorResponse>;
|
|
6
7
|
export declare namespace AgentsValidationErrorResponse {
|
|
7
|
-
interface Raw extends
|
|
8
|
+
interface Raw extends AgentsErrorResponse.Raw {
|
|
8
9
|
detail?: AgentsValidationError.Raw[] | null;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
@@ -36,10 +36,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.AgentsValidationErrorResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../core/index.js"));
|
|
39
|
-
const
|
|
39
|
+
const AgentsErrorResponse_js_1 = require("./AgentsErrorResponse.js");
|
|
40
40
|
const AgentsValidationError_js_1 = require("./AgentsValidationError.js");
|
|
41
41
|
exports.AgentsValidationErrorResponse = core.serialization
|
|
42
42
|
.object({
|
|
43
43
|
detail: core.serialization.list(AgentsValidationError_js_1.AgentsValidationError).optional(),
|
|
44
44
|
})
|
|
45
|
-
.extend(
|
|
45
|
+
.extend(AgentsErrorResponse_js_1.AgentsErrorResponse);
|
|
@@ -41,5 +41,5 @@ const CommonUsageInfo_js_1 = require("./CommonUsageInfo.js");
|
|
|
41
41
|
exports.CodesGeneralResponse = core.serialization.object({
|
|
42
42
|
codes: core.serialization.list(CodesGeneralReadResponse_js_1.CodesGeneralReadResponse),
|
|
43
43
|
candidates: core.serialization.list(CodesGeneralReadResponse_js_1.CodesGeneralReadResponse),
|
|
44
|
-
usageInfo: CommonUsageInfo_js_1.CommonUsageInfo
|
|
44
|
+
usageInfo: CommonUsageInfo_js_1.CommonUsageInfo,
|
|
45
45
|
});
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../index.js";
|
|
4
4
|
export declare const CommonCodingSystemEnum: core.serialization.Schema<serializers.CommonCodingSystemEnum.Raw, Corti.CommonCodingSystemEnum>;
|
|
5
5
|
export declare namespace CommonCodingSystemEnum {
|
|
6
|
-
type Raw = "icd10cm-inpatient" | "icd10cm-outpatient" | "icd10pcs" | "cpt";
|
|
6
|
+
type Raw = "icd10cm-inpatient" | "icd10cm-outpatient" | "icd10pcs" | "cpt" | "icd10int-inpatient" | "icd10int-outpatient" | "icd10uk-inpatient" | "icd10uk-outpatient" | "cim10fr-inpatient" | "cim10fr-outpatient" | "icd10gm-inpatient" | "icd10gm-outpatient" | "opcs4";
|
|
7
7
|
}
|