@corti/sdk 3.0.0 → 3.1.0-rc.1
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/documents/resources/sections/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/documents/resources/sections/client/Client.js +6 -0
- package/dist/cjs/api/resources/documents/resources/templates/client/Client.d.ts +7 -0
- package/dist/cjs/api/resources/documents/resources/templates/client/Client.js +7 -0
- package/dist/cjs/api/resources/documents/resources/templates/resources/versions/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/documents/resources/templates/resources/versions/client/Client.js +6 -0
- package/dist/cjs/api/resources/transcripts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/transcripts/client/Client.js +1 -1
- package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsCreateRequest.d.ts +3 -1
- package/dist/cjs/api/types/GuidedArrayNode.d.ts +3 -2
- package/dist/cjs/api/types/GuidedBoolNode.d.ts +2 -2
- package/dist/cjs/api/types/GuidedDocumentsGenerateBase.d.ts +2 -0
- package/dist/cjs/api/types/GuidedEphemeralDocument.d.ts +5 -0
- package/dist/cjs/api/types/GuidedFieldDefinition.d.ts +4 -1
- package/dist/cjs/api/types/GuidedNumberNode.d.ts +3 -3
- package/dist/cjs/api/types/GuidedObjectNode.d.ts +3 -3
- package/dist/cjs/api/types/GuidedSection.d.ts +0 -2
- package/dist/cjs/api/types/GuidedSectionsCreateBase.d.ts +0 -2
- package/dist/cjs/api/types/GuidedStringNode.d.ts +4 -4
- package/dist/cjs/api/types/GuidedTemplate.d.ts +0 -2
- package/dist/cjs/api/types/GuidedTemplatesCreateBase.d.ts +0 -2
- package/dist/cjs/api/types/StreamConfig.d.ts +1 -1
- package/dist/cjs/api/types/StreamErrorDetail.d.ts +7 -5
- package/dist/cjs/api/types/TranscribeAudioEventsConfig.d.ts +1 -1
- package/dist/cjs/api/types/TranscribeCommand.d.ts +3 -3
- package/dist/cjs/api/types/TranscribeCommandVariable.d.ts +6 -5
- package/dist/cjs/api/types/TranscribeCommandVariableType.d.ts +6 -0
- package/dist/cjs/api/types/TranscribeCommandVariableType.js +9 -0
- package/dist/cjs/api/types/TranscribeConfig.d.ts +6 -4
- package/dist/cjs/api/types/TranscribeConfigReplacementsItem.d.ts +6 -0
- package/dist/cjs/api/types/TranscribeErrorMessageError.d.ts +7 -5
- package/dist/cjs/api/types/TranscribeSupportedLanguage.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +2 -5
- package/dist/cjs/api/types/index.js +2 -5
- package/dist/cjs/custom/CortiClient.d.ts +14 -0
- package/dist/cjs/custom/CortiClient.js +21 -0
- package/dist/cjs/custom/utils/dictationTranscript.d.ts +26 -0
- package/dist/cjs/custom/utils/dictationTranscript.js +77 -0
- package/dist/cjs/custom/utils/index.d.ts +1 -0
- package/dist/cjs/custom/utils/index.js +3 -1
- package/dist/cjs/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.d.ts +1 -0
- package/dist/cjs/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.js +1 -0
- package/dist/cjs/serialization/types/GuidedDocumentsGenerateBase.d.ts +2 -0
- package/dist/cjs/serialization/types/GuidedDocumentsGenerateBase.js +2 -0
- package/dist/cjs/serialization/types/GuidedEphemeralDocument.d.ts +3 -0
- package/dist/cjs/serialization/types/GuidedEphemeralDocument.js +3 -0
- package/dist/cjs/serialization/types/GuidedFieldDefinition.d.ts +1 -0
- package/dist/cjs/serialization/types/GuidedFieldDefinition.js +1 -0
- package/dist/cjs/serialization/types/GuidedSection.d.ts +0 -2
- package/dist/cjs/serialization/types/GuidedSection.js +0 -2
- package/dist/cjs/serialization/types/GuidedSectionsCreateBase.d.ts +0 -2
- package/dist/cjs/serialization/types/GuidedSectionsCreateBase.js +0 -2
- package/dist/cjs/serialization/types/GuidedTemplate.d.ts +0 -2
- package/dist/cjs/serialization/types/GuidedTemplate.js +0 -2
- package/dist/cjs/serialization/types/GuidedTemplatesCreateBase.d.ts +0 -2
- package/dist/cjs/serialization/types/GuidedTemplatesCreateBase.js +0 -2
- package/dist/cjs/serialization/types/StreamErrorDetail.d.ts +6 -5
- package/dist/cjs/serialization/types/StreamErrorDetail.js +6 -5
- package/dist/cjs/serialization/types/TranscribeAudioEventsConfig.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeAudioEventsConfig.js +1 -1
- package/dist/cjs/serialization/types/TranscribeCommandVariable.d.ts +3 -2
- package/dist/cjs/serialization/types/TranscribeCommandVariable.js +3 -2
- package/dist/cjs/serialization/types/TranscribeCommandVariableType.d.ts +7 -0
- package/dist/cjs/serialization/types/{GuidedTemplatePolicyKind.js → TranscribeCommandVariableType.js} +2 -2
- package/dist/cjs/serialization/types/TranscribeConfig.d.ts +2 -0
- package/dist/cjs/serialization/types/TranscribeConfig.js +2 -0
- package/dist/cjs/serialization/types/TranscribeConfigReplacementsItem.d.ts +10 -0
- package/dist/cjs/serialization/types/{GuidedSectionsCreatePolicyRequest.js → TranscribeConfigReplacementsItem.js} +4 -5
- package/dist/cjs/serialization/types/TranscribeErrorMessageError.d.ts +6 -5
- package/dist/cjs/serialization/types/TranscribeErrorMessageError.js +6 -5
- package/dist/cjs/serialization/types/index.d.ts +2 -5
- package/dist/cjs/serialization/types/index.js +2 -5
- 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/documents/resources/sections/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/documents/resources/sections/client/Client.mjs +6 -0
- package/dist/esm/api/resources/documents/resources/templates/client/Client.d.mts +7 -0
- package/dist/esm/api/resources/documents/resources/templates/client/Client.mjs +7 -0
- package/dist/esm/api/resources/documents/resources/templates/resources/versions/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/documents/resources/templates/resources/versions/client/Client.mjs +6 -0
- package/dist/esm/api/resources/transcripts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/transcripts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/transcripts/client/requests/TranscriptsCreateRequest.d.mts +3 -1
- package/dist/esm/api/types/GuidedArrayNode.d.mts +3 -2
- package/dist/esm/api/types/GuidedBoolNode.d.mts +2 -2
- package/dist/esm/api/types/GuidedDocumentsGenerateBase.d.mts +2 -0
- package/dist/esm/api/types/GuidedEphemeralDocument.d.mts +5 -0
- package/dist/esm/api/types/GuidedFieldDefinition.d.mts +4 -1
- package/dist/esm/api/types/GuidedNumberNode.d.mts +3 -3
- package/dist/esm/api/types/GuidedObjectNode.d.mts +3 -3
- package/dist/esm/api/types/GuidedSection.d.mts +0 -2
- package/dist/esm/api/types/GuidedSectionsCreateBase.d.mts +0 -2
- package/dist/esm/api/types/GuidedStringNode.d.mts +4 -4
- package/dist/esm/api/types/GuidedTemplate.d.mts +0 -2
- package/dist/esm/api/types/GuidedTemplatesCreateBase.d.mts +0 -2
- package/dist/esm/api/types/StreamConfig.d.mts +1 -1
- package/dist/esm/api/types/StreamErrorDetail.d.mts +7 -5
- package/dist/esm/api/types/TranscribeAudioEventsConfig.d.mts +1 -1
- package/dist/esm/api/types/TranscribeCommand.d.mts +3 -3
- package/dist/esm/api/types/TranscribeCommandVariable.d.mts +6 -5
- package/dist/esm/api/types/TranscribeCommandVariableType.d.mts +6 -0
- package/dist/esm/api/types/TranscribeCommandVariableType.mjs +6 -0
- package/dist/esm/api/types/TranscribeConfig.d.mts +6 -4
- package/dist/esm/api/types/TranscribeConfigReplacementsItem.d.mts +6 -0
- package/dist/esm/api/types/TranscribeErrorMessageError.d.mts +7 -5
- package/dist/esm/api/types/TranscribeSupportedLanguage.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +2 -5
- package/dist/esm/api/types/index.mjs +2 -5
- package/dist/esm/custom/CortiClient.d.mts +14 -0
- package/dist/esm/custom/CortiClient.mjs +21 -0
- package/dist/esm/custom/utils/dictationTranscript.d.mts +26 -0
- package/dist/esm/custom/utils/dictationTranscript.mjs +74 -0
- package/dist/esm/custom/utils/index.d.mts +1 -0
- package/dist/esm/custom/utils/index.mjs +1 -0
- package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.d.mts +1 -0
- package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.mjs +1 -0
- package/dist/esm/serialization/types/GuidedDocumentsGenerateBase.d.mts +2 -0
- package/dist/esm/serialization/types/GuidedDocumentsGenerateBase.mjs +2 -0
- package/dist/esm/serialization/types/GuidedEphemeralDocument.d.mts +3 -0
- package/dist/esm/serialization/types/GuidedEphemeralDocument.mjs +3 -0
- package/dist/esm/serialization/types/GuidedFieldDefinition.d.mts +1 -0
- package/dist/esm/serialization/types/GuidedFieldDefinition.mjs +1 -0
- package/dist/esm/serialization/types/GuidedSection.d.mts +0 -2
- package/dist/esm/serialization/types/GuidedSection.mjs +0 -2
- package/dist/esm/serialization/types/GuidedSectionsCreateBase.d.mts +0 -2
- package/dist/esm/serialization/types/GuidedSectionsCreateBase.mjs +0 -2
- package/dist/esm/serialization/types/GuidedTemplate.d.mts +0 -2
- package/dist/esm/serialization/types/GuidedTemplate.mjs +0 -2
- package/dist/esm/serialization/types/GuidedTemplatesCreateBase.d.mts +0 -2
- package/dist/esm/serialization/types/GuidedTemplatesCreateBase.mjs +0 -2
- package/dist/esm/serialization/types/StreamErrorDetail.d.mts +6 -5
- package/dist/esm/serialization/types/StreamErrorDetail.mjs +6 -5
- package/dist/esm/serialization/types/TranscribeAudioEventsConfig.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeAudioEventsConfig.mjs +1 -1
- package/dist/esm/serialization/types/TranscribeCommandVariable.d.mts +3 -2
- package/dist/esm/serialization/types/TranscribeCommandVariable.mjs +3 -2
- package/dist/esm/serialization/types/TranscribeCommandVariableType.d.mts +7 -0
- package/dist/esm/serialization/types/{GuidedTemplatePolicyKind.mjs → TranscribeCommandVariableType.mjs} +1 -1
- package/dist/esm/serialization/types/TranscribeConfig.d.mts +2 -0
- package/dist/esm/serialization/types/TranscribeConfig.mjs +2 -0
- package/dist/esm/serialization/types/TranscribeConfigReplacementsItem.d.mts +10 -0
- package/dist/esm/serialization/types/TranscribeConfigReplacementsItem.mjs +6 -0
- package/dist/esm/serialization/types/TranscribeErrorMessageError.d.mts +6 -5
- package/dist/esm/serialization/types/TranscribeErrorMessageError.mjs +6 -5
- package/dist/esm/serialization/types/index.d.mts +2 -5
- package/dist/esm/serialization/types/index.mjs +2 -5
- 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/GuidedSectionPolicy.d.ts +0 -16
- package/dist/cjs/api/types/GuidedSectionsCreatePolicyRequest.d.ts +0 -6
- package/dist/cjs/api/types/GuidedSectionsCreatePolicyRequest.js +0 -3
- package/dist/cjs/api/types/GuidedTemplatePolicy.d.ts +0 -16
- package/dist/cjs/api/types/GuidedTemplatePolicy.js +0 -3
- package/dist/cjs/api/types/GuidedTemplatePolicyKind.d.ts +0 -6
- package/dist/cjs/api/types/GuidedTemplatePolicyKind.js +0 -9
- package/dist/cjs/api/types/GuidedTemplatesCreatePolicyRequest.d.ts +0 -6
- package/dist/cjs/api/types/GuidedTemplatesCreatePolicyRequest.js +0 -3
- package/dist/cjs/serialization/types/GuidedSectionPolicy.d.ts +0 -16
- package/dist/cjs/serialization/types/GuidedSectionPolicy.js +0 -48
- package/dist/cjs/serialization/types/GuidedSectionsCreatePolicyRequest.d.ts +0 -11
- package/dist/cjs/serialization/types/GuidedTemplatePolicy.d.ts +0 -16
- package/dist/cjs/serialization/types/GuidedTemplatePolicy.js +0 -48
- package/dist/cjs/serialization/types/GuidedTemplatePolicyKind.d.ts +0 -7
- package/dist/cjs/serialization/types/GuidedTemplatesCreatePolicyRequest.d.ts +0 -11
- package/dist/cjs/serialization/types/GuidedTemplatesCreatePolicyRequest.js +0 -43
- package/dist/esm/api/types/GuidedSectionPolicy.d.mts +0 -16
- package/dist/esm/api/types/GuidedSectionsCreatePolicyRequest.d.mts +0 -6
- package/dist/esm/api/types/GuidedSectionsCreatePolicyRequest.mjs +0 -2
- package/dist/esm/api/types/GuidedTemplatePolicy.d.mts +0 -16
- package/dist/esm/api/types/GuidedTemplatePolicy.mjs +0 -2
- package/dist/esm/api/types/GuidedTemplatePolicyKind.d.mts +0 -6
- package/dist/esm/api/types/GuidedTemplatePolicyKind.mjs +0 -6
- package/dist/esm/api/types/GuidedTemplatesCreatePolicyRequest.d.mts +0 -6
- package/dist/esm/api/types/GuidedTemplatesCreatePolicyRequest.mjs +0 -2
- package/dist/esm/serialization/types/GuidedSectionPolicy.d.mts +0 -16
- package/dist/esm/serialization/types/GuidedSectionPolicy.mjs +0 -12
- package/dist/esm/serialization/types/GuidedSectionsCreatePolicyRequest.d.mts +0 -11
- package/dist/esm/serialization/types/GuidedSectionsCreatePolicyRequest.mjs +0 -7
- package/dist/esm/serialization/types/GuidedTemplatePolicy.d.mts +0 -16
- package/dist/esm/serialization/types/GuidedTemplatePolicy.mjs +0 -12
- package/dist/esm/serialization/types/GuidedTemplatePolicyKind.d.mts +0 -7
- package/dist/esm/serialization/types/GuidedTemplatesCreatePolicyRequest.d.mts +0 -11
- package/dist/esm/serialization/types/GuidedTemplatesCreatePolicyRequest.mjs +0 -7
- /package/dist/cjs/api/types/{GuidedSectionPolicy.js → TranscribeConfigReplacementsItem.js} +0 -0
- /package/dist/esm/api/types/{GuidedSectionPolicy.mjs → TranscribeConfigReplacementsItem.mjs} +0 -0
|
@@ -143,12 +143,10 @@ export * from "./GuidedSectionInstructionsOverride.mjs";
|
|
|
143
143
|
export * from "./GuidedSectionInstructionsPartial.mjs";
|
|
144
144
|
export * from "./GuidedSectionOverride.mjs";
|
|
145
145
|
export * from "./GuidedSectionOverrides.mjs";
|
|
146
|
-
export * from "./GuidedSectionPolicy.mjs";
|
|
147
146
|
export * from "./GuidedSectionSource.mjs";
|
|
148
147
|
export * from "./GuidedSectionsCreateBase.mjs";
|
|
149
148
|
export * from "./GuidedSectionsCreateFromInheritanceRequest.mjs";
|
|
150
149
|
export * from "./GuidedSectionsCreateFromScratchRequest.mjs";
|
|
151
|
-
export * from "./GuidedSectionsCreatePolicyRequest.mjs";
|
|
152
150
|
export * from "./GuidedSectionsCreateRequest.mjs";
|
|
153
151
|
export * from "./GuidedSectionVersion.mjs";
|
|
154
152
|
export * from "./GuidedShallowTemplateGeneration.mjs";
|
|
@@ -160,8 +158,6 @@ export * from "./GuidedTemplateGeneration.mjs";
|
|
|
160
158
|
export * from "./GuidedTemplateInstructions.mjs";
|
|
161
159
|
export * from "./GuidedTemplateInstructionsPartial.mjs";
|
|
162
160
|
export * from "./GuidedTemplateOverrides.mjs";
|
|
163
|
-
export * from "./GuidedTemplatePolicy.mjs";
|
|
164
|
-
export * from "./GuidedTemplatePolicyKind.mjs";
|
|
165
161
|
export * from "./GuidedTemplateRef.mjs";
|
|
166
162
|
export * from "./GuidedTemplateSource.mjs";
|
|
167
163
|
export * from "./GuidedTemplatesCreateBase.mjs";
|
|
@@ -169,7 +165,6 @@ export * from "./GuidedTemplatesCreateFromInheritanceRequest.mjs";
|
|
|
169
165
|
export * from "./GuidedTemplatesCreateFromInheritanceRequestGeneration.mjs";
|
|
170
166
|
export * from "./GuidedTemplatesCreateFromScratchRequest.mjs";
|
|
171
167
|
export * from "./GuidedTemplatesCreateFromScratchRequestGeneration.mjs";
|
|
172
|
-
export * from "./GuidedTemplatesCreatePolicyRequest.mjs";
|
|
173
168
|
export * from "./GuidedTemplatesCreateRequest.mjs";
|
|
174
169
|
export * from "./GuidedTemplatesVersionGeneration.mjs";
|
|
175
170
|
export * from "./GuidedTemplatesVersionSectionRequest.mjs";
|
|
@@ -238,8 +233,10 @@ export * from "./TranscribeCommand.mjs";
|
|
|
238
233
|
export * from "./TranscribeCommandData.mjs";
|
|
239
234
|
export * from "./TranscribeCommandMessage.mjs";
|
|
240
235
|
export * from "./TranscribeCommandVariable.mjs";
|
|
236
|
+
export * from "./TranscribeCommandVariableType.mjs";
|
|
241
237
|
export * from "./TranscribeConfig.mjs";
|
|
242
238
|
export * from "./TranscribeConfigMessage.mjs";
|
|
239
|
+
export * from "./TranscribeConfigReplacementsItem.mjs";
|
|
243
240
|
export * from "./TranscribeConfigStatusMessage.mjs";
|
|
244
241
|
export * from "./TranscribeConfigStatusMessageType.mjs";
|
|
245
242
|
export * from "./TranscribeDeltaUsageMessage.mjs";
|
|
@@ -48,6 +48,20 @@ export declare class CortiClient extends BaseCortiClient {
|
|
|
48
48
|
get stream(): CustomStream;
|
|
49
49
|
get transcribe(): CustomTranscribe;
|
|
50
50
|
get agents(): CustomAgents;
|
|
51
|
+
/**
|
|
52
|
+
* Returns the full set of URLs the client is configured to use.
|
|
53
|
+
*
|
|
54
|
+
* If a custom `baseUrl` was provided it overrides the `base` field; all
|
|
55
|
+
* other URLs are derived from the configured environment.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const client = new CortiClient({ environment: "eu", ... });
|
|
60
|
+
* const urls = await client.getEnvironmentUrls();
|
|
61
|
+
* // { base: "https://api.eu.corti.app/v2", wss: "wss://...", login: "https://...", agents: "https://..." }
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
getEnvironmentUrls: () => Promise<environments.CortiEnvironmentUrls>;
|
|
51
65
|
/**
|
|
52
66
|
* Retrieves authentication headers for API requests.
|
|
53
67
|
*
|
|
@@ -23,6 +23,27 @@ export class CortiClient extends BaseCortiClient {
|
|
|
23
23
|
const ctx = resolveClientOptions(options);
|
|
24
24
|
const restOptions = Object.assign(Object.assign(Object.assign({}, opts), { tenantName: ctx.tenantName, environment: getEnvironment(ctx.environment) }), (ctx.initialTokenResponse != null ? { initialTokenResponse: ctx.initialTokenResponse } : {}));
|
|
25
25
|
super(authToBaseOptions(opts.auth, restOptions));
|
|
26
|
+
/**
|
|
27
|
+
* Returns the full set of URLs the client is configured to use.
|
|
28
|
+
*
|
|
29
|
+
* If a custom `baseUrl` was provided it overrides the `base` field; all
|
|
30
|
+
* other URLs are derived from the configured environment.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const client = new CortiClient({ environment: "eu", ... });
|
|
35
|
+
* const urls = await client.getEnvironmentUrls();
|
|
36
|
+
* // { base: "https://api.eu.corti.app/v2", wss: "wss://...", login: "https://...", agents: "https://..." }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
this.getEnvironmentUrls = () => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const baseUrl = yield core.Supplier.get(this._options.baseUrl);
|
|
41
|
+
// baseUrl is a universal override: all generated clients use `baseUrl ?? env.<field>`.
|
|
42
|
+
// Resolve environment only in the fallback path to avoid triggering auth discovery needlessly.
|
|
43
|
+
if (baseUrl != null)
|
|
44
|
+
return { base: baseUrl, wss: baseUrl, login: baseUrl, agents: baseUrl };
|
|
45
|
+
return yield core.Supplier.get(this._options.environment);
|
|
46
|
+
});
|
|
26
47
|
/**
|
|
27
48
|
* Retrieves authentication headers for API requests.
|
|
28
49
|
*
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TranscribeTranscriptData } from "../../api/types/TranscribeTranscriptData.mjs";
|
|
2
|
+
export interface DictationTranscriptSnapshot {
|
|
3
|
+
/** Finalized text. Use this for copy, clear, and JSON export. */
|
|
4
|
+
committedText: string;
|
|
5
|
+
/**
|
|
6
|
+
* Active interim preview. Empty string when none.
|
|
7
|
+
* Includes its leading boundary space so the UI can render it verbatim
|
|
8
|
+
* immediately after committedText.
|
|
9
|
+
*/
|
|
10
|
+
interimText: string;
|
|
11
|
+
/** @internal */
|
|
12
|
+
_finalizedStarts: ReadonlySet<number>;
|
|
13
|
+
/** @internal */
|
|
14
|
+
_latestFinalEnd: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Pure function that applies a single transcript message to the previous
|
|
18
|
+
* snapshot and returns a new snapshot with updated committed/interim text.
|
|
19
|
+
*
|
|
20
|
+
* - Handles the two-layer committed + interim model (DXG-844).
|
|
21
|
+
* - Ignores late interims that overlap an already-finalized timeline (DXG-1093).
|
|
22
|
+
*
|
|
23
|
+
* @param previous - The last snapshot, or `undefined` on first call.
|
|
24
|
+
* @param message - The incoming transcript packet (subset of TranscribeTranscriptData).
|
|
25
|
+
*/
|
|
26
|
+
export declare function applyDictationTranscript(previous: DictationTranscriptSnapshot | undefined, message: Pick<TranscribeTranscriptData, "text" | "start" | "end" | "isFinal">): DictationTranscriptSnapshot;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const NO_SPACE_AFTER = new Set(["(", "[", "{", '"', "'", "\u2018", "\u201c"]);
|
|
2
|
+
const LEFT_ATTACH = new Set([",", ".", ":", ";", "!", "?", ")", "]", "}", "%"]);
|
|
3
|
+
/**
|
|
4
|
+
* Returns the segment text prefixed with at most one space, applying
|
|
5
|
+
* punctuation-aware boundary rules so callers never produce double-spaces
|
|
6
|
+
* or spaces before attachment characters.
|
|
7
|
+
*/
|
|
8
|
+
function buildInsertion(committed, segment) {
|
|
9
|
+
var _a;
|
|
10
|
+
if (!segment)
|
|
11
|
+
return segment;
|
|
12
|
+
const prevChar = committed.length > 0 ? committed[committed.length - 1] : "";
|
|
13
|
+
const nextChar = (_a = segment[0]) !== null && _a !== void 0 ? _a : "";
|
|
14
|
+
const needsSpace = committed.length > 0 && !/\s/.test(prevChar) && !NO_SPACE_AFTER.has(prevChar) && !LEFT_ATTACH.has(nextChar);
|
|
15
|
+
return needsSpace ? ` ${segment}` : segment;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Pure function that applies a single transcript message to the previous
|
|
19
|
+
* snapshot and returns a new snapshot with updated committed/interim text.
|
|
20
|
+
*
|
|
21
|
+
* - Handles the two-layer committed + interim model (DXG-844).
|
|
22
|
+
* - Ignores late interims that overlap an already-finalized timeline (DXG-1093).
|
|
23
|
+
*
|
|
24
|
+
* @param previous - The last snapshot, or `undefined` on first call.
|
|
25
|
+
* @param message - The incoming transcript packet (subset of TranscribeTranscriptData).
|
|
26
|
+
*/
|
|
27
|
+
export function applyDictationTranscript(previous, message) {
|
|
28
|
+
var _a, _b, _c;
|
|
29
|
+
const committedText = (_a = previous === null || previous === void 0 ? void 0 : previous.committedText) !== null && _a !== void 0 ? _a : "";
|
|
30
|
+
const finalizedStarts = (_b = previous === null || previous === void 0 ? void 0 : previous._finalizedStarts) !== null && _b !== void 0 ? _b : new Set();
|
|
31
|
+
const latestFinalEnd = (_c = previous === null || previous === void 0 ? void 0 : previous._latestFinalEnd) !== null && _c !== void 0 ? _c : -Infinity;
|
|
32
|
+
if (message.isFinal) {
|
|
33
|
+
if (finalizedStarts.has(message.start)) {
|
|
34
|
+
return {
|
|
35
|
+
committedText,
|
|
36
|
+
interimText: "",
|
|
37
|
+
_finalizedStarts: finalizedStarts,
|
|
38
|
+
_latestFinalEnd: latestFinalEnd,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const nextFinalizedStarts = new Set(finalizedStarts);
|
|
42
|
+
nextFinalizedStarts.add(message.start);
|
|
43
|
+
const newCommitted = committedText + buildInsertion(committedText, message.text);
|
|
44
|
+
return {
|
|
45
|
+
committedText: newCommitted,
|
|
46
|
+
interimText: "",
|
|
47
|
+
_finalizedStarts: nextFinalizedStarts,
|
|
48
|
+
_latestFinalEnd: Math.max(latestFinalEnd, message.end),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// Interim path.
|
|
52
|
+
if (finalizedStarts.has(message.start)) {
|
|
53
|
+
return (previous !== null && previous !== void 0 ? previous : {
|
|
54
|
+
committedText: "",
|
|
55
|
+
interimText: "",
|
|
56
|
+
_finalizedStarts: finalizedStarts,
|
|
57
|
+
_latestFinalEnd: latestFinalEnd,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (message.start < latestFinalEnd) {
|
|
61
|
+
return (previous !== null && previous !== void 0 ? previous : {
|
|
62
|
+
committedText: "",
|
|
63
|
+
interimText: "",
|
|
64
|
+
_finalizedStarts: finalizedStarts,
|
|
65
|
+
_latestFinalEnd: latestFinalEnd,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
committedText,
|
|
70
|
+
interimText: buildInsertion(committedText, message.text),
|
|
71
|
+
_finalizedStarts: finalizedStarts,
|
|
72
|
+
_latestFinalEnd: latestFinalEnd,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type DecodedToken, decodeToken } from "./decodeToken.mjs";
|
|
2
|
+
export { applyDictationTranscript, type DictationTranscriptSnapshot, } from "./dictationTranscript.mjs";
|
|
2
3
|
export { getEnvironment } from "./environment.mjs";
|
|
3
4
|
export { generateCodeChallenge, generateCodeVerifier } from "./pkceHelpers.mjs";
|
package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.mjs
CHANGED
|
@@ -9,4 +9,5 @@ export const TranscriptsCreateRequest = core.serialization.object({
|
|
|
9
9
|
isMultichannel: core.serialization.boolean().optional(),
|
|
10
10
|
diarize: core.serialization.boolean().optional(),
|
|
11
11
|
participants: core.serialization.list(TranscriptsParticipant).optional(),
|
|
12
|
+
async: core.serialization.boolean().optional(),
|
|
12
13
|
});
|
|
@@ -2,11 +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 { GuidedDocumentContext } from "./GuidedDocumentContext.mjs";
|
|
5
|
+
import { GuidedLabel } from "./GuidedLabel.mjs";
|
|
5
6
|
export declare const GuidedDocumentsGenerateBase: core.serialization.ObjectSchema<serializers.GuidedDocumentsGenerateBase.Raw, Corti.GuidedDocumentsGenerateBase>;
|
|
6
7
|
export declare namespace GuidedDocumentsGenerateBase {
|
|
7
8
|
interface Raw {
|
|
8
9
|
outputLanguage: string;
|
|
9
10
|
context?: GuidedDocumentContext.Raw[] | null;
|
|
10
11
|
interactionId?: string | null;
|
|
12
|
+
labels?: GuidedLabel.Raw[] | null;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
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 { GuidedDocumentContext } from "./GuidedDocumentContext.mjs";
|
|
4
|
+
import { GuidedLabel } from "./GuidedLabel.mjs";
|
|
4
5
|
export const GuidedDocumentsGenerateBase = core.serialization.object({
|
|
5
6
|
outputLanguage: core.serialization.string(),
|
|
6
7
|
context: core.serialization.list(GuidedDocumentContext).optional(),
|
|
7
8
|
interactionId: core.serialization.string().optional(),
|
|
9
|
+
labels: core.serialization.list(GuidedLabel).optional(),
|
|
8
10
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
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
|
+
import { GuidedLabel } from "./GuidedLabel.mjs";
|
|
4
5
|
export declare const GuidedEphemeralDocument: core.serialization.ObjectSchema<serializers.GuidedEphemeralDocument.Raw, Corti.GuidedEphemeralDocument>;
|
|
5
6
|
export declare namespace GuidedEphemeralDocument {
|
|
6
7
|
interface Raw {
|
|
@@ -8,7 +9,9 @@ export declare namespace GuidedEphemeralDocument {
|
|
|
8
9
|
templateId: string;
|
|
9
10
|
templateVersionId: string;
|
|
10
11
|
language: string;
|
|
12
|
+
interactionId?: (string | null | undefined) | null;
|
|
11
13
|
stringDocument: Record<string, string>;
|
|
12
14
|
structuredDocument?: (Record<string, unknown> | null | undefined) | null;
|
|
15
|
+
labels: GuidedLabel.Raw[];
|
|
13
16
|
}
|
|
14
17
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../core/index.mjs";
|
|
3
|
+
import { GuidedLabel } from "./GuidedLabel.mjs";
|
|
3
4
|
export const GuidedEphemeralDocument = core.serialization.object({
|
|
4
5
|
name: core.serialization.string(),
|
|
5
6
|
templateId: core.serialization.string(),
|
|
6
7
|
templateVersionId: core.serialization.string(),
|
|
7
8
|
language: core.serialization.string(),
|
|
9
|
+
interactionId: core.serialization.string().optionalNullable(),
|
|
8
10
|
stringDocument: core.serialization.record(core.serialization.string(), core.serialization.string()),
|
|
9
11
|
structuredDocument: core.serialization
|
|
10
12
|
.record(core.serialization.string(), core.serialization.unknown())
|
|
11
13
|
.optionalNullable(),
|
|
14
|
+
labels: core.serialization.list(GuidedLabel),
|
|
12
15
|
});
|
|
@@ -5,4 +5,5 @@ export const GuidedFieldDefinition = core.serialization.object({
|
|
|
5
5
|
key: core.serialization.string(),
|
|
6
6
|
description: core.serialization.string(),
|
|
7
7
|
value: core.serialization.lazy(() => serializers.GuidedOutputSchema),
|
|
8
|
+
default: core.serialization.string().optionalNullable(),
|
|
8
9
|
});
|
|
@@ -2,7 +2,6 @@ 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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
5
|
-
import { GuidedSectionPolicy } from "./GuidedSectionPolicy.mjs";
|
|
6
5
|
import { GuidedSectionSource } from "./GuidedSectionSource.mjs";
|
|
7
6
|
import { GuidedSectionVersion } from "./GuidedSectionVersion.mjs";
|
|
8
7
|
export declare const GuidedSection: core.serialization.ObjectSchema<serializers.GuidedSection.Raw, Corti.GuidedSection>;
|
|
@@ -22,6 +21,5 @@ export declare namespace GuidedSection {
|
|
|
22
21
|
createdAt: string;
|
|
23
22
|
updatedAt: string;
|
|
24
23
|
deletedAt?: (string | null | undefined) | null;
|
|
25
|
-
policies?: GuidedSectionPolicy.Raw[] | null;
|
|
26
24
|
}
|
|
27
25
|
}
|
|
@@ -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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
4
|
-
import { GuidedSectionPolicy } from "./GuidedSectionPolicy.mjs";
|
|
5
4
|
import { GuidedSectionSource } from "./GuidedSectionSource.mjs";
|
|
6
5
|
import { GuidedSectionVersion } from "./GuidedSectionVersion.mjs";
|
|
7
6
|
export const GuidedSection = core.serialization.object({
|
|
@@ -19,5 +18,4 @@ export const GuidedSection = core.serialization.object({
|
|
|
19
18
|
createdAt: core.serialization.date(),
|
|
20
19
|
updatedAt: core.serialization.date(),
|
|
21
20
|
deletedAt: core.serialization.date().optionalNullable(),
|
|
22
|
-
policies: core.serialization.list(GuidedSectionPolicy).optional(),
|
|
23
21
|
});
|
|
@@ -2,7 +2,6 @@ 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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
5
|
-
import { GuidedSectionsCreatePolicyRequest } from "./GuidedSectionsCreatePolicyRequest.mjs";
|
|
6
5
|
export declare const GuidedSectionsCreateBase: core.serialization.ObjectSchema<serializers.GuidedSectionsCreateBase.Raw, Corti.GuidedSectionsCreateBase>;
|
|
7
6
|
export declare namespace GuidedSectionsCreateBase {
|
|
8
7
|
interface Raw {
|
|
@@ -13,6 +12,5 @@ export declare namespace GuidedSectionsCreateBase {
|
|
|
13
12
|
specialties?: string[] | null;
|
|
14
13
|
labels?: GuidedLabel.Raw[] | null;
|
|
15
14
|
publish?: boolean | null;
|
|
16
|
-
policies?: GuidedSectionsCreatePolicyRequest.Raw[] | null;
|
|
17
15
|
}
|
|
18
16
|
}
|
|
@@ -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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
4
|
-
import { GuidedSectionsCreatePolicyRequest } from "./GuidedSectionsCreatePolicyRequest.mjs";
|
|
5
4
|
export const GuidedSectionsCreateBase = core.serialization.object({
|
|
6
5
|
name: core.serialization.string(),
|
|
7
6
|
description: core.serialization.string().optional(),
|
|
@@ -10,5 +9,4 @@ export const GuidedSectionsCreateBase = core.serialization.object({
|
|
|
10
9
|
specialties: core.serialization.list(core.serialization.string()).optional(),
|
|
11
10
|
labels: core.serialization.list(GuidedLabel).optional(),
|
|
12
11
|
publish: core.serialization.boolean().optional(),
|
|
13
|
-
policies: core.serialization.list(GuidedSectionsCreatePolicyRequest).optional(),
|
|
14
12
|
});
|
|
@@ -2,7 +2,6 @@ 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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
5
|
-
import { GuidedTemplatePolicy } from "./GuidedTemplatePolicy.mjs";
|
|
6
5
|
import { GuidedTemplateSource } from "./GuidedTemplateSource.mjs";
|
|
7
6
|
import { GuidedTemplateVersion } from "./GuidedTemplateVersion.mjs";
|
|
8
7
|
export declare const GuidedTemplate: core.serialization.ObjectSchema<serializers.GuidedTemplate.Raw, Corti.GuidedTemplate>;
|
|
@@ -18,7 +17,6 @@ export declare namespace GuidedTemplate {
|
|
|
18
17
|
regions: string[];
|
|
19
18
|
specialties: string[];
|
|
20
19
|
labels: GuidedLabel.Raw[];
|
|
21
|
-
policies?: GuidedTemplatePolicy.Raw[] | null;
|
|
22
20
|
publishedVersion?: GuidedTemplateVersion.Raw | null;
|
|
23
21
|
createdAt: string;
|
|
24
22
|
updatedAt: string;
|
|
@@ -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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
4
|
-
import { GuidedTemplatePolicy } from "./GuidedTemplatePolicy.mjs";
|
|
5
4
|
import { GuidedTemplateSource } from "./GuidedTemplateSource.mjs";
|
|
6
5
|
import { GuidedTemplateVersion } from "./GuidedTemplateVersion.mjs";
|
|
7
6
|
export const GuidedTemplate = core.serialization.object({
|
|
@@ -15,7 +14,6 @@ export const GuidedTemplate = core.serialization.object({
|
|
|
15
14
|
regions: core.serialization.list(core.serialization.string()),
|
|
16
15
|
specialties: core.serialization.list(core.serialization.string()),
|
|
17
16
|
labels: core.serialization.list(GuidedLabel),
|
|
18
|
-
policies: core.serialization.list(GuidedTemplatePolicy).optional(),
|
|
19
17
|
publishedVersion: GuidedTemplateVersion.optional(),
|
|
20
18
|
createdAt: core.serialization.date(),
|
|
21
19
|
updatedAt: core.serialization.date(),
|
|
@@ -2,7 +2,6 @@ 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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
5
|
-
import { GuidedTemplatesCreatePolicyRequest } from "./GuidedTemplatesCreatePolicyRequest.mjs";
|
|
6
5
|
export declare const GuidedTemplatesCreateBase: core.serialization.ObjectSchema<serializers.GuidedTemplatesCreateBase.Raw, Corti.GuidedTemplatesCreateBase>;
|
|
7
6
|
export declare namespace GuidedTemplatesCreateBase {
|
|
8
7
|
interface Raw {
|
|
@@ -13,6 +12,5 @@ export declare namespace GuidedTemplatesCreateBase {
|
|
|
13
12
|
specialties?: string[] | null;
|
|
14
13
|
labels?: GuidedLabel.Raw[] | null;
|
|
15
14
|
publish?: boolean | null;
|
|
16
|
-
policies?: GuidedTemplatesCreatePolicyRequest.Raw[] | null;
|
|
17
15
|
}
|
|
18
16
|
}
|
|
@@ -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 { GuidedLabel } from "./GuidedLabel.mjs";
|
|
4
|
-
import { GuidedTemplatesCreatePolicyRequest } from "./GuidedTemplatesCreatePolicyRequest.mjs";
|
|
5
4
|
export const GuidedTemplatesCreateBase = core.serialization.object({
|
|
6
5
|
name: core.serialization.string(),
|
|
7
6
|
description: core.serialization.string().optional(),
|
|
@@ -10,5 +9,4 @@ export const GuidedTemplatesCreateBase = core.serialization.object({
|
|
|
10
9
|
specialties: core.serialization.list(core.serialization.string()).optional(),
|
|
11
10
|
labels: core.serialization.list(GuidedLabel).optional(),
|
|
12
11
|
publish: core.serialization.boolean().optional(),
|
|
13
|
-
policies: core.serialization.list(GuidedTemplatesCreatePolicyRequest).optional(),
|
|
14
12
|
});
|
|
@@ -4,10 +4,11 @@ import type * as serializers from "../index.mjs";
|
|
|
4
4
|
export declare const StreamErrorDetail: core.serialization.ObjectSchema<serializers.StreamErrorDetail.Raw, Corti.StreamErrorDetail>;
|
|
5
5
|
export declare namespace StreamErrorDetail {
|
|
6
6
|
interface Raw {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
requestid?: string | null;
|
|
8
|
+
id?: string | null;
|
|
9
|
+
title?: string | null;
|
|
10
|
+
status?: number | null;
|
|
11
|
+
details?: string | null;
|
|
12
|
+
doc?: string | null;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../core/index.mjs";
|
|
3
3
|
export const StreamErrorDetail = core.serialization.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
requestid: core.serialization.string().optional(),
|
|
5
|
+
id: core.serialization.string().optional(),
|
|
6
|
+
title: core.serialization.string().optional(),
|
|
7
|
+
status: core.serialization.number().optional(),
|
|
8
|
+
details: core.serialization.string().optional(),
|
|
9
|
+
doc: core.serialization.string().optional(),
|
|
9
10
|
});
|
|
@@ -4,6 +4,6 @@ import type * as serializers from "../index.mjs";
|
|
|
4
4
|
export declare const TranscribeAudioEventsConfig: core.serialization.ObjectSchema<serializers.TranscribeAudioEventsConfig.Raw, Corti.TranscribeAudioEventsConfig>;
|
|
5
5
|
export declare namespace TranscribeAudioEventsConfig {
|
|
6
6
|
interface Raw {
|
|
7
|
-
enabled
|
|
7
|
+
enabled: boolean;
|
|
8
8
|
}
|
|
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
|
export const TranscribeAudioEventsConfig = core.serialization.object({
|
|
4
|
-
enabled: core.serialization.boolean()
|
|
4
|
+
enabled: core.serialization.boolean(),
|
|
5
5
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
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
|
+
import { TranscribeCommandVariableType } from "./TranscribeCommandVariableType.mjs";
|
|
4
5
|
export declare const TranscribeCommandVariable: core.serialization.ObjectSchema<serializers.TranscribeCommandVariable.Raw, Corti.TranscribeCommandVariable>;
|
|
5
6
|
export declare namespace TranscribeCommandVariable {
|
|
6
7
|
interface Raw {
|
|
7
8
|
key: string;
|
|
8
|
-
type:
|
|
9
|
-
enum
|
|
9
|
+
type: TranscribeCommandVariableType.Raw;
|
|
10
|
+
enum?: string[] | null;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../core/index.mjs";
|
|
3
|
+
import { TranscribeCommandVariableType } from "./TranscribeCommandVariableType.mjs";
|
|
3
4
|
export const TranscribeCommandVariable = core.serialization.object({
|
|
4
5
|
key: core.serialization.string(),
|
|
5
|
-
type:
|
|
6
|
-
enum: core.serialization.list(core.serialization.string()),
|
|
6
|
+
type: TranscribeCommandVariableType,
|
|
7
|
+
enum: core.serialization.list(core.serialization.string()).optional(),
|
|
7
8
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as Corti from "../../api/index.mjs";
|
|
2
|
+
import * as core from "../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../index.mjs";
|
|
4
|
+
export declare const TranscribeCommandVariableType: core.serialization.Schema<serializers.TranscribeCommandVariableType.Raw, Corti.TranscribeCommandVariableType>;
|
|
5
|
+
export declare namespace TranscribeCommandVariableType {
|
|
6
|
+
type Raw = "enum" | "wildcard";
|
|
7
|
+
}
|
|
@@ -1,3 +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
|
|
3
|
+
export const TranscribeCommandVariableType = core.serialization.enum_(["enum", "wildcard"]);
|
|
@@ -3,6 +3,7 @@ import * as core from "../../core/index.mjs";
|
|
|
3
3
|
import type * as serializers from "../index.mjs";
|
|
4
4
|
import { TranscribeAudioEventsConfig } from "./TranscribeAudioEventsConfig.mjs";
|
|
5
5
|
import { TranscribeCommand } from "./TranscribeCommand.mjs";
|
|
6
|
+
import { TranscribeConfigReplacementsItem } from "./TranscribeConfigReplacementsItem.mjs";
|
|
6
7
|
import { TranscribeFormatting } from "./TranscribeFormatting.mjs";
|
|
7
8
|
import { TranscribeSupportedLanguage } from "./TranscribeSupportedLanguage.mjs";
|
|
8
9
|
export declare const TranscribeConfig: core.serialization.ObjectSchema<serializers.TranscribeConfig.Raw, Corti.TranscribeConfig>;
|
|
@@ -16,5 +17,6 @@ export declare namespace TranscribeConfig {
|
|
|
16
17
|
formatting?: TranscribeFormatting.Raw | null;
|
|
17
18
|
audioEvents?: TranscribeAudioEventsConfig.Raw | null;
|
|
18
19
|
audioFormat?: string | null;
|
|
20
|
+
replacements?: TranscribeConfigReplacementsItem.Raw[] | null;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as core from "../../core/index.mjs";
|
|
3
3
|
import { TranscribeAudioEventsConfig } from "./TranscribeAudioEventsConfig.mjs";
|
|
4
4
|
import { TranscribeCommand } from "./TranscribeCommand.mjs";
|
|
5
|
+
import { TranscribeConfigReplacementsItem } from "./TranscribeConfigReplacementsItem.mjs";
|
|
5
6
|
import { TranscribeFormatting } from "./TranscribeFormatting.mjs";
|
|
6
7
|
import { TranscribeSupportedLanguage } from "./TranscribeSupportedLanguage.mjs";
|
|
7
8
|
export const TranscribeConfig = core.serialization.object({
|
|
@@ -13,4 +14,5 @@ export const TranscribeConfig = core.serialization.object({
|
|
|
13
14
|
formatting: TranscribeFormatting.optional(),
|
|
14
15
|
audioEvents: TranscribeAudioEventsConfig.optional(),
|
|
15
16
|
audioFormat: core.serialization.string().optional(),
|
|
17
|
+
replacements: core.serialization.list(TranscribeConfigReplacementsItem).optional(),
|
|
16
18
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Corti from "../../api/index.mjs";
|
|
2
|
+
import * as core from "../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../index.mjs";
|
|
4
|
+
export declare const TranscribeConfigReplacementsItem: core.serialization.ObjectSchema<serializers.TranscribeConfigReplacementsItem.Raw, Corti.TranscribeConfigReplacementsItem>;
|
|
5
|
+
export declare namespace TranscribeConfigReplacementsItem {
|
|
6
|
+
interface Raw {
|
|
7
|
+
find: string;
|
|
8
|
+
replace: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../core/index.mjs";
|
|
3
|
+
export const TranscribeConfigReplacementsItem = core.serialization.object({
|
|
4
|
+
find: core.serialization.string(),
|
|
5
|
+
replace: core.serialization.string(),
|
|
6
|
+
});
|
|
@@ -4,10 +4,11 @@ import type * as serializers from "../index.mjs";
|
|
|
4
4
|
export declare const TranscribeErrorMessageError: core.serialization.ObjectSchema<serializers.TranscribeErrorMessageError.Raw, Corti.TranscribeErrorMessageError>;
|
|
5
5
|
export declare namespace TranscribeErrorMessageError {
|
|
6
6
|
interface Raw {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
requestid?: string | null;
|
|
8
|
+
id?: string | null;
|
|
9
|
+
title?: string | null;
|
|
10
|
+
status?: number | null;
|
|
11
|
+
details?: string | null;
|
|
12
|
+
doc?: string | null;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../core/index.mjs";
|
|
3
3
|
export const TranscribeErrorMessageError = core.serialization.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
requestid: core.serialization.string().optional(),
|
|
5
|
+
id: core.serialization.string().optional(),
|
|
6
|
+
title: core.serialization.string().optional(),
|
|
7
|
+
status: core.serialization.number().optional(),
|
|
8
|
+
details: core.serialization.string().optional(),
|
|
9
|
+
doc: core.serialization.string().optional(),
|
|
9
10
|
});
|