@corti/sdk 1.1.0-coding.1 → 1.2.0-templates-beta
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/agents/types/AgentsUpdateAgentExpertsItem.d.ts +1 -1
- 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/CommonCodingSystemEnum.d.ts +0 -7
- package/dist/cjs/api/types/CommonCodingSystemEnum.js +0 -7
- package/dist/cjs/api/types/StreamConfigStatusMessageType.d.ts +1 -0
- package/dist/cjs/api/types/StreamConfigStatusMessageType.js +1 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessageType.d.ts +0 -2
- package/dist/cjs/api/types/TranscribeConfigStatusMessageType.js +0 -2
- package/dist/cjs/api/types/index.d.ts +0 -3
- package/dist/cjs/api/types/index.js +0 -3
- package/dist/cjs/custom/CortiClient.d.ts +69 -25
- package/dist/cjs/custom/CortiClient.js +0 -69
- package/dist/cjs/custom/auth/CortiAuth.d.ts +0 -27
- package/dist/cjs/custom/auth/CortiAuth.js +4 -10
- package/dist/cjs/custom/stream/CustomStream.js +3 -5
- package/dist/cjs/custom/transcribe/CustomTranscribe.js +2 -6
- package/dist/cjs/custom/utils/encodeHeadersAsWsProtocols.js +11 -2
- package/dist/cjs/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.d.ts +2 -2
- package/dist/cjs/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.js +2 -2
- package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.d.ts +2 -3
- package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.js +0 -2
- package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.ts +2 -3
- package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.js +0 -2
- package/dist/cjs/serialization/types/CommonCodingSystemEnum.d.ts +1 -1
- package/dist/cjs/serialization/types/CommonCodingSystemEnum.js +0 -7
- package/dist/cjs/serialization/types/StreamConfigStatusMessageType.d.ts +1 -1
- package/dist/cjs/serialization/types/StreamConfigStatusMessageType.js +1 -0
- package/dist/cjs/serialization/types/TranscribeConfigStatusMessageType.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeConfigStatusMessageType.js +1 -7
- package/dist/cjs/serialization/types/index.d.ts +0 -3
- package/dist/cjs/serialization/types/index.js +0 -3
- 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/agents/types/AgentsUpdateAgentExpertsItem.d.mts +1 -1
- 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/CommonCodingSystemEnum.d.mts +0 -7
- package/dist/esm/api/types/CommonCodingSystemEnum.mjs +0 -7
- package/dist/esm/api/types/StreamConfigStatusMessageType.d.mts +1 -0
- package/dist/esm/api/types/StreamConfigStatusMessageType.mjs +1 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessageType.d.mts +0 -2
- package/dist/esm/api/types/TranscribeConfigStatusMessageType.mjs +0 -2
- package/dist/esm/api/types/index.d.mts +0 -3
- package/dist/esm/api/types/index.mjs +0 -3
- package/dist/esm/custom/CortiClient.d.mts +69 -25
- package/dist/esm/custom/CortiClient.mjs +0 -36
- package/dist/esm/custom/auth/CortiAuth.d.mts +0 -27
- package/dist/esm/custom/auth/CortiAuth.mjs +4 -10
- package/dist/esm/custom/stream/CustomStream.mjs +3 -5
- package/dist/esm/custom/transcribe/CustomTranscribe.mjs +2 -6
- package/dist/esm/custom/utils/encodeHeadersAsWsProtocols.mjs +10 -1
- package/dist/esm/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.d.mts +2 -2
- package/dist/esm/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.mjs +2 -2
- package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.d.mts +2 -3
- package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.mjs +0 -2
- package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.mts +2 -3
- package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.mjs +0 -2
- package/dist/esm/serialization/types/CommonCodingSystemEnum.d.mts +1 -1
- package/dist/esm/serialization/types/CommonCodingSystemEnum.mjs +0 -7
- package/dist/esm/serialization/types/StreamConfigStatusMessageType.d.mts +1 -1
- package/dist/esm/serialization/types/StreamConfigStatusMessageType.mjs +1 -0
- package/dist/esm/serialization/types/TranscribeConfigStatusMessageType.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeConfigStatusMessageType.mjs +1 -7
- package/dist/esm/serialization/types/index.d.mts +0 -3
- package/dist/esm/serialization/types/index.mjs +0 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/api/types/AgentsUpdateExpertReference.d.ts +0 -5
- package/dist/cjs/api/types/AgentsUpdateExpertReference.js +0 -3
- package/dist/cjs/api/types/StreamDeltaUsageMessage.d.ts +0 -5
- package/dist/cjs/api/types/StreamDeltaUsageMessage.js +0 -3
- package/dist/cjs/api/types/TranscribeDeltaUsageMessage.d.ts +0 -5
- package/dist/cjs/api/types/TranscribeDeltaUsageMessage.js +0 -3
- package/dist/cjs/custom/agents/CustomAgents.d.ts +0 -20
- package/dist/cjs/custom/agents/CustomAgents.js +0 -73
- package/dist/cjs/custom/utils/sdkHeaderNames.d.ts +0 -1
- package/dist/cjs/custom/utils/sdkHeaderNames.js +0 -12
- package/dist/cjs/custom/utils/stripFernNormalizedHeaders.d.ts +0 -5
- package/dist/cjs/custom/utils/stripFernNormalizedHeaders.js +0 -27
- package/dist/cjs/serialization/types/AgentsUpdateExpertReference.d.ts +0 -8
- package/dist/cjs/serialization/types/AgentsUpdateExpertReference.js +0 -6
- package/dist/cjs/serialization/types/StreamDeltaUsageMessage.d.ts +0 -10
- package/dist/cjs/serialization/types/StreamDeltaUsageMessage.js +0 -42
- package/dist/cjs/serialization/types/TranscribeDeltaUsageMessage.d.ts +0 -10
- package/dist/cjs/serialization/types/TranscribeDeltaUsageMessage.js +0 -42
- package/dist/esm/api/types/AgentsUpdateExpertReference.d.mts +0 -5
- package/dist/esm/api/types/AgentsUpdateExpertReference.mjs +0 -2
- package/dist/esm/api/types/StreamDeltaUsageMessage.d.mts +0 -5
- package/dist/esm/api/types/StreamDeltaUsageMessage.mjs +0 -2
- package/dist/esm/api/types/TranscribeDeltaUsageMessage.d.mts +0 -5
- package/dist/esm/api/types/TranscribeDeltaUsageMessage.mjs +0 -2
- package/dist/esm/custom/agents/CustomAgents.d.mts +0 -20
- package/dist/esm/custom/agents/CustomAgents.mjs +0 -36
- package/dist/esm/custom/utils/sdkHeaderNames.d.mts +0 -1
- package/dist/esm/custom/utils/sdkHeaderNames.mjs +0 -9
- package/dist/esm/custom/utils/stripFernNormalizedHeaders.d.mts +0 -5
- package/dist/esm/custom/utils/stripFernNormalizedHeaders.mjs +0 -24
- package/dist/esm/serialization/types/AgentsUpdateExpertReference.d.mts +0 -8
- package/dist/esm/serialization/types/AgentsUpdateExpertReference.mjs +0 -3
- package/dist/esm/serialization/types/StreamDeltaUsageMessage.d.mts +0 -10
- package/dist/esm/serialization/types/StreamDeltaUsageMessage.mjs +0 -6
- package/dist/esm/serialization/types/TranscribeDeltaUsageMessage.d.mts +0 -10
- package/dist/esm/serialization/types/TranscribeDeltaUsageMessage.mjs +0 -6
|
@@ -28,7 +28,6 @@ import { parseTranscribeResponseType } from "./parseTranscribeResponseType.mjs";
|
|
|
28
28
|
const TRANSCRIBE_CONFIG_REJECTION_TYPES = [
|
|
29
29
|
Corti.TranscribeConfigStatusMessageType.ConfigDenied,
|
|
30
30
|
Corti.TranscribeConfigStatusMessageType.ConfigTimeout,
|
|
31
|
-
Corti.TranscribeConfigStatusMessageType.ConfigMissing,
|
|
32
31
|
];
|
|
33
32
|
export class CustomTranscribe extends TranscribeClient {
|
|
34
33
|
constructor(options) {
|
|
@@ -97,9 +96,7 @@ export class CustomTranscribe extends TranscribeClient {
|
|
|
97
96
|
});
|
|
98
97
|
socket.socket.addEventListener("message", (event) => {
|
|
99
98
|
const type = parseTranscribeResponseType(event.data);
|
|
100
|
-
if (type == null ||
|
|
101
|
-
type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted ||
|
|
102
|
-
type === Corti.TranscribeConfigStatusMessageType.ConfigAlreadyReceived) {
|
|
99
|
+
if (type == null || type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted) {
|
|
103
100
|
return;
|
|
104
101
|
}
|
|
105
102
|
if (TRANSCRIBE_CONFIG_REJECTION_TYPES.includes(type) || type === "error") {
|
|
@@ -127,8 +124,7 @@ export class CustomTranscribe extends TranscribeClient {
|
|
|
127
124
|
const type = parseTranscribeResponseType(event.data);
|
|
128
125
|
if (type == null)
|
|
129
126
|
return;
|
|
130
|
-
if (type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted
|
|
131
|
-
type === Corti.TranscribeConfigStatusMessageType.ConfigAlreadyReceived) {
|
|
127
|
+
if (type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted) {
|
|
132
128
|
cleanup();
|
|
133
129
|
resolve();
|
|
134
130
|
}
|
|
@@ -12,7 +12,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
14
|
import * as core from "../../core/index.mjs";
|
|
15
|
-
|
|
15
|
+
/** Headers added by the SDK; exclude these when filterSdkHeaders is true (e.g. merged client headers). */
|
|
16
|
+
const SDK_HEADER_NAMES = new Set([
|
|
17
|
+
"Tenant-Name",
|
|
18
|
+
"X-Fern-Language",
|
|
19
|
+
"X-Fern-SDK-Name",
|
|
20
|
+
"X-Fern-SDK-Version",
|
|
21
|
+
"User-Agent",
|
|
22
|
+
"X-Fern-Runtime",
|
|
23
|
+
"X-Fern-Runtime-Version",
|
|
24
|
+
]);
|
|
16
25
|
/**
|
|
17
26
|
* Resolves header values (including suppliers/functions) and returns a flat array
|
|
18
27
|
* of [name, encodeURIComponent(value)] for each header, skipping undefined/empty values.
|
|
@@ -2,8 +2,8 @@ import type * as Corti from "../../../../api/index.mjs";
|
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
4
|
import { AgentsCreateExpert } from "../../../types/AgentsCreateExpert.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { AgentsCreateExpertReference } from "../../../types/AgentsCreateExpertReference.mjs";
|
|
6
6
|
export declare const AgentsUpdateAgentExpertsItem: core.serialization.Schema<serializers.AgentsUpdateAgentExpertsItem.Raw, Corti.AgentsUpdateAgentExpertsItem>;
|
|
7
7
|
export declare namespace AgentsUpdateAgentExpertsItem {
|
|
8
|
-
type Raw = AgentsCreateExpert.Raw |
|
|
8
|
+
type Raw = AgentsCreateExpert.Raw | AgentsCreateExpertReference.Raw;
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { AgentsCreateExpert } from "../../../types/AgentsCreateExpert.mjs";
|
|
4
|
-
import {
|
|
5
|
-
export const AgentsUpdateAgentExpertsItem = core.serialization.undiscriminatedUnion([AgentsCreateExpert,
|
|
4
|
+
import { AgentsCreateExpertReference } from "../../../types/AgentsCreateExpertReference.mjs";
|
|
5
|
+
export const AgentsUpdateAgentExpertsItem = core.serialization.undiscriminatedUnion([AgentsCreateExpert, AgentsCreateExpertReference]);
|
|
@@ -2,14 +2,13 @@ import type * as Corti from "../../../../../api/index.mjs";
|
|
|
2
2
|
import * as core from "../../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../../index.mjs";
|
|
4
4
|
import { StreamConfigStatusMessage } from "../../../../types/StreamConfigStatusMessage.mjs";
|
|
5
|
-
import { StreamDeltaUsageMessage } from "../../../../types/StreamDeltaUsageMessage.mjs";
|
|
6
5
|
import { StreamEndedMessage } from "../../../../types/StreamEndedMessage.mjs";
|
|
7
6
|
import { StreamErrorMessage } from "../../../../types/StreamErrorMessage.mjs";
|
|
8
7
|
import { StreamFactsMessage } from "../../../../types/StreamFactsMessage.mjs";
|
|
9
8
|
import { StreamFlushedMessage } from "../../../../types/StreamFlushedMessage.mjs";
|
|
10
9
|
import { StreamTranscriptMessage } from "../../../../types/StreamTranscriptMessage.mjs";
|
|
11
10
|
import { StreamUsageMessage } from "../../../../types/StreamUsageMessage.mjs";
|
|
12
|
-
export declare const StreamSocketResponse: core.serialization.Schema<serializers.StreamSocketResponse.Raw, Corti.StreamTranscriptMessage | Corti.StreamFactsMessage | Corti.StreamFlushedMessage | Corti.
|
|
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>;
|
|
13
12
|
export declare namespace StreamSocketResponse {
|
|
14
|
-
type Raw = StreamTranscriptMessage.Raw | StreamFactsMessage.Raw | StreamFlushedMessage.Raw |
|
|
13
|
+
type Raw = StreamTranscriptMessage.Raw | StreamFactsMessage.Raw | StreamFlushedMessage.Raw | StreamEndedMessage.Raw | StreamUsageMessage.Raw | StreamErrorMessage.Raw | StreamConfigStatusMessage.Raw;
|
|
15
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../../core/index.mjs";
|
|
3
3
|
import { StreamConfigStatusMessage } from "../../../../types/StreamConfigStatusMessage.mjs";
|
|
4
|
-
import { StreamDeltaUsageMessage } from "../../../../types/StreamDeltaUsageMessage.mjs";
|
|
5
4
|
import { StreamEndedMessage } from "../../../../types/StreamEndedMessage.mjs";
|
|
6
5
|
import { StreamErrorMessage } from "../../../../types/StreamErrorMessage.mjs";
|
|
7
6
|
import { StreamFactsMessage } from "../../../../types/StreamFactsMessage.mjs";
|
|
@@ -12,7 +11,6 @@ export const StreamSocketResponse = core.serialization.undiscriminatedUnion([
|
|
|
12
11
|
StreamTranscriptMessage,
|
|
13
12
|
StreamFactsMessage,
|
|
14
13
|
StreamFlushedMessage,
|
|
15
|
-
StreamDeltaUsageMessage,
|
|
16
14
|
StreamEndedMessage,
|
|
17
15
|
StreamUsageMessage,
|
|
18
16
|
StreamErrorMessage,
|
package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.mts
CHANGED
|
@@ -3,13 +3,12 @@ import * as core from "../../../../../core/index.mjs";
|
|
|
3
3
|
import type * as serializers from "../../../../index.mjs";
|
|
4
4
|
import { TranscribeCommandMessage } from "../../../../types/TranscribeCommandMessage.mjs";
|
|
5
5
|
import { TranscribeConfigStatusMessage } from "../../../../types/TranscribeConfigStatusMessage.mjs";
|
|
6
|
-
import { TranscribeDeltaUsageMessage } from "../../../../types/TranscribeDeltaUsageMessage.mjs";
|
|
7
6
|
import { TranscribeEndedMessage } from "../../../../types/TranscribeEndedMessage.mjs";
|
|
8
7
|
import { TranscribeErrorMessage } from "../../../../types/TranscribeErrorMessage.mjs";
|
|
9
8
|
import { TranscribeFlushedMessage } from "../../../../types/TranscribeFlushedMessage.mjs";
|
|
10
9
|
import { TranscribeTranscriptMessage } from "../../../../types/TranscribeTranscriptMessage.mjs";
|
|
11
10
|
import { TranscribeUsageMessage } from "../../../../types/TranscribeUsageMessage.mjs";
|
|
12
|
-
export declare const TranscribeSocketResponse: core.serialization.Schema<serializers.TranscribeSocketResponse.Raw, Corti.TranscribeUsageMessage | Corti.TranscribeFlushedMessage | Corti.
|
|
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>;
|
|
13
12
|
export declare namespace TranscribeSocketResponse {
|
|
14
|
-
type Raw = TranscribeUsageMessage.Raw | TranscribeFlushedMessage.Raw |
|
|
13
|
+
type Raw = TranscribeUsageMessage.Raw | TranscribeFlushedMessage.Raw | TranscribeEndedMessage.Raw | TranscribeErrorMessage.Raw | TranscribeTranscriptMessage.Raw | TranscribeCommandMessage.Raw | TranscribeConfigStatusMessage.Raw;
|
|
15
14
|
}
|
package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import * as core from "../../../../../core/index.mjs";
|
|
3
3
|
import { TranscribeCommandMessage } from "../../../../types/TranscribeCommandMessage.mjs";
|
|
4
4
|
import { TranscribeConfigStatusMessage } from "../../../../types/TranscribeConfigStatusMessage.mjs";
|
|
5
|
-
import { TranscribeDeltaUsageMessage } from "../../../../types/TranscribeDeltaUsageMessage.mjs";
|
|
6
5
|
import { TranscribeEndedMessage } from "../../../../types/TranscribeEndedMessage.mjs";
|
|
7
6
|
import { TranscribeErrorMessage } from "../../../../types/TranscribeErrorMessage.mjs";
|
|
8
7
|
import { TranscribeFlushedMessage } from "../../../../types/TranscribeFlushedMessage.mjs";
|
|
@@ -11,7 +10,6 @@ import { TranscribeUsageMessage } from "../../../../types/TranscribeUsageMessage
|
|
|
11
10
|
export const TranscribeSocketResponse = core.serialization.undiscriminatedUnion([
|
|
12
11
|
TranscribeUsageMessage,
|
|
13
12
|
TranscribeFlushedMessage,
|
|
14
|
-
TranscribeDeltaUsageMessage,
|
|
15
13
|
TranscribeEndedMessage,
|
|
16
14
|
TranscribeErrorMessage,
|
|
17
15
|
TranscribeTranscriptMessage,
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core/index.mjs";
|
|
|
3
3
|
import type * as serializers from "../index.mjs";
|
|
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" | "icd10int-inpatient" | "icd10int-outpatient" | "icd10uk-inpatient" | "icd10uk-outpatient"
|
|
6
|
+
type Raw = "icd10cm-inpatient" | "icd10cm-outpatient" | "icd10pcs" | "cpt" | "icd10int-inpatient" | "icd10int-outpatient" | "icd10uk-inpatient" | "icd10uk-outpatient";
|
|
7
7
|
}
|
|
@@ -9,11 +9,4 @@ export const CommonCodingSystemEnum = core.serialization.enum_([
|
|
|
9
9
|
"icd10int-outpatient",
|
|
10
10
|
"icd10uk-inpatient",
|
|
11
11
|
"icd10uk-outpatient",
|
|
12
|
-
"cim10fr-inpatient",
|
|
13
|
-
"cim10fr-outpatient",
|
|
14
|
-
"icd10gm-inpatient",
|
|
15
|
-
"icd10gm-outpatient",
|
|
16
|
-
"opcs4",
|
|
17
|
-
"ops",
|
|
18
|
-
"ccam",
|
|
19
12
|
]);
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core/index.mjs";
|
|
|
3
3
|
import type * as serializers from "../index.mjs";
|
|
4
4
|
export declare const StreamConfigStatusMessageType: core.serialization.Schema<serializers.StreamConfigStatusMessageType.Raw, Corti.StreamConfigStatusMessageType>;
|
|
5
5
|
export declare namespace StreamConfigStatusMessageType {
|
|
6
|
-
type Raw = "CONFIG_ACCEPTED" | "CONFIG_DENIED" | "CONFIG_MISSING" | "CONFIG_NOT_PROVIDED" | "CONFIG_ALREADY_RECEIVED";
|
|
6
|
+
type Raw = "CONFIG_ACCEPTED" | "CONFIG_DENIED" | "CONFIG_MISSING" | "CONFIG_NOT_PROVIDED" | "CONFIG_ALREADY_RECEIVED" | "CONFIG_TIMEOUT";
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core/index.mjs";
|
|
|
3
3
|
import type * as serializers from "../index.mjs";
|
|
4
4
|
export declare const TranscribeConfigStatusMessageType: core.serialization.Schema<serializers.TranscribeConfigStatusMessageType.Raw, Corti.TranscribeConfigStatusMessageType>;
|
|
5
5
|
export declare namespace TranscribeConfigStatusMessageType {
|
|
6
|
-
type Raw = "CONFIG_ACCEPTED" | "CONFIG_DENIED" | "CONFIG_TIMEOUT"
|
|
6
|
+
type Raw = "CONFIG_ACCEPTED" | "CONFIG_DENIED" | "CONFIG_TIMEOUT";
|
|
7
7
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../core/index.mjs";
|
|
3
|
-
export const TranscribeConfigStatusMessageType = core.serialization.enum_([
|
|
4
|
-
"CONFIG_ACCEPTED",
|
|
5
|
-
"CONFIG_DENIED",
|
|
6
|
-
"CONFIG_TIMEOUT",
|
|
7
|
-
"CONFIG_ALREADY_RECEIVED",
|
|
8
|
-
"CONFIG_MISSING",
|
|
9
|
-
]);
|
|
3
|
+
export const TranscribeConfigStatusMessageType = core.serialization.enum_(["CONFIG_ACCEPTED", "CONFIG_DENIED", "CONFIG_TIMEOUT"]);
|
|
@@ -52,7 +52,6 @@ export * from "./AgentsTaskStatus.mjs";
|
|
|
52
52
|
export * from "./AgentsTaskStatusState.mjs";
|
|
53
53
|
export * from "./AgentsTextPart.mjs";
|
|
54
54
|
export * from "./AgentsTextPartKind.mjs";
|
|
55
|
-
export * from "./AgentsUpdateExpertReference.mjs";
|
|
56
55
|
export * from "./AgentsValidationError.mjs";
|
|
57
56
|
export * from "./AgentsValidationErrorErrorsItem.mjs";
|
|
58
57
|
export * from "./AgentsValidationErrorResponse.mjs";
|
|
@@ -137,7 +136,6 @@ export * from "./StreamConfigStatusMessage.mjs";
|
|
|
137
136
|
export * from "./StreamConfigStatusMessageType.mjs";
|
|
138
137
|
export * from "./StreamConfigTranscription.mjs";
|
|
139
138
|
export * from "./StreamConfigXCortiRetentionPolicy.mjs";
|
|
140
|
-
export * from "./StreamDeltaUsageMessage.mjs";
|
|
141
139
|
export * from "./StreamEndedMessage.mjs";
|
|
142
140
|
export * from "./StreamEndMessage.mjs";
|
|
143
141
|
export * from "./StreamErrorDetail.mjs";
|
|
@@ -170,7 +168,6 @@ export * from "./TranscribeConfig.mjs";
|
|
|
170
168
|
export * from "./TranscribeConfigMessage.mjs";
|
|
171
169
|
export * from "./TranscribeConfigStatusMessage.mjs";
|
|
172
170
|
export * from "./TranscribeConfigStatusMessageType.mjs";
|
|
173
|
-
export * from "./TranscribeDeltaUsageMessage.mjs";
|
|
174
171
|
export * from "./TranscribeEndedMessage.mjs";
|
|
175
172
|
export * from "./TranscribeEndMessage.mjs";
|
|
176
173
|
export * from "./TranscribeErrorMessage.mjs";
|
|
@@ -52,7 +52,6 @@ export * from "./AgentsTaskStatus.mjs";
|
|
|
52
52
|
export * from "./AgentsTaskStatusState.mjs";
|
|
53
53
|
export * from "./AgentsTextPart.mjs";
|
|
54
54
|
export * from "./AgentsTextPartKind.mjs";
|
|
55
|
-
export * from "./AgentsUpdateExpertReference.mjs";
|
|
56
55
|
export * from "./AgentsValidationError.mjs";
|
|
57
56
|
export * from "./AgentsValidationErrorErrorsItem.mjs";
|
|
58
57
|
export * from "./AgentsValidationErrorResponse.mjs";
|
|
@@ -137,7 +136,6 @@ export * from "./StreamConfigStatusMessage.mjs";
|
|
|
137
136
|
export * from "./StreamConfigStatusMessageType.mjs";
|
|
138
137
|
export * from "./StreamConfigTranscription.mjs";
|
|
139
138
|
export * from "./StreamConfigXCortiRetentionPolicy.mjs";
|
|
140
|
-
export * from "./StreamDeltaUsageMessage.mjs";
|
|
141
139
|
export * from "./StreamEndedMessage.mjs";
|
|
142
140
|
export * from "./StreamEndMessage.mjs";
|
|
143
141
|
export * from "./StreamErrorDetail.mjs";
|
|
@@ -170,7 +168,6 @@ export * from "./TranscribeConfig.mjs";
|
|
|
170
168
|
export * from "./TranscribeConfigMessage.mjs";
|
|
171
169
|
export * from "./TranscribeConfigStatusMessage.mjs";
|
|
172
170
|
export * from "./TranscribeConfigStatusMessageType.mjs";
|
|
173
|
-
export * from "./TranscribeDeltaUsageMessage.mjs";
|
|
174
171
|
export * from "./TranscribeEndedMessage.mjs";
|
|
175
172
|
export * from "./TranscribeEndMessage.mjs";
|
|
176
173
|
export * from "./TranscribeErrorMessage.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.0-templates-beta";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.2.0-templates-beta";
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type * as Corti from "../index.js";
|
|
2
|
-
/**
|
|
3
|
-
* An expert reference when updating an agent. The id is required to identify which expert to update, or reference. The expert must already exist.
|
|
4
|
-
*/
|
|
5
|
-
export type AgentsUpdateExpertReference = Corti.AgentsCreateExpertReference;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is the custom implementation of the Agents client (src/api/resources/agents/client/Client.ts)
|
|
3
|
-
*
|
|
4
|
-
* It extends the auto-generated Agents class and adds custom helper methods.
|
|
5
|
-
*
|
|
6
|
-
* All the patches marked with `// Patch: ...` comments.
|
|
7
|
-
*/
|
|
8
|
-
import { AgentsClient } from "../../api/resources/agents/client/Client.js";
|
|
9
|
-
export declare class CustomAgents extends AgentsClient {
|
|
10
|
-
/**
|
|
11
|
-
* Returns the URL for the agent card JSON file.
|
|
12
|
-
*
|
|
13
|
-
* @param {string} agentId - The ID of the agent
|
|
14
|
-
* @returns {Promise<URL>} A Promise that resolves to the URL for the agent card
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* const url = await client.agents.getAgentCardUrl("agent-123");
|
|
18
|
-
*/
|
|
19
|
-
getCardUrl: (agentId: string) => Promise<URL>;
|
|
20
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file is the custom implementation of the Agents client (src/api/resources/agents/client/Client.ts)
|
|
4
|
-
*
|
|
5
|
-
* It extends the auto-generated Agents class and adds custom helper methods.
|
|
6
|
-
*
|
|
7
|
-
* All the patches marked with `// Patch: ...` comments.
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
-
var ownKeys = function(o) {
|
|
27
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
-
var ar = [];
|
|
29
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
return ownKeys(o);
|
|
33
|
-
};
|
|
34
|
-
return function (mod) {
|
|
35
|
-
if (mod && mod.__esModule) return mod;
|
|
36
|
-
var result = {};
|
|
37
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
-
__setModuleDefault(result, mod);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
43
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
44
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
45
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
46
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
47
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
48
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.CustomAgents = void 0;
|
|
53
|
-
const Client_js_1 = require("../../api/resources/agents/client/Client.js");
|
|
54
|
-
const core = __importStar(require("../../core/index.js"));
|
|
55
|
-
class CustomAgents extends Client_js_1.AgentsClient {
|
|
56
|
-
constructor() {
|
|
57
|
-
super(...arguments);
|
|
58
|
-
/**
|
|
59
|
-
* Returns the URL for the agent card JSON file.
|
|
60
|
-
*
|
|
61
|
-
* @param {string} agentId - The ID of the agent
|
|
62
|
-
* @returns {Promise<URL>} A Promise that resolves to the URL for the agent card
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* const url = await client.agents.getAgentCardUrl("agent-123");
|
|
66
|
-
*/
|
|
67
|
-
this.getCardUrl = (agentId) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const encodedAgentId = encodeURIComponent(agentId);
|
|
69
|
-
return new URL(`/agents/${encodedAgentId}/agent-card.json`, (yield core.Supplier.get(this._options.environment)).agents);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.CustomAgents = CustomAgents;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SDK_HEADER_NAMES: ReadonlySet<string>;
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
]);
|
|
@@ -1,5 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type * as Corti from "../../api/index.js";
|
|
2
|
-
import type * as core from "../../core/index.js";
|
|
3
|
-
import type * as serializers from "../index.js";
|
|
4
|
-
import { AgentsCreateExpertReference } from "./AgentsCreateExpertReference.js";
|
|
5
|
-
export declare const AgentsUpdateExpertReference: core.serialization.ObjectSchema<serializers.AgentsUpdateExpertReference.Raw, Corti.AgentsUpdateExpertReference>;
|
|
6
|
-
export declare namespace AgentsUpdateExpertReference {
|
|
7
|
-
type Raw = AgentsCreateExpertReference.Raw;
|
|
8
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AgentsUpdateExpertReference = void 0;
|
|
5
|
-
const AgentsCreateExpertReference_js_1 = require("./AgentsCreateExpertReference.js");
|
|
6
|
-
exports.AgentsUpdateExpertReference = AgentsCreateExpertReference_js_1.AgentsCreateExpertReference;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type * as Corti from "../../api/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
|
-
import type * as serializers from "../index.js";
|
|
4
|
-
export declare const StreamDeltaUsageMessage: core.serialization.ObjectSchema<serializers.StreamDeltaUsageMessage.Raw, Corti.StreamDeltaUsageMessage>;
|
|
5
|
-
export declare namespace StreamDeltaUsageMessage {
|
|
6
|
-
interface Raw {
|
|
7
|
-
type: "delta_usage";
|
|
8
|
-
credits: number;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.StreamDeltaUsageMessage = void 0;
|
|
38
|
-
const core = __importStar(require("../../core/index.js"));
|
|
39
|
-
exports.StreamDeltaUsageMessage = core.serialization.object({
|
|
40
|
-
type: core.serialization.stringLiteral("delta_usage"),
|
|
41
|
-
credits: core.serialization.number(),
|
|
42
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type * as Corti from "../../api/index.js";
|
|
2
|
-
import * as core from "../../core/index.js";
|
|
3
|
-
import type * as serializers from "../index.js";
|
|
4
|
-
export declare const TranscribeDeltaUsageMessage: core.serialization.ObjectSchema<serializers.TranscribeDeltaUsageMessage.Raw, Corti.TranscribeDeltaUsageMessage>;
|
|
5
|
-
export declare namespace TranscribeDeltaUsageMessage {
|
|
6
|
-
interface Raw {
|
|
7
|
-
type: "delta_usage";
|
|
8
|
-
credits: number;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.TranscribeDeltaUsageMessage = void 0;
|
|
38
|
-
const core = __importStar(require("../../core/index.js"));
|
|
39
|
-
exports.TranscribeDeltaUsageMessage = core.serialization.object({
|
|
40
|
-
type: core.serialization.stringLiteral("delta_usage"),
|
|
41
|
-
credits: core.serialization.number(),
|
|
42
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type * as Corti from "../index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* An expert reference when updating an agent. The id is required to identify which expert to update, or reference. The expert must already exist.
|
|
4
|
-
*/
|
|
5
|
-
export type AgentsUpdateExpertReference = Corti.AgentsCreateExpertReference;
|