@corti/sdk 0.1.0-alpha.rc → 0.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.
Files changed (225) hide show
  1. package/README.md +10 -11
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/recordings/client/Client.d.ts +2 -4
  4. package/dist/cjs/api/resources/recordings/client/Client.js +7 -6
  5. package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsCreateRequest.d.ts +1 -1
  6. package/dist/cjs/api/resources/transcripts/types/index.d.ts +0 -1
  7. package/dist/cjs/api/resources/transcripts/types/index.js +0 -1
  8. package/dist/cjs/api/types/DocumentsContext.d.ts +11 -5
  9. package/dist/cjs/api/types/DocumentsContextWithFacts.d.ts +8 -0
  10. package/dist/cjs/api/types/DocumentsContextWithString.d.ts +7 -0
  11. package/dist/cjs/api/types/DocumentsContextWithString.js +5 -0
  12. package/dist/cjs/api/types/DocumentsContextWithTranscript.d.ts +8 -0
  13. package/dist/cjs/api/types/DocumentsContextWithTranscript.js +5 -0
  14. package/dist/cjs/api/types/DocumentsCreateRequestWithTemplate.d.ts +1 -1
  15. package/dist/cjs/api/types/DocumentsCreateRequestWithTemplateId.d.ts +1 -1
  16. package/dist/cjs/api/types/DocumentsCreateRequestWithTemplateKey.d.ts +1 -1
  17. package/dist/cjs/api/types/DocumentsTemplate.d.ts +1 -10
  18. package/dist/cjs/api/types/DocumentsTemplateWithSectionIds.d.ts +12 -0
  19. package/dist/cjs/api/types/DocumentsTemplateWithSectionIds.js +5 -0
  20. package/dist/cjs/api/types/DocumentsTemplateWithSectionKeys.d.ts +11 -0
  21. package/dist/cjs/api/types/DocumentsTemplateWithSectionKeys.js +5 -0
  22. package/dist/cjs/api/types/StreamSupportedLanguage.d.ts +1 -17
  23. package/dist/cjs/api/types/StreamSupportedLanguage.js +0 -17
  24. package/dist/cjs/api/types/TemplatesSection.d.ts +1 -1
  25. package/dist/cjs/api/types/TemplatesSectionTranslation.d.ts +11 -0
  26. package/dist/cjs/api/types/TemplatesSectionTranslation.js +5 -0
  27. package/dist/cjs/api/types/TemplatesTranslation.d.ts +2 -2
  28. package/dist/cjs/api/types/TranscribeSupportedLanguage.d.ts +1 -17
  29. package/dist/cjs/api/types/TranscribeSupportedLanguage.js +0 -17
  30. package/dist/cjs/api/types/index.d.ts +6 -2
  31. package/dist/cjs/api/types/index.js +6 -2
  32. package/dist/cjs/core/exports.d.ts +1 -0
  33. package/dist/cjs/core/exports.js +17 -0
  34. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +7 -4
  35. package/dist/cjs/core/fetcher/BinaryResponse.js +5 -2
  36. package/dist/cjs/core/fetcher/Fetcher.js +3 -3
  37. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
  38. package/dist/cjs/core/fetcher/getErrorResponseBody.js +44 -0
  39. package/dist/cjs/core/fetcher/getResponseBody.js +2 -1
  40. package/dist/cjs/core/file/exports.d.ts +1 -0
  41. package/dist/cjs/core/file/exports.js +2 -0
  42. package/dist/cjs/core/file/file.d.ts +5 -0
  43. package/dist/cjs/core/file/file.js +209 -0
  44. package/dist/cjs/core/file/index.d.ts +2 -0
  45. package/dist/cjs/core/file/index.js +18 -0
  46. package/dist/cjs/core/file/types.d.ts +66 -0
  47. package/dist/cjs/core/file/types.js +2 -0
  48. package/dist/cjs/core/index.d.ts +1 -0
  49. package/dist/cjs/core/index.js +2 -1
  50. package/dist/cjs/core/schemas/utils/maybeSkipValidation.js +1 -1
  51. package/dist/cjs/core/url/join.js +23 -3
  52. package/dist/cjs/core/websocket/ws.js +1 -1
  53. package/dist/cjs/custom/CortiAuth.d.ts +8 -0
  54. package/dist/cjs/custom/CortiAuth.js +7 -0
  55. package/dist/cjs/custom/CortiClient.d.ts +4 -1
  56. package/dist/cjs/custom/CortiClient.js +2 -1
  57. package/dist/cjs/custom/CustomStream.d.ts +3 -1
  58. package/dist/cjs/custom/CustomStream.js +22 -2
  59. package/dist/cjs/custom/CustomStreamSocket.d.ts +5 -1
  60. package/dist/cjs/custom/CustomStreamSocket.js +8 -0
  61. package/dist/cjs/custom/CustomTranscribe.d.ts +3 -1
  62. package/dist/cjs/custom/CustomTranscribe.js +22 -2
  63. package/dist/cjs/custom/CustomTranscribeSocket.d.ts +5 -1
  64. package/dist/cjs/custom/CustomTranscribeSocket.js +8 -0
  65. package/dist/cjs/custom/utils/getEnvironmentFromString.d.ts +6 -0
  66. package/dist/cjs/custom/utils/getEnvironmentFromString.js +12 -0
  67. package/dist/cjs/environments.d.ts +1 -6
  68. package/dist/cjs/environments.js +0 -5
  69. package/dist/cjs/exports.d.ts +1 -0
  70. package/dist/cjs/exports.js +17 -0
  71. package/dist/cjs/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.d.ts +1 -2
  72. package/dist/cjs/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.js +1 -2
  73. package/dist/cjs/serialization/resources/transcripts/types/index.d.ts +0 -1
  74. package/dist/cjs/serialization/resources/transcripts/types/index.js +0 -1
  75. package/dist/cjs/serialization/types/DocumentsContext.d.ts +13 -6
  76. package/dist/cjs/serialization/types/DocumentsContext.js +12 -5
  77. package/dist/cjs/serialization/types/DocumentsContextWithFacts.d.ts +13 -0
  78. package/dist/cjs/serialization/{resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.js → types/DocumentsContextWithFacts.js} +6 -3
  79. package/dist/cjs/serialization/types/DocumentsContextWithString.d.ts +12 -0
  80. package/dist/cjs/serialization/types/{DocumentsContextTypeEnum.js → DocumentsContextWithString.js} +4 -2
  81. package/dist/cjs/serialization/types/DocumentsContextWithTranscript.d.ts +13 -0
  82. package/dist/cjs/serialization/types/{DocumentsContextData.js → DocumentsContextWithTranscript.js} +4 -7
  83. package/dist/cjs/serialization/types/DocumentsTemplate.d.ts +4 -8
  84. package/dist/cjs/serialization/types/DocumentsTemplate.js +3 -7
  85. package/dist/cjs/serialization/types/DocumentsTemplateWithSectionIds.d.ts +15 -0
  86. package/dist/cjs/serialization/types/DocumentsTemplateWithSectionIds.js +46 -0
  87. package/dist/cjs/serialization/types/DocumentsTemplateWithSectionKeys.d.ts +14 -0
  88. package/dist/cjs/serialization/types/DocumentsTemplateWithSectionKeys.js +45 -0
  89. package/dist/cjs/serialization/types/StreamSupportedLanguage.d.ts +1 -1
  90. package/dist/cjs/serialization/types/StreamSupportedLanguage.js +1 -16
  91. package/dist/cjs/serialization/types/TemplatesSection.d.ts +2 -2
  92. package/dist/cjs/serialization/types/TemplatesSection.js +2 -2
  93. package/dist/cjs/serialization/types/TemplatesSectionTranslation.d.ts +14 -0
  94. package/dist/cjs/serialization/types/TemplatesSectionTranslation.js +45 -0
  95. package/dist/cjs/serialization/types/TemplatesTranslation.d.ts +2 -2
  96. package/dist/cjs/serialization/types/TemplatesTranslation.js +2 -2
  97. package/dist/cjs/serialization/types/TranscribeSupportedLanguage.d.ts +1 -1
  98. package/dist/cjs/serialization/types/TranscribeSupportedLanguage.js +1 -16
  99. package/dist/cjs/serialization/types/index.d.ts +6 -2
  100. package/dist/cjs/serialization/types/index.js +6 -2
  101. package/dist/cjs/version.d.ts +1 -1
  102. package/dist/cjs/version.js +1 -1
  103. package/dist/esm/Client.mjs +2 -2
  104. package/dist/esm/api/resources/recordings/client/Client.d.mts +2 -4
  105. package/dist/esm/api/resources/recordings/client/Client.mjs +7 -6
  106. package/dist/esm/api/resources/transcripts/client/requests/TranscriptsCreateRequest.d.mts +1 -1
  107. package/dist/esm/api/resources/transcripts/types/index.d.mts +0 -1
  108. package/dist/esm/api/resources/transcripts/types/index.mjs +0 -1
  109. package/dist/esm/api/types/DocumentsContext.d.mts +11 -5
  110. package/dist/esm/api/types/DocumentsContextWithFacts.d.mts +8 -0
  111. package/dist/esm/api/types/DocumentsContextWithString.d.mts +7 -0
  112. package/dist/esm/api/types/DocumentsContextWithString.mjs +4 -0
  113. package/dist/esm/api/types/DocumentsContextWithTranscript.d.mts +8 -0
  114. package/dist/esm/api/types/DocumentsContextWithTranscript.mjs +4 -0
  115. package/dist/esm/api/types/DocumentsCreateRequestWithTemplate.d.mts +1 -1
  116. package/dist/esm/api/types/DocumentsCreateRequestWithTemplateId.d.mts +1 -1
  117. package/dist/esm/api/types/DocumentsCreateRequestWithTemplateKey.d.mts +1 -1
  118. package/dist/esm/api/types/DocumentsTemplate.d.mts +1 -10
  119. package/dist/esm/api/types/DocumentsTemplateWithSectionIds.d.mts +12 -0
  120. package/dist/esm/api/types/DocumentsTemplateWithSectionIds.mjs +4 -0
  121. package/dist/esm/api/types/DocumentsTemplateWithSectionKeys.d.mts +11 -0
  122. package/dist/esm/api/types/DocumentsTemplateWithSectionKeys.mjs +4 -0
  123. package/dist/esm/api/types/StreamSupportedLanguage.d.mts +1 -17
  124. package/dist/esm/api/types/StreamSupportedLanguage.mjs +1 -16
  125. package/dist/esm/api/types/TemplatesSection.d.mts +1 -1
  126. package/dist/esm/api/types/TemplatesSectionTranslation.d.mts +11 -0
  127. package/dist/esm/api/types/TemplatesSectionTranslation.mjs +4 -0
  128. package/dist/esm/api/types/TemplatesTranslation.d.mts +2 -2
  129. package/dist/esm/api/types/TranscribeSupportedLanguage.d.mts +1 -17
  130. package/dist/esm/api/types/TranscribeSupportedLanguage.mjs +1 -16
  131. package/dist/esm/api/types/index.d.mts +6 -2
  132. package/dist/esm/api/types/index.mjs +6 -2
  133. package/dist/esm/core/exports.d.mts +1 -0
  134. package/dist/esm/core/exports.mjs +1 -0
  135. package/dist/esm/core/fetcher/BinaryResponse.d.mts +7 -4
  136. package/dist/esm/core/fetcher/BinaryResponse.mjs +5 -2
  137. package/dist/esm/core/fetcher/Fetcher.mjs +3 -3
  138. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
  139. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +41 -0
  140. package/dist/esm/core/fetcher/getResponseBody.mjs +2 -1
  141. package/dist/esm/core/file/exports.d.mts +1 -0
  142. package/dist/esm/core/file/exports.mjs +1 -0
  143. package/dist/esm/core/file/file.d.mts +5 -0
  144. package/dist/esm/core/file/file.mjs +173 -0
  145. package/dist/esm/core/file/index.d.mts +2 -0
  146. package/dist/esm/core/file/index.mjs +2 -0
  147. package/dist/esm/core/file/types.d.mts +66 -0
  148. package/dist/esm/core/file/types.mjs +1 -0
  149. package/dist/esm/core/index.d.mts +1 -0
  150. package/dist/esm/core/index.mjs +1 -0
  151. package/dist/esm/core/schemas/utils/maybeSkipValidation.mjs +1 -1
  152. package/dist/esm/core/url/join.mjs +23 -3
  153. package/dist/esm/core/websocket/ws.mjs +1 -1
  154. package/dist/esm/custom/CortiAuth.d.mts +8 -0
  155. package/dist/esm/custom/CortiAuth.mjs +7 -0
  156. package/dist/esm/custom/CortiClient.d.mts +4 -1
  157. package/dist/esm/custom/CortiClient.mjs +2 -1
  158. package/dist/esm/custom/CustomStream.d.mts +3 -1
  159. package/dist/esm/custom/CustomStream.mjs +22 -2
  160. package/dist/esm/custom/CustomStreamSocket.d.mts +5 -1
  161. package/dist/esm/custom/CustomStreamSocket.mjs +8 -0
  162. package/dist/esm/custom/CustomTranscribe.d.mts +3 -1
  163. package/dist/esm/custom/CustomTranscribe.mjs +22 -2
  164. package/dist/esm/custom/CustomTranscribeSocket.d.mts +5 -1
  165. package/dist/esm/custom/CustomTranscribeSocket.mjs +8 -0
  166. package/dist/esm/custom/utils/getEnvironmentFromString.d.mts +6 -0
  167. package/dist/esm/custom/utils/getEnvironmentFromString.mjs +9 -0
  168. package/dist/esm/environments.d.mts +1 -6
  169. package/dist/esm/environments.mjs +0 -5
  170. package/dist/esm/exports.d.mts +1 -0
  171. package/dist/esm/exports.mjs +1 -0
  172. package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.d.mts +1 -2
  173. package/dist/esm/serialization/resources/transcripts/client/requests/TranscriptsCreateRequest.mjs +1 -2
  174. package/dist/esm/serialization/resources/transcripts/types/index.d.mts +0 -1
  175. package/dist/esm/serialization/resources/transcripts/types/index.mjs +0 -1
  176. package/dist/esm/serialization/types/DocumentsContext.d.mts +13 -6
  177. package/dist/esm/serialization/types/DocumentsContext.mjs +12 -5
  178. package/dist/esm/serialization/types/DocumentsContextWithFacts.d.mts +13 -0
  179. package/dist/esm/serialization/types/DocumentsContextWithFacts.mjs +8 -0
  180. package/dist/esm/serialization/types/DocumentsContextWithString.d.mts +12 -0
  181. package/dist/esm/serialization/types/{DocumentsContextTypeEnum.mjs → DocumentsContextWithString.mjs} +3 -1
  182. package/dist/esm/serialization/types/DocumentsContextWithTranscript.d.mts +13 -0
  183. package/dist/esm/serialization/types/DocumentsContextWithTranscript.mjs +8 -0
  184. package/dist/esm/serialization/types/DocumentsTemplate.d.mts +4 -8
  185. package/dist/esm/serialization/types/DocumentsTemplate.mjs +3 -7
  186. package/dist/esm/serialization/types/DocumentsTemplateWithSectionIds.d.mts +15 -0
  187. package/dist/esm/serialization/types/DocumentsTemplateWithSectionIds.mjs +10 -0
  188. package/dist/esm/serialization/types/DocumentsTemplateWithSectionKeys.d.mts +14 -0
  189. package/dist/esm/serialization/types/DocumentsTemplateWithSectionKeys.mjs +9 -0
  190. package/dist/esm/serialization/types/StreamSupportedLanguage.d.mts +1 -1
  191. package/dist/esm/serialization/types/StreamSupportedLanguage.mjs +1 -16
  192. package/dist/esm/serialization/types/TemplatesSection.d.mts +2 -2
  193. package/dist/esm/serialization/types/TemplatesSection.mjs +2 -2
  194. package/dist/esm/serialization/types/TemplatesSectionTranslation.d.mts +14 -0
  195. package/dist/esm/serialization/types/TemplatesSectionTranslation.mjs +9 -0
  196. package/dist/esm/serialization/types/TemplatesTranslation.d.mts +2 -2
  197. package/dist/esm/serialization/types/TemplatesTranslation.mjs +2 -2
  198. package/dist/esm/serialization/types/TranscribeSupportedLanguage.d.mts +1 -1
  199. package/dist/esm/serialization/types/TranscribeSupportedLanguage.mjs +1 -16
  200. package/dist/esm/serialization/types/index.d.mts +6 -2
  201. package/dist/esm/serialization/types/index.mjs +6 -2
  202. package/dist/esm/version.d.mts +1 -1
  203. package/dist/esm/version.mjs +1 -1
  204. package/package.json +4 -3
  205. package/reference.md +1 -1
  206. package/dist/cjs/api/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.d.ts +0 -21
  207. package/dist/cjs/api/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.js +0 -20
  208. package/dist/cjs/api/types/DocumentsContextData.d.ts +0 -14
  209. package/dist/cjs/api/types/DocumentsContextTypeEnum.d.ts +0 -9
  210. package/dist/cjs/api/types/DocumentsContextTypeEnum.js +0 -11
  211. package/dist/cjs/serialization/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.d.ts +0 -10
  212. package/dist/cjs/serialization/types/DocumentsContextData.d.ts +0 -12
  213. package/dist/cjs/serialization/types/DocumentsContextTypeEnum.d.ts +0 -10
  214. package/dist/esm/api/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.d.mts +0 -21
  215. package/dist/esm/api/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.mjs +0 -17
  216. package/dist/esm/api/types/DocumentsContextData.d.mts +0 -14
  217. package/dist/esm/api/types/DocumentsContextTypeEnum.d.mts +0 -9
  218. package/dist/esm/api/types/DocumentsContextTypeEnum.mjs +0 -8
  219. package/dist/esm/serialization/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.d.mts +0 -10
  220. package/dist/esm/serialization/resources/transcripts/types/TranscriptsCreateRequestPrimaryLanguage.mjs +0 -5
  221. package/dist/esm/serialization/types/DocumentsContextData.d.mts +0 -12
  222. package/dist/esm/serialization/types/DocumentsContextData.mjs +0 -11
  223. package/dist/esm/serialization/types/DocumentsContextTypeEnum.d.mts +0 -10
  224. /package/dist/cjs/api/types/{DocumentsContextData.js → DocumentsContextWithFacts.js} +0 -0
  225. /package/dist/esm/api/types/{DocumentsContextData.mjs → DocumentsContextWithFacts.mjs} +0 -0
@@ -22,4 +22,12 @@ export class TranscribeSocket extends FernTranscribeSocket {
22
22
  throw new Error("Socket is not open.");
23
23
  }
24
24
  }
25
+ /**
26
+ * Patch: added ability to remove event handlers
27
+ */
28
+ off(event, callback) {
29
+ if (!callback || callback === this.eventHandlers[event]) {
30
+ delete this.eventHandlers[event];
31
+ }
32
+ }
25
33
  }
@@ -0,0 +1,6 @@
1
+ import * as core from "../../core/index.mjs";
2
+ import * as environments from "../../environments.mjs";
3
+ type Environment = core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls> | string;
4
+ type CortiEnvironment = core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
5
+ export declare function getEnvironment(environment: Environment): CortiEnvironment;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ export function getEnvironment(environment) {
2
+ return typeof environment === "string"
3
+ ? {
4
+ base: `https://api.${environment}.corti.app/v2`,
5
+ wss: `wss://api.${environment}.corti.app`,
6
+ login: `https://auth.${environment}.corti.app/realms`,
7
+ }
8
+ : environment;
9
+ }
@@ -7,11 +7,6 @@ export interface CortiEnvironmentUrls {
7
7
  login: string;
8
8
  }
9
9
  export declare const CortiEnvironment: {
10
- readonly BetaEu: {
11
- readonly base: "https://api.beta-eu.corti.app/v2";
12
- readonly wss: "wss://api.beta-eu.corti.app";
13
- readonly login: "https://auth.beta-eu.corti.app/realms";
14
- };
15
10
  readonly Eu: {
16
11
  readonly base: "https://api.eu.corti.app/v2";
17
12
  readonly wss: "wss://api.eu.corti.app";
@@ -23,4 +18,4 @@ export declare const CortiEnvironment: {
23
18
  readonly login: "https://auth.us.corti.app/realms";
24
19
  };
25
20
  };
26
- export type CortiEnvironment = typeof CortiEnvironment.BetaEu | typeof CortiEnvironment.Eu | typeof CortiEnvironment.Us;
21
+ export type CortiEnvironment = typeof CortiEnvironment.Eu | typeof CortiEnvironment.Us;
@@ -2,11 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export const CortiEnvironment = {
5
- BetaEu: {
6
- base: "https://api.beta-eu.corti.app/v2",
7
- wss: "wss://api.beta-eu.corti.app",
8
- login: "https://auth.beta-eu.corti.app/realms",
9
- },
10
5
  Eu: {
11
6
  base: "https://api.eu.corti.app/v2",
12
7
  wss: "wss://api.eu.corti.app",
@@ -0,0 +1 @@
1
+ export * from "./core/exports.mjs";
@@ -0,0 +1 @@
1
+ export * from "./core/exports.mjs";
@@ -5,14 +5,13 @@ import * as serializers from "../../../../index.mjs";
5
5
  import * as Corti from "../../../../../api/index.mjs";
6
6
  import * as core from "../../../../../core/index.mjs";
7
7
  import { Uuid } from "../../../../types/Uuid.mjs";
8
- import { TranscriptsCreateRequestPrimaryLanguage } from "../../types/TranscriptsCreateRequestPrimaryLanguage.mjs";
9
8
  import { TranscriptsParticipant } from "../../../../types/TranscriptsParticipant.mjs";
10
9
  import { TranscriptsCreateRequestModelName } from "../../types/TranscriptsCreateRequestModelName.mjs";
11
10
  export declare const TranscriptsCreateRequest: core.serialization.Schema<serializers.TranscriptsCreateRequest.Raw, Corti.TranscriptsCreateRequest>;
12
11
  export declare namespace TranscriptsCreateRequest {
13
12
  interface Raw {
14
13
  recordingId: Uuid.Raw;
15
- primaryLanguage: TranscriptsCreateRequestPrimaryLanguage.Raw;
14
+ primaryLanguage: string;
16
15
  isDictation?: boolean | null;
17
16
  isMultichannel?: boolean | null;
18
17
  diarize?: boolean | null;
@@ -3,12 +3,11 @@
3
3
  */
4
4
  import * as core from "../../../../../core/index.mjs";
5
5
  import { Uuid } from "../../../../types/Uuid.mjs";
6
- import { TranscriptsCreateRequestPrimaryLanguage } from "../../types/TranscriptsCreateRequestPrimaryLanguage.mjs";
7
6
  import { TranscriptsParticipant } from "../../../../types/TranscriptsParticipant.mjs";
8
7
  import { TranscriptsCreateRequestModelName } from "../../types/TranscriptsCreateRequestModelName.mjs";
9
8
  export const TranscriptsCreateRequest = core.serialization.object({
10
9
  recordingId: Uuid,
11
- primaryLanguage: TranscriptsCreateRequestPrimaryLanguage,
10
+ primaryLanguage: core.serialization.string(),
12
11
  isDictation: core.serialization.boolean().optional(),
13
12
  isMultichannel: core.serialization.boolean().optional(),
14
13
  diarize: core.serialization.boolean().optional(),
@@ -1,2 +1 @@
1
- export * from "./TranscriptsCreateRequestPrimaryLanguage.mjs";
2
1
  export * from "./TranscriptsCreateRequestModelName.mjs";
@@ -1,2 +1 @@
1
- export * from "./TranscriptsCreateRequestPrimaryLanguage.mjs";
2
1
  export * from "./TranscriptsCreateRequestModelName.mjs";
@@ -4,12 +4,19 @@
4
4
  import * as serializers from "../index.mjs";
5
5
  import * as Corti from "../../api/index.mjs";
6
6
  import * as core from "../../core/index.mjs";
7
- import { DocumentsContextTypeEnum } from "./DocumentsContextTypeEnum.mjs";
8
- import { DocumentsContextData } from "./DocumentsContextData.mjs";
9
- export declare const DocumentsContext: core.serialization.ObjectSchema<serializers.DocumentsContext.Raw, Corti.DocumentsContext>;
7
+ import { DocumentsContextWithFacts } from "./DocumentsContextWithFacts.mjs";
8
+ import { DocumentsContextWithTranscript } from "./DocumentsContextWithTranscript.mjs";
9
+ import { DocumentsContextWithString } from "./DocumentsContextWithString.mjs";
10
+ export declare const DocumentsContext: core.serialization.Schema<serializers.DocumentsContext.Raw, Corti.DocumentsContext>;
10
11
  export declare namespace DocumentsContext {
11
- interface Raw {
12
- type: DocumentsContextTypeEnum.Raw;
13
- data: DocumentsContextData.Raw;
12
+ type Raw = DocumentsContext.Facts | DocumentsContext.Transcript | DocumentsContext.String;
13
+ interface Facts extends DocumentsContextWithFacts.Raw {
14
+ type: "facts";
15
+ }
16
+ interface Transcript extends DocumentsContextWithTranscript.Raw {
17
+ type: "transcript";
18
+ }
19
+ interface String extends DocumentsContextWithString.Raw {
20
+ type: "string";
14
21
  }
15
22
  }
@@ -2,9 +2,16 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../core/index.mjs";
5
- import { DocumentsContextTypeEnum } from "./DocumentsContextTypeEnum.mjs";
6
- import { DocumentsContextData } from "./DocumentsContextData.mjs";
7
- export const DocumentsContext = core.serialization.object({
8
- type: DocumentsContextTypeEnum,
9
- data: DocumentsContextData,
5
+ import { DocumentsContextWithFacts } from "./DocumentsContextWithFacts.mjs";
6
+ import { DocumentsContextWithTranscript } from "./DocumentsContextWithTranscript.mjs";
7
+ import { DocumentsContextWithString } from "./DocumentsContextWithString.mjs";
8
+ export const DocumentsContext = core.serialization
9
+ .union("type", {
10
+ facts: DocumentsContextWithFacts,
11
+ transcript: DocumentsContextWithTranscript,
12
+ string: DocumentsContextWithString,
13
+ })
14
+ .transform({
15
+ transform: (value) => value,
16
+ untransform: (value) => value,
10
17
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index.mjs";
5
+ import * as Corti from "../../api/index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ import { FactsContext } from "./FactsContext.mjs";
8
+ export declare const DocumentsContextWithFacts: core.serialization.ObjectSchema<serializers.DocumentsContextWithFacts.Raw, Corti.DocumentsContextWithFacts>;
9
+ export declare namespace DocumentsContextWithFacts {
10
+ interface Raw {
11
+ data: FactsContext.Raw[];
12
+ }
13
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../core/index.mjs";
5
+ import { FactsContext } from "./FactsContext.mjs";
6
+ export const DocumentsContextWithFacts = core.serialization.object({
7
+ data: core.serialization.list(FactsContext),
8
+ });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index.mjs";
5
+ import * as Corti from "../../api/index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare const DocumentsContextWithString: core.serialization.ObjectSchema<serializers.DocumentsContextWithString.Raw, Corti.DocumentsContextWithString>;
8
+ export declare namespace DocumentsContextWithString {
9
+ interface Raw {
10
+ data: string;
11
+ }
12
+ }
@@ -2,4 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../core/index.mjs";
5
- export const DocumentsContextTypeEnum = core.serialization.enum_(["facts", "transcript", "string"]);
5
+ export const DocumentsContextWithString = core.serialization.object({
6
+ data: core.serialization.string(),
7
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index.mjs";
5
+ import * as Corti from "../../api/index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ import { CommonTranscript } from "./CommonTranscript.mjs";
8
+ export declare const DocumentsContextWithTranscript: core.serialization.ObjectSchema<serializers.DocumentsContextWithTranscript.Raw, Corti.DocumentsContextWithTranscript>;
9
+ export declare namespace DocumentsContextWithTranscript {
10
+ interface Raw {
11
+ data: CommonTranscript.Raw;
12
+ }
13
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../core/index.mjs";
5
+ import { CommonTranscript } from "./CommonTranscript.mjs";
6
+ export const DocumentsContextWithTranscript = core.serialization.object({
7
+ data: CommonTranscript,
8
+ });
@@ -4,13 +4,9 @@
4
4
  import * as serializers from "../index.mjs";
5
5
  import * as Corti from "../../api/index.mjs";
6
6
  import * as core from "../../core/index.mjs";
7
- import { Uuid } from "./Uuid.mjs";
8
- export declare const DocumentsTemplate: core.serialization.ObjectSchema<serializers.DocumentsTemplate.Raw, Corti.DocumentsTemplate>;
7
+ import { DocumentsTemplateWithSectionKeys } from "./DocumentsTemplateWithSectionKeys.mjs";
8
+ import { DocumentsTemplateWithSectionIds } from "./DocumentsTemplateWithSectionIds.mjs";
9
+ export declare const DocumentsTemplate: core.serialization.Schema<serializers.DocumentsTemplate.Raw, Corti.DocumentsTemplate>;
9
10
  export declare namespace DocumentsTemplate {
10
- interface Raw {
11
- sectionIds?: Uuid.Raw[] | null;
12
- sectionKeys?: string[] | null;
13
- documentName?: string | null;
14
- additionalInstructions?: string | null;
15
- }
11
+ type Raw = DocumentsTemplateWithSectionKeys.Raw | DocumentsTemplateWithSectionIds.Raw;
16
12
  }
@@ -2,10 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../core/index.mjs";
5
- import { Uuid } from "./Uuid.mjs";
6
- export const DocumentsTemplate = core.serialization.object({
7
- sectionIds: core.serialization.list(Uuid).optional(),
8
- sectionKeys: core.serialization.list(core.serialization.string()).optional(),
9
- documentName: core.serialization.string().optional(),
10
- additionalInstructions: core.serialization.string().optional(),
11
- });
5
+ import { DocumentsTemplateWithSectionKeys } from "./DocumentsTemplateWithSectionKeys.mjs";
6
+ import { DocumentsTemplateWithSectionIds } from "./DocumentsTemplateWithSectionIds.mjs";
7
+ export const DocumentsTemplate = core.serialization.undiscriminatedUnion([DocumentsTemplateWithSectionKeys, DocumentsTemplateWithSectionIds]);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index.mjs";
5
+ import * as Corti from "../../api/index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ import { Uuid } from "./Uuid.mjs";
8
+ export declare const DocumentsTemplateWithSectionIds: core.serialization.ObjectSchema<serializers.DocumentsTemplateWithSectionIds.Raw, Corti.DocumentsTemplateWithSectionIds>;
9
+ export declare namespace DocumentsTemplateWithSectionIds {
10
+ interface Raw {
11
+ sectionIds: Uuid.Raw[];
12
+ documentName?: string | null;
13
+ additionalInstructions?: string | null;
14
+ }
15
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../core/index.mjs";
5
+ import { Uuid } from "./Uuid.mjs";
6
+ export const DocumentsTemplateWithSectionIds = core.serialization.object({
7
+ sectionIds: core.serialization.list(Uuid),
8
+ documentName: core.serialization.string().optional(),
9
+ additionalInstructions: core.serialization.string().optional(),
10
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index.mjs";
5
+ import * as Corti from "../../api/index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare const DocumentsTemplateWithSectionKeys: core.serialization.ObjectSchema<serializers.DocumentsTemplateWithSectionKeys.Raw, Corti.DocumentsTemplateWithSectionKeys>;
8
+ export declare namespace DocumentsTemplateWithSectionKeys {
9
+ interface Raw {
10
+ sectionKeys: string[];
11
+ documentName?: string | null;
12
+ additionalInstructions?: string | null;
13
+ }
14
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../core/index.mjs";
5
+ export const DocumentsTemplateWithSectionKeys = core.serialization.object({
6
+ sectionKeys: core.serialization.list(core.serialization.string()),
7
+ documentName: core.serialization.string().optional(),
8
+ additionalInstructions: core.serialization.string().optional(),
9
+ });
@@ -6,5 +6,5 @@ import * as Corti from "../../api/index.mjs";
6
6
  import * as core from "../../core/index.mjs";
7
7
  export declare const StreamSupportedLanguage: core.serialization.Schema<serializers.StreamSupportedLanguage.Raw, Corti.StreamSupportedLanguage>;
8
8
  export declare namespace StreamSupportedLanguage {
9
- type Raw = "en" | "en-us" | "en-gb" | "da" | "se" | "no" | "de" | "nl" | "es" | "it" | "fr" | "pt" | "de-ch" | "sv";
9
+ type Raw = string;
10
10
  }
@@ -2,19 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../core/index.mjs";
5
- export const StreamSupportedLanguage = core.serialization.enum_([
6
- "en",
7
- "en-us",
8
- "en-gb",
9
- "da",
10
- "se",
11
- "no",
12
- "de",
13
- "nl",
14
- "es",
15
- "it",
16
- "fr",
17
- "pt",
18
- "de-ch",
19
- "sv",
20
- ]);
5
+ export const StreamSupportedLanguage = core.serialization.string();
@@ -5,7 +5,7 @@ import * as serializers from "../index.mjs";
5
5
  import * as Corti from "../../api/index.mjs";
6
6
  import * as core from "../../core/index.mjs";
7
7
  import { TemplatesWritingStyle } from "./TemplatesWritingStyle.mjs";
8
- import { TemplatesTranslation } from "./TemplatesTranslation.mjs";
8
+ import { TemplatesSectionTranslation } from "./TemplatesSectionTranslation.mjs";
9
9
  export declare const TemplatesSection: core.serialization.ObjectSchema<serializers.TemplatesSection.Raw, Corti.TemplatesSection>;
10
10
  export declare namespace TemplatesSection {
11
11
  interface Raw {
@@ -16,6 +16,6 @@ export declare namespace TemplatesSection {
16
16
  description: string;
17
17
  default_writing_style: TemplatesWritingStyle.Raw;
18
18
  section_type: string;
19
- translations: TemplatesTranslation.Raw[];
19
+ translations: TemplatesSectionTranslation.Raw[];
20
20
  }
21
21
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as core from "../../core/index.mjs";
5
5
  import { TemplatesWritingStyle } from "./TemplatesWritingStyle.mjs";
6
- import { TemplatesTranslation } from "./TemplatesTranslation.mjs";
6
+ import { TemplatesSectionTranslation } from "./TemplatesSectionTranslation.mjs";
7
7
  export const TemplatesSection = core.serialization.object({
8
8
  dateUpdated: core.serialization.property("date_updated", core.serialization.date().optionalNullable()),
9
9
  name: core.serialization.string(),
@@ -12,5 +12,5 @@ export const TemplatesSection = core.serialization.object({
12
12
  description: core.serialization.string(),
13
13
  defaultWritingStyle: core.serialization.property("default_writing_style", TemplatesWritingStyle),
14
14
  sectionType: core.serialization.property("section_type", core.serialization.string()),
15
- translations: core.serialization.list(TemplatesTranslation),
15
+ translations: core.serialization.list(TemplatesSectionTranslation),
16
16
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index.mjs";
5
+ import * as Corti from "../../api/index.mjs";
6
+ import * as core from "../../core/index.mjs";
7
+ export declare const TemplatesSectionTranslation: core.serialization.ObjectSchema<serializers.TemplatesSectionTranslation.Raw, Corti.TemplatesSectionTranslation>;
8
+ export declare namespace TemplatesSectionTranslation {
9
+ interface Raw {
10
+ languages_id: string;
11
+ name?: (string | null) | null;
12
+ description?: (string | null) | null;
13
+ }
14
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../core/index.mjs";
5
+ export const TemplatesSectionTranslation = core.serialization.object({
6
+ languagesId: core.serialization.property("languages_id", core.serialization.string()),
7
+ name: core.serialization.string().optionalNullable(),
8
+ description: core.serialization.string().optionalNullable(),
9
+ });
@@ -8,7 +8,7 @@ export declare const TemplatesTranslation: core.serialization.ObjectSchema<seria
8
8
  export declare namespace TemplatesTranslation {
9
9
  interface Raw {
10
10
  languages_id: string;
11
- name?: (string | null) | null;
12
- description?: (string | null) | null;
11
+ name?: string | null;
12
+ description?: string | null;
13
13
  }
14
14
  }
@@ -4,6 +4,6 @@
4
4
  import * as core from "../../core/index.mjs";
5
5
  export const TemplatesTranslation = core.serialization.object({
6
6
  languagesId: core.serialization.property("languages_id", core.serialization.string()),
7
- name: core.serialization.string().optionalNullable(),
8
- description: core.serialization.string().optionalNullable(),
7
+ name: core.serialization.string().optional(),
8
+ description: core.serialization.string().optional(),
9
9
  });
@@ -6,5 +6,5 @@ import * as Corti from "../../api/index.mjs";
6
6
  import * as core from "../../core/index.mjs";
7
7
  export declare const TranscribeSupportedLanguage: core.serialization.Schema<serializers.TranscribeSupportedLanguage.Raw, Corti.TranscribeSupportedLanguage>;
8
8
  export declare namespace TranscribeSupportedLanguage {
9
- type Raw = "en" | "en-us" | "en-gb" | "da" | "se" | "no" | "de" | "nl" | "es" | "it" | "fr" | "pt" | "de-ch" | "sv";
9
+ type Raw = string;
10
10
  }
@@ -2,19 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../core/index.mjs";
5
- export const TranscribeSupportedLanguage = core.serialization.enum_([
6
- "en",
7
- "en-us",
8
- "en-gb",
9
- "da",
10
- "se",
11
- "no",
12
- "de",
13
- "nl",
14
- "es",
15
- "it",
16
- "fr",
17
- "pt",
18
- "de-ch",
19
- "sv",
20
- ]);
5
+ export const TranscribeSupportedLanguage = core.serialization.string();
@@ -1,7 +1,11 @@
1
1
  export * from "./DocumentsContext.mjs";
2
- export * from "./DocumentsContextData.mjs";
2
+ export * from "./DocumentsContextWithFacts.mjs";
3
+ export * from "./DocumentsContextWithTranscript.mjs";
4
+ export * from "./DocumentsContextWithString.mjs";
3
5
  export * from "./DocumentsSection.mjs";
4
6
  export * from "./DocumentsTemplate.mjs";
7
+ export * from "./DocumentsTemplateWithSectionKeys.mjs";
8
+ export * from "./DocumentsTemplateWithSectionIds.mjs";
5
9
  export * from "./InteractionsEncounterCreateRequest.mjs";
6
10
  export * from "./InteractionsEncounterUpdateRequest.mjs";
7
11
  export * from "./InteractionsEncounterResponse.mjs";
@@ -49,13 +53,13 @@ export * from "./TemplatesSectionSorted.mjs";
49
53
  export * from "./CommonTranscript.mjs";
50
54
  export * from "./Uuid.mjs";
51
55
  export * from "./CommonUsageInfo.mjs";
52
- export * from "./DocumentsContextTypeEnum.mjs";
53
56
  export * from "./InteractionsEncounterStatusEnum.mjs";
54
57
  export * from "./InteractionsEncounterTypeEnum.mjs";
55
58
  export * from "./InteractionsGenderEnum.mjs";
56
59
  export * from "./CommonSourceEnum.mjs";
57
60
  export * from "./TranscriptsParticipantRoleEnum.mjs";
58
61
  export * from "./TemplatesWritingStyle.mjs";
62
+ export * from "./TemplatesSectionTranslation.mjs";
59
63
  export * from "./TemplatesTranslation.mjs";
60
64
  export * from "./StreamConfigMessage.mjs";
61
65
  export * from "./StreamConfig.mjs";
@@ -1,7 +1,11 @@
1
1
  export * from "./DocumentsContext.mjs";
2
- export * from "./DocumentsContextData.mjs";
2
+ export * from "./DocumentsContextWithFacts.mjs";
3
+ export * from "./DocumentsContextWithTranscript.mjs";
4
+ export * from "./DocumentsContextWithString.mjs";
3
5
  export * from "./DocumentsSection.mjs";
4
6
  export * from "./DocumentsTemplate.mjs";
7
+ export * from "./DocumentsTemplateWithSectionKeys.mjs";
8
+ export * from "./DocumentsTemplateWithSectionIds.mjs";
5
9
  export * from "./InteractionsEncounterCreateRequest.mjs";
6
10
  export * from "./InteractionsEncounterUpdateRequest.mjs";
7
11
  export * from "./InteractionsEncounterResponse.mjs";
@@ -49,13 +53,13 @@ export * from "./TemplatesSectionSorted.mjs";
49
53
  export * from "./CommonTranscript.mjs";
50
54
  export * from "./Uuid.mjs";
51
55
  export * from "./CommonUsageInfo.mjs";
52
- export * from "./DocumentsContextTypeEnum.mjs";
53
56
  export * from "./InteractionsEncounterStatusEnum.mjs";
54
57
  export * from "./InteractionsEncounterTypeEnum.mjs";
55
58
  export * from "./InteractionsGenderEnum.mjs";
56
59
  export * from "./CommonSourceEnum.mjs";
57
60
  export * from "./TranscriptsParticipantRoleEnum.mjs";
58
61
  export * from "./TemplatesWritingStyle.mjs";
62
+ export * from "./TemplatesSectionTranslation.mjs";
59
63
  export * from "./TemplatesTranslation.mjs";
60
64
  export * from "./StreamConfigMessage.mjs";
61
65
  export * from "./StreamConfig.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.0-alpha.rc";
1
+ export declare const SDK_VERSION = "0.1.0-rc.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.0-alpha.rc";
1
+ export const SDK_VERSION = "0.1.0-rc.1";
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@corti/sdk",
3
- "version": "0.1.0-alpha.rc",
3
+ "version": "0.1.0-rc.1",
4
4
  "private": false,
5
- "repository": "github:corticph/corti-sdk-typescript",
5
+ "repository": "github:corticph/corti-sdk-javascript",
6
6
  "license": "MIT",
7
7
  "type": "commonjs",
8
8
  "main": "./dist/cjs/index.js",
@@ -66,7 +66,8 @@
66
66
  "msw": "^2.8.4",
67
67
  "@types/node": "^18.19.70",
68
68
  "prettier": "^3.4.2",
69
- "typescript": "~5.7.2"
69
+ "typescript": "~5.7.2",
70
+ "@faker-js/faker": "^9.9.0"
70
71
  },
71
72
  "browser": {
72
73
  "fs": false,
package/reference.md CHANGED
@@ -36,7 +36,7 @@ for await (const item of response) {
36
36
  }
37
37
 
38
38
  // Or you can manually iterate page-by-page
39
- const page = await client.interactions.list();
39
+ let page = await client.interactions.list();
40
40
  while (page.hasNextPage()) {
41
41
  page = page.getNextPage();
42
42
  }
@@ -1,21 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * The primary spoken language of the recording. Check https://docs.corti.ai/about/languages for more.
6
- */
7
- export type TranscriptsCreateRequestPrimaryLanguage = "en" | "en-GB" | "da" | "de" | "fr" | "sv" | "de-CH" | "no" | "es" | "it" | "nl" | "pt";
8
- export declare const TranscriptsCreateRequestPrimaryLanguage: {
9
- readonly En: "en";
10
- readonly EnGb: "en-GB";
11
- readonly Da: "da";
12
- readonly De: "de";
13
- readonly Fr: "fr";
14
- readonly Sv: "sv";
15
- readonly DeCh: "de-CH";
16
- readonly No: "no";
17
- readonly Es: "es";
18
- readonly It: "it";
19
- readonly Nl: "nl";
20
- readonly Pt: "pt";
21
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TranscriptsCreateRequestPrimaryLanguage = void 0;
7
- exports.TranscriptsCreateRequestPrimaryLanguage = {
8
- En: "en",
9
- EnGb: "en-GB",
10
- Da: "da",
11
- De: "de",
12
- Fr: "fr",
13
- Sv: "sv",
14
- DeCh: "de-CH",
15
- No: "no",
16
- Es: "es",
17
- It: "it",
18
- Nl: "nl",
19
- Pt: "pt",
20
- };
@@ -1,14 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Corti from "../index.js";
5
- export type DocumentsContextData =
6
- /**
7
- * Facts */
8
- Corti.FactsContext[]
9
- /**
10
- * Transcript */
11
- | Corti.CommonTranscript
12
- /**
13
- * Text */
14
- | string;