@corti/sdk 0.1.0-alpha → 0.1.0-rc

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 +203 -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 +167 -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
@@ -40,6 +40,6 @@ exports.TemplatesTranslation = void 0;
40
40
  const core = __importStar(require("../../core/index.js"));
41
41
  exports.TemplatesTranslation = core.serialization.object({
42
42
  languagesId: core.serialization.property("languages_id", core.serialization.string()),
43
- name: core.serialization.string().optionalNullable(),
44
- description: core.serialization.string().optionalNullable(),
43
+ name: core.serialization.string().optional(),
44
+ description: core.serialization.string().optional(),
45
45
  });
@@ -6,5 +6,5 @@ import * as Corti from "../../api/index.js";
6
6
  import * as core from "../../core/index.js";
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
  }
@@ -38,19 +38,4 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.TranscribeSupportedLanguage = void 0;
40
40
  const core = __importStar(require("../../core/index.js"));
41
- exports.TranscribeSupportedLanguage = core.serialization.enum_([
42
- "en",
43
- "en-us",
44
- "en-gb",
45
- "da",
46
- "se",
47
- "no",
48
- "de",
49
- "nl",
50
- "es",
51
- "it",
52
- "fr",
53
- "pt",
54
- "de-ch",
55
- "sv",
56
- ]);
41
+ exports.TranscribeSupportedLanguage = core.serialization.string();
@@ -1,7 +1,11 @@
1
1
  export * from "./DocumentsContext.js";
2
- export * from "./DocumentsContextData.js";
2
+ export * from "./DocumentsContextWithFacts.js";
3
+ export * from "./DocumentsContextWithTranscript.js";
4
+ export * from "./DocumentsContextWithString.js";
3
5
  export * from "./DocumentsSection.js";
4
6
  export * from "./DocumentsTemplate.js";
7
+ export * from "./DocumentsTemplateWithSectionKeys.js";
8
+ export * from "./DocumentsTemplateWithSectionIds.js";
5
9
  export * from "./InteractionsEncounterCreateRequest.js";
6
10
  export * from "./InteractionsEncounterUpdateRequest.js";
7
11
  export * from "./InteractionsEncounterResponse.js";
@@ -49,13 +53,13 @@ export * from "./TemplatesSectionSorted.js";
49
53
  export * from "./CommonTranscript.js";
50
54
  export * from "./Uuid.js";
51
55
  export * from "./CommonUsageInfo.js";
52
- export * from "./DocumentsContextTypeEnum.js";
53
56
  export * from "./InteractionsEncounterStatusEnum.js";
54
57
  export * from "./InteractionsEncounterTypeEnum.js";
55
58
  export * from "./InteractionsGenderEnum.js";
56
59
  export * from "./CommonSourceEnum.js";
57
60
  export * from "./TranscriptsParticipantRoleEnum.js";
58
61
  export * from "./TemplatesWritingStyle.js";
62
+ export * from "./TemplatesSectionTranslation.js";
59
63
  export * from "./TemplatesTranslation.js";
60
64
  export * from "./StreamConfigMessage.js";
61
65
  export * from "./StreamConfig.js";
@@ -15,9 +15,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./DocumentsContext.js"), exports);
18
- __exportStar(require("./DocumentsContextData.js"), exports);
18
+ __exportStar(require("./DocumentsContextWithFacts.js"), exports);
19
+ __exportStar(require("./DocumentsContextWithTranscript.js"), exports);
20
+ __exportStar(require("./DocumentsContextWithString.js"), exports);
19
21
  __exportStar(require("./DocumentsSection.js"), exports);
20
22
  __exportStar(require("./DocumentsTemplate.js"), exports);
23
+ __exportStar(require("./DocumentsTemplateWithSectionKeys.js"), exports);
24
+ __exportStar(require("./DocumentsTemplateWithSectionIds.js"), exports);
21
25
  __exportStar(require("./InteractionsEncounterCreateRequest.js"), exports);
22
26
  __exportStar(require("./InteractionsEncounterUpdateRequest.js"), exports);
23
27
  __exportStar(require("./InteractionsEncounterResponse.js"), exports);
@@ -65,13 +69,13 @@ __exportStar(require("./TemplatesSectionSorted.js"), exports);
65
69
  __exportStar(require("./CommonTranscript.js"), exports);
66
70
  __exportStar(require("./Uuid.js"), exports);
67
71
  __exportStar(require("./CommonUsageInfo.js"), exports);
68
- __exportStar(require("./DocumentsContextTypeEnum.js"), exports);
69
72
  __exportStar(require("./InteractionsEncounterStatusEnum.js"), exports);
70
73
  __exportStar(require("./InteractionsEncounterTypeEnum.js"), exports);
71
74
  __exportStar(require("./InteractionsGenderEnum.js"), exports);
72
75
  __exportStar(require("./CommonSourceEnum.js"), exports);
73
76
  __exportStar(require("./TranscriptsParticipantRoleEnum.js"), exports);
74
77
  __exportStar(require("./TemplatesWritingStyle.js"), exports);
78
+ __exportStar(require("./TemplatesSectionTranslation.js"), exports);
75
79
  __exportStar(require("./TemplatesTranslation.js"), exports);
76
80
  __exportStar(require("./StreamConfigMessage.js"), exports);
77
81
  __exportStar(require("./StreamConfig.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.0-alpha";
1
+ export declare const SDK_VERSION = "0.1.0-rc";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.0-alpha";
4
+ exports.SDK_VERSION = "0.1.0-rc";
@@ -27,8 +27,8 @@ export class CortiClient {
27
27
  "Tenant-Name": _options === null || _options === void 0 ? void 0 : _options.tenantName,
28
28
  "X-Fern-Language": "JavaScript",
29
29
  "X-Fern-SDK-Name": "@corti/sdk",
30
- "X-Fern-SDK-Version": "0.1.0-alpha",
31
- "User-Agent": "@corti/sdk/0.1.0-alpha",
30
+ "X-Fern-SDK-Version": "0.1.0-rc",
31
+ "User-Agent": "@corti/sdk/0.1.0-rc",
32
32
  "X-Fern-Runtime": core.RUNTIME.type,
33
33
  "X-Fern-Runtime-Version": core.RUNTIME.version,
34
34
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -4,8 +4,6 @@
4
4
  import * as environments from "../../../../environments.mjs";
5
5
  import * as core from "../../../../core/index.mjs";
6
6
  import * as Corti from "../../../index.mjs";
7
- import * as fs from "fs";
8
- import { Blob } from "buffer";
9
7
  export declare namespace Recordings {
10
8
  interface Options {
11
9
  environment: core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
@@ -52,7 +50,7 @@ export declare class Recordings {
52
50
  /**
53
51
  * Upload a recording for a given interaction. There is a maximum limit of 60 minutes in length and 150MB in size for recordings.
54
52
  *
55
- * @param {File | fs.ReadStream | Blob} bytes
53
+ * @param {core.file.Uploadable} uploadable
56
54
  * @param {Corti.Uuid} id
57
55
  * @param {Recordings.RequestOptions} requestOptions - Request-specific configuration.
58
56
  *
@@ -61,7 +59,7 @@ export declare class Recordings {
61
59
  * @throws {@link Corti.InternalServerError}
62
60
  * @throws {@link Corti.GatewayTimeoutError}
63
61
  */
64
- upload(bytes: File | fs.ReadStream | Blob, id: Corti.Uuid, requestOptions?: Recordings.RequestOptions): core.HttpResponsePromise<Corti.RecordingsCreateResponse>;
62
+ upload(uploadable: core.file.Uploadable, id: Corti.Uuid, requestOptions?: Recordings.RequestOptions): core.HttpResponsePromise<Corti.RecordingsCreateResponse>;
65
63
  private __upload;
66
64
  /**
67
65
  * Retrieve a specific recording for a given interaction.
@@ -112,7 +112,7 @@ export class Recordings {
112
112
  /**
113
113
  * Upload a recording for a given interaction. There is a maximum limit of 60 minutes in length and 150MB in size for recordings.
114
114
  *
115
- * @param {File | fs.ReadStream | Blob} bytes
115
+ * @param {core.file.Uploadable} uploadable
116
116
  * @param {Corti.Uuid} id
117
117
  * @param {Recordings.RequestOptions} requestOptions - Request-specific configuration.
118
118
  *
@@ -121,23 +121,24 @@ export class Recordings {
121
121
  * @throws {@link Corti.InternalServerError}
122
122
  * @throws {@link Corti.GatewayTimeoutError}
123
123
  */
124
- upload(bytes, id, requestOptions) {
125
- return core.HttpResponsePromise.fromPromise(this.__upload(bytes, id, requestOptions));
124
+ upload(uploadable, id, requestOptions) {
125
+ return core.HttpResponsePromise.fromPromise(this.__upload(uploadable, id, requestOptions));
126
126
  }
127
- __upload(bytes, id, requestOptions) {
127
+ __upload(uploadable, id, requestOptions) {
128
128
  return __awaiter(this, void 0, void 0, function* () {
129
129
  var _a, _b;
130
+ const _binaryUploadRequest = yield core.file.toBinaryUploadRequest(uploadable);
130
131
  const _response = yield core.fetcher({
131
132
  url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).base, `interactions/${encodeURIComponent(serializers.Uuid.jsonOrThrow(id, { omitUndefined: true }))}/recordings/`),
132
133
  method: "POST",
133
134
  headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
134
135
  Authorization: yield this._getAuthorizationHeader(),
135
136
  "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
136
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
137
+ }), _binaryUploadRequest.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
137
138
  contentType: "application/octet-stream",
138
139
  requestType: "bytes",
139
140
  duplex: "half",
140
- body: bytes,
141
+ body: _binaryUploadRequest.body,
141
142
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
142
143
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
143
144
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -14,7 +14,7 @@ export interface TranscriptsCreateRequest {
14
14
  /** The unique identifier for the recording. */
15
15
  recordingId: Corti.Uuid;
16
16
  /** The primary spoken language of the recording. Check https://docs.corti.ai/about/languages for more. */
17
- primaryLanguage: Corti.TranscriptsCreateRequestPrimaryLanguage;
17
+ primaryLanguage: string;
18
18
  /** Indicates whether spoken dictation commands should be converted to punctuation (e.g., 'comma' → ','). */
19
19
  isDictation?: boolean;
20
20
  /** If true, each audio channel is transcribed separately. */
@@ -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";
@@ -2,9 +2,15 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Corti from "../index.mjs";
5
- export interface DocumentsContext {
6
- /** The type of context data. */
7
- type: Corti.DocumentsContextTypeEnum;
8
- /** The actual data, which can be an array of facts, a transcript, or a string. */
9
- data: Corti.DocumentsContextData;
5
+ export type DocumentsContext = Corti.DocumentsContext.Facts | Corti.DocumentsContext.Transcript | Corti.DocumentsContext.String;
6
+ export declare namespace DocumentsContext {
7
+ interface Facts extends Corti.DocumentsContextWithFacts {
8
+ type: "facts";
9
+ }
10
+ interface Transcript extends Corti.DocumentsContextWithTranscript {
11
+ type: "transcript";
12
+ }
13
+ interface String extends Corti.DocumentsContextWithString {
14
+ type: "string";
15
+ }
10
16
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Corti from "../index.mjs";
5
+ export interface DocumentsContextWithFacts {
6
+ /** An array of facts. */
7
+ data: Corti.FactsContext[];
8
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DocumentsContextWithString {
5
+ /** String data. */
6
+ data: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Corti from "../index.mjs";
5
+ export interface DocumentsContextWithTranscript {
6
+ /** Transcript data. */
7
+ data: Corti.CommonTranscript;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Corti from "../index.mjs";
5
5
  export interface DocumentsCreateRequestWithTemplate {
6
- /** An array of context objects. */
6
+ /** An array of context objects. Currently accepts exactly one context object to be used as input for document generation. */
7
7
  context: Corti.DocumentsContext[];
8
8
  /** Template details if the template should be generated during the request. */
9
9
  template: Corti.DocumentsTemplate;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Corti from "../index.mjs";
5
5
  export interface DocumentsCreateRequestWithTemplateId {
6
- /** An array of context objects. */
6
+ /** An array of context objects. Currently accepts exactly one context object to be used as input for document generation. */
7
7
  context: Corti.DocumentsContext[];
8
8
  /** The UUID of the template to use. */
9
9
  templateId: Corti.Uuid;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Corti from "../index.mjs";
5
5
  export interface DocumentsCreateRequestWithTemplateKey {
6
- /** An array of context objects. */
6
+ /** An array of context objects. Currently accepts exactly one context object to be used as input for document generation. */
7
7
  context: Corti.DocumentsContext[];
8
8
  /** The key of the template that informs on what kind of document is to be generated. */
9
9
  templateKey: string;
@@ -2,13 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Corti from "../index.mjs";
5
- export interface DocumentsTemplate {
6
- /** An array of section IDs. */
7
- sectionIds?: Corti.Uuid[];
8
- /** An array of section keys. */
9
- sectionKeys?: string[];
10
- /** The name of the document. */
11
- documentName?: string;
12
- /** Any additional instructions to be considered during document generation. */
13
- additionalInstructions?: string;
14
- }
5
+ export type DocumentsTemplate = Corti.DocumentsTemplateWithSectionKeys | Corti.DocumentsTemplateWithSectionIds;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Corti from "../index.mjs";
5
+ export interface DocumentsTemplateWithSectionIds {
6
+ /** An array of section IDs. */
7
+ sectionIds: Corti.Uuid[];
8
+ /** The name of the document. */
9
+ documentName?: string;
10
+ /** Any additional instructions to be considered during document generation. */
11
+ additionalInstructions?: string;
12
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DocumentsTemplateWithSectionKeys {
5
+ /** An array of section keys. */
6
+ sectionKeys: string[];
7
+ /** The name of the document. */
8
+ documentName?: string;
9
+ /** Any additional instructions to be considered during document generation. */
10
+ additionalInstructions?: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -4,20 +4,4 @@
4
4
  /**
5
5
  * Supported language codes
6
6
  */
7
- export type StreamSupportedLanguage = "en" | "en-us" | "en-gb" | "da" | "se" | "no" | "de" | "nl" | "es" | "it" | "fr" | "pt" | "de-ch" | "sv";
8
- export declare const StreamSupportedLanguage: {
9
- readonly En: "en";
10
- readonly EnUs: "en-us";
11
- readonly EnGb: "en-gb";
12
- readonly Da: "da";
13
- readonly Se: "se";
14
- readonly No: "no";
15
- readonly De: "de";
16
- readonly Nl: "nl";
17
- readonly Es: "es";
18
- readonly It: "it";
19
- readonly Fr: "fr";
20
- readonly Pt: "pt";
21
- readonly DeCh: "de-ch";
22
- readonly Sv: "sv";
23
- };
7
+ export type StreamSupportedLanguage = string;
@@ -1,19 +1,4 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export const StreamSupportedLanguage = {
5
- En: "en",
6
- EnUs: "en-us",
7
- EnGb: "en-gb",
8
- Da: "da",
9
- Se: "se",
10
- No: "no",
11
- De: "de",
12
- Nl: "nl",
13
- Es: "es",
14
- It: "it",
15
- Fr: "fr",
16
- Pt: "pt",
17
- DeCh: "de-ch",
18
- Sv: "sv",
19
- };
4
+ export {};
@@ -18,5 +18,5 @@ export interface TemplatesSection {
18
18
  /** Type of section */
19
19
  sectionType: string;
20
20
  /** Available translations for the section */
21
- translations: Corti.TemplatesTranslation[];
21
+ translations: Corti.TemplatesSectionTranslation[];
22
22
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TemplatesSectionTranslation {
5
+ /** Language identifier */
6
+ languagesId: string;
7
+ /** Localized name */
8
+ name?: string | null;
9
+ /** Localized description */
10
+ description?: string | null;
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -5,7 +5,7 @@ export interface TemplatesTranslation {
5
5
  /** Language identifier */
6
6
  languagesId: string;
7
7
  /** Localized name */
8
- name?: string | null;
8
+ name?: string;
9
9
  /** Localized description */
10
- description?: string | null;
10
+ description?: string;
11
11
  }
@@ -4,20 +4,4 @@
4
4
  /**
5
5
  * Supported language codes for transcription
6
6
  */
7
- export type TranscribeSupportedLanguage = "en" | "en-us" | "en-gb" | "da" | "se" | "no" | "de" | "nl" | "es" | "it" | "fr" | "pt" | "de-ch" | "sv";
8
- export declare const TranscribeSupportedLanguage: {
9
- readonly En: "en";
10
- readonly EnUs: "en-us";
11
- readonly EnGb: "en-gb";
12
- readonly Da: "da";
13
- readonly Se: "se";
14
- readonly No: "no";
15
- readonly De: "de";
16
- readonly Nl: "nl";
17
- readonly Es: "es";
18
- readonly It: "it";
19
- readonly Fr: "fr";
20
- readonly Pt: "pt";
21
- readonly DeCh: "de-ch";
22
- readonly Sv: "sv";
23
- };
7
+ export type TranscribeSupportedLanguage = string;
@@ -1,19 +1,4 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export const TranscribeSupportedLanguage = {
5
- En: "en",
6
- EnUs: "en-us",
7
- EnGb: "en-gb",
8
- Da: "da",
9
- Se: "se",
10
- No: "no",
11
- De: "de",
12
- Nl: "nl",
13
- Es: "es",
14
- It: "it",
15
- Fr: "fr",
16
- Pt: "pt",
17
- DeCh: "de-ch",
18
- Sv: "sv",
19
- };
4
+ export {};
@@ -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";
@@ -0,0 +1 @@
1
+ export * from "./file/exports.mjs";
@@ -0,0 +1 @@
1
+ export * from "./file/exports.mjs";
@@ -1,5 +1,5 @@
1
1
  import { ResponseWithBody } from "./ResponseWithBody.mjs";
2
- export interface BinaryResponse {
2
+ export type BinaryResponse = {
3
3
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
4
4
  bodyUsed: boolean;
5
5
  /**
@@ -11,7 +11,10 @@ export interface BinaryResponse {
11
11
  arrayBuffer: () => Promise<ArrayBuffer>;
12
12
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
13
13
  blob: () => Promise<Blob>;
14
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */
15
- bytes(): Promise<Uint8Array>;
16
- }
14
+ /**
15
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
16
+ * Some versions of the Fetch API may not support this method.
17
+ */
18
+ bytes?(): Promise<Uint8Array>;
19
+ };
17
20
  export declare function getBinaryResponse(response: ResponseWithBody): BinaryResponse;
@@ -1,11 +1,14 @@
1
1
  export function getBinaryResponse(response) {
2
- return {
2
+ const binaryResponse = {
3
3
  get bodyUsed() {
4
4
  return response.bodyUsed;
5
5
  },
6
6
  stream: () => response.body,
7
7
  arrayBuffer: response.arrayBuffer.bind(response),
8
8
  blob: response.blob.bind(response),
9
- bytes: response.bytes.bind(response),
10
9
  };
10
+ if ("bytes" in response && typeof response.bytes === "function") {
11
+ binaryResponse.bytes = response.bytes.bind(response);
12
+ }
13
+ return binaryResponse;
11
14
  }
@@ -11,6 +11,7 @@ import { toJson } from "../json.mjs";
11
11
  import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
12
12
  import { Supplier } from "./Supplier.mjs";
13
13
  import { createRequestUrl } from "./createRequestUrl.mjs";
14
+ import { getErrorResponseBody } from "./getErrorResponseBody.mjs";
14
15
  import { getFetchFn } from "./getFetchFn.mjs";
15
16
  import { getRequestBody } from "./getRequestBody.mjs";
16
17
  import { getResponseBody } from "./getResponseBody.mjs";
@@ -51,11 +52,10 @@ export function fetcherImpl(args) {
51
52
  const response = yield requestWithRetries(() => __awaiter(this, void 0, void 0, function* () {
52
53
  return makeRequest(fetchFn, url, args.method, yield getHeaders(args), requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
53
54
  }), args.maxRetries);
54
- const responseBody = yield getResponseBody(response, args.responseType);
55
55
  if (response.status >= 200 && response.status < 400) {
56
56
  return {
57
57
  ok: true,
58
- body: responseBody,
58
+ body: (yield getResponseBody(response, args.responseType)),
59
59
  headers: response.headers,
60
60
  rawResponse: toRawResponse(response),
61
61
  };
@@ -66,7 +66,7 @@ export function fetcherImpl(args) {
66
66
  error: {
67
67
  reason: "status-code",
68
68
  statusCode: response.status,
69
- body: responseBody,
69
+ body: yield getErrorResponseBody(response),
70
70
  },
71
71
  rawResponse: toRawResponse(response),
72
72
  };
@@ -0,0 +1 @@
1
+ export declare function getErrorResponseBody(response: Response): Promise<unknown>;