@corti/sdk 1.2.0-rc → 1.2.0-templates-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateAgent.d.ts +0 -2
  4. package/dist/cjs/api/resources/agents/client/requests/AgentsUpdateAgent.d.ts +0 -2
  5. package/dist/cjs/api/resources/agents/types/AgentsUpdateAgentExpertsItem.d.ts +1 -1
  6. package/dist/cjs/api/resources/codes/client/Client.d.ts +1 -1
  7. package/dist/cjs/api/resources/codes/client/Client.js +1 -1
  8. package/dist/cjs/api/resources/stream/client/Socket.d.ts +1 -1
  9. package/dist/cjs/api/resources/transcribe/client/Socket.d.ts +1 -1
  10. package/dist/cjs/api/types/AgentsAgent.d.ts +0 -2
  11. package/dist/cjs/api/types/AgentsMcpServerTransportType.d.ts +0 -1
  12. package/dist/cjs/api/types/AgentsMcpServerTransportType.js +0 -1
  13. package/dist/cjs/api/types/AgentsRegistryExpert.d.ts +0 -4
  14. package/dist/cjs/api/types/CommonCodingSystemEnum.d.ts +0 -7
  15. package/dist/cjs/api/types/CommonCodingSystemEnum.js +0 -7
  16. package/dist/cjs/api/types/StreamConfigStatusMessageType.d.ts +1 -0
  17. package/dist/cjs/api/types/StreamConfigStatusMessageType.js +1 -0
  18. package/dist/cjs/api/types/TranscribeConfigStatusMessageType.d.ts +0 -2
  19. package/dist/cjs/api/types/TranscribeConfigStatusMessageType.js +0 -2
  20. package/dist/cjs/api/types/index.d.ts +0 -3
  21. package/dist/cjs/api/types/index.js +0 -3
  22. package/dist/cjs/custom/CortiClient.d.ts +69 -25
  23. package/dist/cjs/custom/CortiClient.js +0 -69
  24. package/dist/cjs/custom/auth/CortiAuth.d.ts +0 -27
  25. package/dist/cjs/custom/auth/CortiAuth.js +4 -10
  26. package/dist/cjs/custom/stream/CustomStream.js +3 -5
  27. package/dist/cjs/custom/transcribe/CustomTranscribe.js +2 -6
  28. package/dist/cjs/custom/utils/encodeHeadersAsWsProtocols.js +11 -2
  29. package/dist/cjs/serialization/resources/agents/client/requests/AgentsCreateAgent.d.ts +0 -2
  30. package/dist/cjs/serialization/resources/agents/client/requests/AgentsCreateAgent.js +0 -2
  31. package/dist/cjs/serialization/resources/agents/client/requests/AgentsUpdateAgent.d.ts +0 -2
  32. package/dist/cjs/serialization/resources/agents/client/requests/AgentsUpdateAgent.js +0 -2
  33. package/dist/cjs/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.d.ts +2 -2
  34. package/dist/cjs/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.js +2 -2
  35. package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.d.ts +2 -3
  36. package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.js +0 -2
  37. package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.ts +2 -3
  38. package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.js +0 -2
  39. package/dist/cjs/serialization/types/AgentsAgent.d.ts +0 -2
  40. package/dist/cjs/serialization/types/AgentsAgent.js +0 -2
  41. package/dist/cjs/serialization/types/AgentsMcpServerTransportType.d.ts +1 -1
  42. package/dist/cjs/serialization/types/AgentsMcpServerTransportType.js +1 -1
  43. package/dist/cjs/serialization/types/AgentsRegistryExpert.d.ts +0 -2
  44. package/dist/cjs/serialization/types/AgentsRegistryExpert.js +0 -2
  45. package/dist/cjs/serialization/types/CommonCodingSystemEnum.d.ts +1 -1
  46. package/dist/cjs/serialization/types/CommonCodingSystemEnum.js +0 -7
  47. package/dist/cjs/serialization/types/StreamConfigStatusMessageType.d.ts +1 -1
  48. package/dist/cjs/serialization/types/StreamConfigStatusMessageType.js +1 -0
  49. package/dist/cjs/serialization/types/TranscribeConfigStatusMessageType.d.ts +1 -1
  50. package/dist/cjs/serialization/types/TranscribeConfigStatusMessageType.js +1 -7
  51. package/dist/cjs/serialization/types/index.d.ts +0 -3
  52. package/dist/cjs/serialization/types/index.js +0 -3
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/BaseClient.mjs +2 -2
  56. package/dist/esm/api/resources/agents/client/requests/AgentsCreateAgent.d.mts +0 -2
  57. package/dist/esm/api/resources/agents/client/requests/AgentsUpdateAgent.d.mts +0 -2
  58. package/dist/esm/api/resources/agents/types/AgentsUpdateAgentExpertsItem.d.mts +1 -1
  59. package/dist/esm/api/resources/codes/client/Client.d.mts +1 -1
  60. package/dist/esm/api/resources/codes/client/Client.mjs +1 -1
  61. package/dist/esm/api/resources/stream/client/Socket.d.mts +1 -1
  62. package/dist/esm/api/resources/transcribe/client/Socket.d.mts +1 -1
  63. package/dist/esm/api/types/AgentsAgent.d.mts +0 -2
  64. package/dist/esm/api/types/AgentsMcpServerTransportType.d.mts +0 -1
  65. package/dist/esm/api/types/AgentsMcpServerTransportType.mjs +0 -1
  66. package/dist/esm/api/types/AgentsRegistryExpert.d.mts +0 -4
  67. package/dist/esm/api/types/CommonCodingSystemEnum.d.mts +0 -7
  68. package/dist/esm/api/types/CommonCodingSystemEnum.mjs +0 -7
  69. package/dist/esm/api/types/StreamConfigStatusMessageType.d.mts +1 -0
  70. package/dist/esm/api/types/StreamConfigStatusMessageType.mjs +1 -0
  71. package/dist/esm/api/types/TranscribeConfigStatusMessageType.d.mts +0 -2
  72. package/dist/esm/api/types/TranscribeConfigStatusMessageType.mjs +0 -2
  73. package/dist/esm/api/types/index.d.mts +0 -3
  74. package/dist/esm/api/types/index.mjs +0 -3
  75. package/dist/esm/custom/CortiClient.d.mts +69 -25
  76. package/dist/esm/custom/CortiClient.mjs +0 -36
  77. package/dist/esm/custom/auth/CortiAuth.d.mts +0 -27
  78. package/dist/esm/custom/auth/CortiAuth.mjs +4 -10
  79. package/dist/esm/custom/stream/CustomStream.mjs +3 -5
  80. package/dist/esm/custom/transcribe/CustomTranscribe.mjs +2 -6
  81. package/dist/esm/custom/utils/encodeHeadersAsWsProtocols.mjs +10 -1
  82. package/dist/esm/serialization/resources/agents/client/requests/AgentsCreateAgent.d.mts +0 -2
  83. package/dist/esm/serialization/resources/agents/client/requests/AgentsCreateAgent.mjs +0 -2
  84. package/dist/esm/serialization/resources/agents/client/requests/AgentsUpdateAgent.d.mts +0 -2
  85. package/dist/esm/serialization/resources/agents/client/requests/AgentsUpdateAgent.mjs +0 -2
  86. package/dist/esm/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.d.mts +2 -2
  87. package/dist/esm/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.mjs +2 -2
  88. package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.d.mts +2 -3
  89. package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.mjs +0 -2
  90. package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.mts +2 -3
  91. package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.mjs +0 -2
  92. package/dist/esm/serialization/types/AgentsAgent.d.mts +0 -2
  93. package/dist/esm/serialization/types/AgentsAgent.mjs +0 -2
  94. package/dist/esm/serialization/types/AgentsMcpServerTransportType.d.mts +1 -1
  95. package/dist/esm/serialization/types/AgentsMcpServerTransportType.mjs +1 -1
  96. package/dist/esm/serialization/types/AgentsRegistryExpert.d.mts +0 -2
  97. package/dist/esm/serialization/types/AgentsRegistryExpert.mjs +0 -2
  98. package/dist/esm/serialization/types/CommonCodingSystemEnum.d.mts +1 -1
  99. package/dist/esm/serialization/types/CommonCodingSystemEnum.mjs +0 -7
  100. package/dist/esm/serialization/types/StreamConfigStatusMessageType.d.mts +1 -1
  101. package/dist/esm/serialization/types/StreamConfigStatusMessageType.mjs +1 -0
  102. package/dist/esm/serialization/types/TranscribeConfigStatusMessageType.d.mts +1 -1
  103. package/dist/esm/serialization/types/TranscribeConfigStatusMessageType.mjs +1 -7
  104. package/dist/esm/serialization/types/index.d.mts +0 -3
  105. package/dist/esm/serialization/types/index.mjs +0 -3
  106. package/dist/esm/version.d.mts +1 -1
  107. package/dist/esm/version.mjs +1 -1
  108. package/package.json +1 -1
  109. package/dist/cjs/api/types/AgentsUpdateExpertReference.d.ts +0 -5
  110. package/dist/cjs/api/types/AgentsUpdateExpertReference.js +0 -3
  111. package/dist/cjs/api/types/StreamDeltaUsageMessage.d.ts +0 -5
  112. package/dist/cjs/api/types/StreamDeltaUsageMessage.js +0 -3
  113. package/dist/cjs/api/types/TranscribeDeltaUsageMessage.d.ts +0 -5
  114. package/dist/cjs/api/types/TranscribeDeltaUsageMessage.js +0 -3
  115. package/dist/cjs/custom/agents/CustomAgents.d.ts +0 -20
  116. package/dist/cjs/custom/agents/CustomAgents.js +0 -73
  117. package/dist/cjs/custom/utils/sdkHeaderNames.d.ts +0 -1
  118. package/dist/cjs/custom/utils/sdkHeaderNames.js +0 -12
  119. package/dist/cjs/custom/utils/stripFernNormalizedHeaders.d.ts +0 -5
  120. package/dist/cjs/custom/utils/stripFernNormalizedHeaders.js +0 -27
  121. package/dist/cjs/serialization/types/AgentsUpdateExpertReference.d.ts +0 -8
  122. package/dist/cjs/serialization/types/AgentsUpdateExpertReference.js +0 -6
  123. package/dist/cjs/serialization/types/StreamDeltaUsageMessage.d.ts +0 -10
  124. package/dist/cjs/serialization/types/StreamDeltaUsageMessage.js +0 -42
  125. package/dist/cjs/serialization/types/TranscribeDeltaUsageMessage.d.ts +0 -10
  126. package/dist/cjs/serialization/types/TranscribeDeltaUsageMessage.js +0 -42
  127. package/dist/esm/api/types/AgentsUpdateExpertReference.d.mts +0 -5
  128. package/dist/esm/api/types/AgentsUpdateExpertReference.mjs +0 -2
  129. package/dist/esm/api/types/StreamDeltaUsageMessage.d.mts +0 -5
  130. package/dist/esm/api/types/StreamDeltaUsageMessage.mjs +0 -2
  131. package/dist/esm/api/types/TranscribeDeltaUsageMessage.d.mts +0 -5
  132. package/dist/esm/api/types/TranscribeDeltaUsageMessage.mjs +0 -2
  133. package/dist/esm/custom/agents/CustomAgents.d.mts +0 -20
  134. package/dist/esm/custom/agents/CustomAgents.mjs +0 -36
  135. package/dist/esm/custom/utils/sdkHeaderNames.d.mts +0 -1
  136. package/dist/esm/custom/utils/sdkHeaderNames.mjs +0 -9
  137. package/dist/esm/custom/utils/stripFernNormalizedHeaders.d.mts +0 -5
  138. package/dist/esm/custom/utils/stripFernNormalizedHeaders.mjs +0 -24
  139. package/dist/esm/serialization/types/AgentsUpdateExpertReference.d.mts +0 -8
  140. package/dist/esm/serialization/types/AgentsUpdateExpertReference.mjs +0 -3
  141. package/dist/esm/serialization/types/StreamDeltaUsageMessage.d.mts +0 -10
  142. package/dist/esm/serialization/types/StreamDeltaUsageMessage.mjs +0 -6
  143. package/dist/esm/serialization/types/TranscribeDeltaUsageMessage.d.mts +0 -10
  144. package/dist/esm/serialization/types/TranscribeDeltaUsageMessage.mjs +0 -6
@@ -52,7 +52,6 @@ export * from "./AgentsTaskStatus.mjs";
52
52
  export * from "./AgentsTaskStatusState.mjs";
53
53
  export * from "./AgentsTextPart.mjs";
54
54
  export * from "./AgentsTextPartKind.mjs";
55
- export * from "./AgentsUpdateExpertReference.mjs";
56
55
  export * from "./AgentsValidationError.mjs";
57
56
  export * from "./AgentsValidationErrorErrorsItem.mjs";
58
57
  export * from "./AgentsValidationErrorResponse.mjs";
@@ -137,7 +136,6 @@ export * from "./StreamConfigStatusMessage.mjs";
137
136
  export * from "./StreamConfigStatusMessageType.mjs";
138
137
  export * from "./StreamConfigTranscription.mjs";
139
138
  export * from "./StreamConfigXCortiRetentionPolicy.mjs";
140
- export * from "./StreamDeltaUsageMessage.mjs";
141
139
  export * from "./StreamEndedMessage.mjs";
142
140
  export * from "./StreamEndMessage.mjs";
143
141
  export * from "./StreamErrorDetail.mjs";
@@ -170,7 +168,6 @@ export * from "./TranscribeConfig.mjs";
170
168
  export * from "./TranscribeConfigMessage.mjs";
171
169
  export * from "./TranscribeConfigStatusMessage.mjs";
172
170
  export * from "./TranscribeConfigStatusMessageType.mjs";
173
- export * from "./TranscribeDeltaUsageMessage.mjs";
174
171
  export * from "./TranscribeEndedMessage.mjs";
175
172
  export * from "./TranscribeEndMessage.mjs";
176
173
  export * from "./TranscribeErrorMessage.mjs";
@@ -52,7 +52,6 @@ export * from "./AgentsTaskStatus.mjs";
52
52
  export * from "./AgentsTaskStatusState.mjs";
53
53
  export * from "./AgentsTextPart.mjs";
54
54
  export * from "./AgentsTextPartKind.mjs";
55
- export * from "./AgentsUpdateExpertReference.mjs";
56
55
  export * from "./AgentsValidationError.mjs";
57
56
  export * from "./AgentsValidationErrorErrorsItem.mjs";
58
57
  export * from "./AgentsValidationErrorResponse.mjs";
@@ -137,7 +136,6 @@ export * from "./StreamConfigStatusMessage.mjs";
137
136
  export * from "./StreamConfigStatusMessageType.mjs";
138
137
  export * from "./StreamConfigTranscription.mjs";
139
138
  export * from "./StreamConfigXCortiRetentionPolicy.mjs";
140
- export * from "./StreamDeltaUsageMessage.mjs";
141
139
  export * from "./StreamEndedMessage.mjs";
142
140
  export * from "./StreamEndMessage.mjs";
143
141
  export * from "./StreamErrorDetail.mjs";
@@ -170,7 +168,6 @@ export * from "./TranscribeConfig.mjs";
170
168
  export * from "./TranscribeConfigMessage.mjs";
171
169
  export * from "./TranscribeConfigStatusMessage.mjs";
172
170
  export * from "./TranscribeConfigStatusMessageType.mjs";
173
- export * from "./TranscribeDeltaUsageMessage.mjs";
174
171
  export * from "./TranscribeEndedMessage.mjs";
175
172
  export * from "./TranscribeEndMessage.mjs";
176
173
  export * from "./TranscribeErrorMessage.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.0-rc";
1
+ export declare const SDK_VERSION = "1.2.0-templates-beta";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.2.0-rc";
1
+ export const SDK_VERSION = "1.2.0-templates-beta";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corti/sdk",
3
- "version": "1.2.0-rc",
3
+ "version": "1.2.0-templates-beta",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +0,0 @@
1
- import type * as Corti from "../index.js";
2
- /**
3
- * An expert reference when updating an agent. The id is required to identify which expert to update, or reference. The expert must already exist.
4
- */
5
- export type AgentsUpdateExpertReference = Corti.AgentsCreateExpertReference;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export interface StreamDeltaUsageMessage {
2
- type: "delta_usage";
3
- /** Approximate credits consumed since recording started. */
4
- credits: number;
5
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export interface TranscribeDeltaUsageMessage {
2
- type: "delta_usage";
3
- /** Approximate credits consumed since recording started. */
4
- credits: number;
5
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,20 +0,0 @@
1
- /**
2
- * This file is the custom implementation of the Agents client (src/api/resources/agents/client/Client.ts)
3
- *
4
- * It extends the auto-generated Agents class and adds custom helper methods.
5
- *
6
- * All the patches marked with `// Patch: ...` comments.
7
- */
8
- import { AgentsClient } from "../../api/resources/agents/client/Client.js";
9
- export declare class CustomAgents extends AgentsClient {
10
- /**
11
- * Returns the URL for the agent card JSON file.
12
- *
13
- * @param {string} agentId - The ID of the agent
14
- * @returns {Promise<URL>} A Promise that resolves to the URL for the agent card
15
- *
16
- * @example
17
- * const url = await client.agents.getAgentCardUrl("agent-123");
18
- */
19
- getCardUrl: (agentId: string) => Promise<URL>;
20
- }
@@ -1,73 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file is the custom implementation of the Agents client (src/api/resources/agents/client/Client.ts)
4
- *
5
- * It extends the auto-generated Agents class and adds custom helper methods.
6
- *
7
- * All the patches marked with `// Patch: ...` comments.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
43
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
44
- return new (P || (P = Promise))(function (resolve, reject) {
45
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
46
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
47
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
48
- step((generator = generator.apply(thisArg, _arguments || [])).next());
49
- });
50
- };
51
- Object.defineProperty(exports, "__esModule", { value: true });
52
- exports.CustomAgents = void 0;
53
- const Client_js_1 = require("../../api/resources/agents/client/Client.js");
54
- const core = __importStar(require("../../core/index.js"));
55
- class CustomAgents extends Client_js_1.AgentsClient {
56
- constructor() {
57
- super(...arguments);
58
- /**
59
- * Returns the URL for the agent card JSON file.
60
- *
61
- * @param {string} agentId - The ID of the agent
62
- * @returns {Promise<URL>} A Promise that resolves to the URL for the agent card
63
- *
64
- * @example
65
- * const url = await client.agents.getAgentCardUrl("agent-123");
66
- */
67
- this.getCardUrl = (agentId) => __awaiter(this, void 0, void 0, function* () {
68
- const encodedAgentId = encodeURIComponent(agentId);
69
- return new URL(`/agents/${encodedAgentId}/agent-card.json`, (yield core.Supplier.get(this._options.environment)).agents);
70
- });
71
- }
72
- }
73
- exports.CustomAgents = CustomAgents;
@@ -1 +0,0 @@
1
- export declare const SDK_HEADER_NAMES: ReadonlySet<string>;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SDK_HEADER_NAMES = void 0;
4
- exports.SDK_HEADER_NAMES = new Set([
5
- "Tenant-Name",
6
- "X-Fern-Language",
7
- "X-Fern-SDK-Name",
8
- "X-Fern-SDK-Version",
9
- "User-Agent",
10
- "X-Fern-Runtime",
11
- "X-Fern-Runtime-Version",
12
- ]);
@@ -1,5 +0,0 @@
1
- import type { BaseClientOptions } from "../../BaseClient.js";
2
- type Headers = BaseClientOptions["headers"];
3
- type HeaderValue = NonNullable<Headers>[string];
4
- export declare function stripFernNormalizedHeaders(headers: Headers): Record<string, HeaderValue>;
5
- export {};
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripFernNormalizedHeaders = stripFernNormalizedHeaders;
4
- const sdkHeaderNames_js_1 = require("./sdkHeaderNames.js");
5
- function normalizeHeaderKeys(headers) {
6
- const result = {};
7
- if (headers == null) {
8
- return result;
9
- }
10
- for (const [key, value] of Object.entries(headers)) {
11
- const insensitiveKey = key.toLowerCase();
12
- if (value != null) {
13
- result[insensitiveKey] = value;
14
- }
15
- else if (insensitiveKey in result) {
16
- delete result[insensitiveKey];
17
- }
18
- }
19
- return result;
20
- }
21
- function stripFernNormalizedHeaders(headers) {
22
- const normalized = normalizeHeaderKeys(headers);
23
- for (const headerName of sdkHeaderNames_js_1.SDK_HEADER_NAMES) {
24
- delete normalized[headerName.toLowerCase()];
25
- }
26
- return normalized;
27
- }
@@ -1,8 +0,0 @@
1
- import type * as Corti from "../../api/index.js";
2
- import type * as core from "../../core/index.js";
3
- import type * as serializers from "../index.js";
4
- import { AgentsCreateExpertReference } from "./AgentsCreateExpertReference.js";
5
- export declare const AgentsUpdateExpertReference: core.serialization.ObjectSchema<serializers.AgentsUpdateExpertReference.Raw, Corti.AgentsUpdateExpertReference>;
6
- export declare namespace AgentsUpdateExpertReference {
7
- type Raw = AgentsCreateExpertReference.Raw;
8
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AgentsUpdateExpertReference = void 0;
5
- const AgentsCreateExpertReference_js_1 = require("./AgentsCreateExpertReference.js");
6
- exports.AgentsUpdateExpertReference = AgentsCreateExpertReference_js_1.AgentsCreateExpertReference;
@@ -1,10 +0,0 @@
1
- import type * as Corti from "../../api/index.js";
2
- import * as core from "../../core/index.js";
3
- import type * as serializers from "../index.js";
4
- export declare const StreamDeltaUsageMessage: core.serialization.ObjectSchema<serializers.StreamDeltaUsageMessage.Raw, Corti.StreamDeltaUsageMessage>;
5
- export declare namespace StreamDeltaUsageMessage {
6
- interface Raw {
7
- type: "delta_usage";
8
- credits: number;
9
- }
10
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.StreamDeltaUsageMessage = void 0;
38
- const core = __importStar(require("../../core/index.js"));
39
- exports.StreamDeltaUsageMessage = core.serialization.object({
40
- type: core.serialization.stringLiteral("delta_usage"),
41
- credits: core.serialization.number(),
42
- });
@@ -1,10 +0,0 @@
1
- import type * as Corti from "../../api/index.js";
2
- import * as core from "../../core/index.js";
3
- import type * as serializers from "../index.js";
4
- export declare const TranscribeDeltaUsageMessage: core.serialization.ObjectSchema<serializers.TranscribeDeltaUsageMessage.Raw, Corti.TranscribeDeltaUsageMessage>;
5
- export declare namespace TranscribeDeltaUsageMessage {
6
- interface Raw {
7
- type: "delta_usage";
8
- credits: number;
9
- }
10
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.TranscribeDeltaUsageMessage = void 0;
38
- const core = __importStar(require("../../core/index.js"));
39
- exports.TranscribeDeltaUsageMessage = core.serialization.object({
40
- type: core.serialization.stringLiteral("delta_usage"),
41
- credits: core.serialization.number(),
42
- });
@@ -1,5 +0,0 @@
1
- import type * as Corti from "../index.mjs";
2
- /**
3
- * An expert reference when updating an agent. The id is required to identify which expert to update, or reference. The expert must already exist.
4
- */
5
- export type AgentsUpdateExpertReference = Corti.AgentsCreateExpertReference;
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,5 +0,0 @@
1
- export interface StreamDeltaUsageMessage {
2
- type: "delta_usage";
3
- /** Approximate credits consumed since recording started. */
4
- credits: number;
5
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,5 +0,0 @@
1
- export interface TranscribeDeltaUsageMessage {
2
- type: "delta_usage";
3
- /** Approximate credits consumed since recording started. */
4
- credits: number;
5
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,20 +0,0 @@
1
- /**
2
- * This file is the custom implementation of the Agents client (src/api/resources/agents/client/Client.ts)
3
- *
4
- * It extends the auto-generated Agents class and adds custom helper methods.
5
- *
6
- * All the patches marked with `// Patch: ...` comments.
7
- */
8
- import { AgentsClient } from "../../api/resources/agents/client/Client.mjs";
9
- export declare class CustomAgents extends AgentsClient {
10
- /**
11
- * Returns the URL for the agent card JSON file.
12
- *
13
- * @param {string} agentId - The ID of the agent
14
- * @returns {Promise<URL>} A Promise that resolves to the URL for the agent card
15
- *
16
- * @example
17
- * const url = await client.agents.getAgentCardUrl("agent-123");
18
- */
19
- getCardUrl: (agentId: string) => Promise<URL>;
20
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * This file is the custom implementation of the Agents client (src/api/resources/agents/client/Client.ts)
3
- *
4
- * It extends the auto-generated Agents class and adds custom helper methods.
5
- *
6
- * All the patches marked with `// Patch: ...` comments.
7
- */
8
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
- return new (P || (P = Promise))(function (resolve, reject) {
11
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14
- step((generator = generator.apply(thisArg, _arguments || [])).next());
15
- });
16
- };
17
- import { AgentsClient } from "../../api/resources/agents/client/Client.mjs";
18
- import * as core from "../../core/index.mjs";
19
- export class CustomAgents extends AgentsClient {
20
- constructor() {
21
- super(...arguments);
22
- /**
23
- * Returns the URL for the agent card JSON file.
24
- *
25
- * @param {string} agentId - The ID of the agent
26
- * @returns {Promise<URL>} A Promise that resolves to the URL for the agent card
27
- *
28
- * @example
29
- * const url = await client.agents.getAgentCardUrl("agent-123");
30
- */
31
- this.getCardUrl = (agentId) => __awaiter(this, void 0, void 0, function* () {
32
- const encodedAgentId = encodeURIComponent(agentId);
33
- return new URL(`/agents/${encodedAgentId}/agent-card.json`, (yield core.Supplier.get(this._options.environment)).agents);
34
- });
35
- }
36
- }
@@ -1 +0,0 @@
1
- export declare const SDK_HEADER_NAMES: ReadonlySet<string>;
@@ -1,9 +0,0 @@
1
- export const SDK_HEADER_NAMES = new Set([
2
- "Tenant-Name",
3
- "X-Fern-Language",
4
- "X-Fern-SDK-Name",
5
- "X-Fern-SDK-Version",
6
- "User-Agent",
7
- "X-Fern-Runtime",
8
- "X-Fern-Runtime-Version",
9
- ]);
@@ -1,5 +0,0 @@
1
- import type { BaseClientOptions } from "../../BaseClient.mjs";
2
- type Headers = BaseClientOptions["headers"];
3
- type HeaderValue = NonNullable<Headers>[string];
4
- export declare function stripFernNormalizedHeaders(headers: Headers): Record<string, HeaderValue>;
5
- export {};
@@ -1,24 +0,0 @@
1
- import { SDK_HEADER_NAMES } from "./sdkHeaderNames.mjs";
2
- function normalizeHeaderKeys(headers) {
3
- const result = {};
4
- if (headers == null) {
5
- return result;
6
- }
7
- for (const [key, value] of Object.entries(headers)) {
8
- const insensitiveKey = key.toLowerCase();
9
- if (value != null) {
10
- result[insensitiveKey] = value;
11
- }
12
- else if (insensitiveKey in result) {
13
- delete result[insensitiveKey];
14
- }
15
- }
16
- return result;
17
- }
18
- export function stripFernNormalizedHeaders(headers) {
19
- const normalized = normalizeHeaderKeys(headers);
20
- for (const headerName of SDK_HEADER_NAMES) {
21
- delete normalized[headerName.toLowerCase()];
22
- }
23
- return normalized;
24
- }
@@ -1,8 +0,0 @@
1
- import type * as Corti from "../../api/index.mjs";
2
- import type * as core from "../../core/index.mjs";
3
- import type * as serializers from "../index.mjs";
4
- import { AgentsCreateExpertReference } from "./AgentsCreateExpertReference.mjs";
5
- export declare const AgentsUpdateExpertReference: core.serialization.ObjectSchema<serializers.AgentsUpdateExpertReference.Raw, Corti.AgentsUpdateExpertReference>;
6
- export declare namespace AgentsUpdateExpertReference {
7
- type Raw = AgentsCreateExpertReference.Raw;
8
- }
@@ -1,3 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- import { AgentsCreateExpertReference } from "./AgentsCreateExpertReference.mjs";
3
- export const AgentsUpdateExpertReference = AgentsCreateExpertReference;
@@ -1,10 +0,0 @@
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 StreamDeltaUsageMessage: core.serialization.ObjectSchema<serializers.StreamDeltaUsageMessage.Raw, Corti.StreamDeltaUsageMessage>;
5
- export declare namespace StreamDeltaUsageMessage {
6
- interface Raw {
7
- type: "delta_usage";
8
- credits: number;
9
- }
10
- }
@@ -1,6 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- import * as core from "../../core/index.mjs";
3
- export const StreamDeltaUsageMessage = core.serialization.object({
4
- type: core.serialization.stringLiteral("delta_usage"),
5
- credits: core.serialization.number(),
6
- });
@@ -1,10 +0,0 @@
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 TranscribeDeltaUsageMessage: core.serialization.ObjectSchema<serializers.TranscribeDeltaUsageMessage.Raw, Corti.TranscribeDeltaUsageMessage>;
5
- export declare namespace TranscribeDeltaUsageMessage {
6
- interface Raw {
7
- type: "delta_usage";
8
- credits: number;
9
- }
10
- }
@@ -1,6 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- import * as core from "../../core/index.mjs";
3
- export const TranscribeDeltaUsageMessage = core.serialization.object({
4
- type: core.serialization.stringLiteral("delta_usage"),
5
- credits: core.serialization.number(),
6
- });