Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.75.1",
"cliVersion": "5.80.2",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.54.0",
"generatorConfig": {
Expand Down Expand Up @@ -34,6 +34,6 @@
}
}
},
"originGitCommit": "94a714862b705ee097af1b7ef3c5d9affa7fc382",
"originGitCommit": "f9f316d6867d3aff7cb76ee5566aae1d0862974c",
"sdkVersion": "0.0.0-dev"
}
8 changes: 4 additions & 4 deletions src/api/resources/agents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
* This endpoint sends a message to the specified agent to start or continue a task. The agent processes the message and returns a response. If the message contains a task ID that matches an ongoing task, the agent will continue that task; otherwise, it will start a new task.
*
* @param {string} id - The identifier of the agent associated with the context.
* @param {Corti.AgentsMessageSendParams} request
* @param {Corti.AgentsMessageSendBody} request
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Corti.BadRequestError}
Expand All @@ -540,15 +540,15 @@
*/
public messageSend(
id: string,
request: Corti.AgentsMessageSendParams,
request: Corti.AgentsMessageSendBody,
requestOptions?: AgentsClient.RequestOptions,
): core.HttpResponsePromise<Corti.AgentsMessageSendResponse> {
return core.HttpResponsePromise.fromPromise(this.__messageSend(id, request, requestOptions));
}

private async __messageSend(
id: string,
request: Corti.AgentsMessageSendParams,
request: Corti.AgentsMessageSendBody,
requestOptions?: AgentsClient.RequestOptions,
): Promise<core.WithRawResponse<Corti.AgentsMessageSendResponse>> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
Expand All @@ -569,7 +569,7 @@
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: serializers.AgentsMessageSendParams.jsonOrThrow(request, {
body: serializers.AgentsMessageSendBody.jsonOrThrow(request, {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
}),
Expand Down Expand Up @@ -792,7 +792,7 @@
case 404:
throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
default:
throw new errors.CortiError({

Check failure on line 795 in src/api/resources/agents/client/Client.ts

View workflow job for this annotation

GitHub Actions / integration-main

tests/custom/agents.getContext.integration.ts > cortiClient.agents.getContext > should retrieve context with optional parameters > should retrieve context with all optional parameters without errors or warnings

CortiError: Status code: 403 ❯ CustomAgents.__getContext src/api/resources/agents/client/Client.ts:795:27 ❯ tests/custom/agents.getContext.integration.ts:90:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, body: undefined, rawResponse: { headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, redirected: false, status: 403, statusText: 'Forbidden', type: 'basic', url: 'https://api.eu.corti.app/agents/2f51646c-22e6-4722-8b32-7a90054e6918/v1/contexts/019fc7f3-c40c-7206-846b-ad8daa879f6f?limit=45&offset=35' } }

Check failure on line 795 in src/api/resources/agents/client/Client.ts

View workflow job for this annotation

GitHub Actions / integration-main

tests/custom/agents.getContext.integration.ts > cortiClient.agents.getContext > should retrieve context with optional parameters > should retrieve context with offset parameter without errors or warnings

CortiError: Status code: 403 ❯ CustomAgents.__getContext src/api/resources/agents/client/Client.ts:795:27 ❯ tests/custom/agents.getContext.integration.ts:71:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, body: undefined, rawResponse: { headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, redirected: false, status: 403, statusText: 'Forbidden', type: 'basic', url: 'https://api.eu.corti.app/agents/4509d517-5fb1-426a-8f7b-5377fb742967/v1/contexts/019fc7f3-b225-7b8f-afab-f304f086a245?offset=0' } }

Check failure on line 795 in src/api/resources/agents/client/Client.ts

View workflow job for this annotation

GitHub Actions / integration-main

tests/custom/agents.getContext.integration.ts > cortiClient.agents.getContext > should retrieve context with optional parameters > should retrieve context with limit parameter without errors or warnings

CortiError: Status code: 403 ❯ CustomAgents.__getContext src/api/resources/agents/client/Client.ts:795:27 ❯ tests/custom/agents.getContext.integration.ts:52:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, body: undefined, rawResponse: { headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, redirected: false, status: 403, statusText: 'Forbidden', type: 'basic', url: 'https://api.eu.corti.app/agents/71082703-8f95-491b-bcea-a751bb02fed8/v1/contexts/019fc7f3-9c8b-7445-8537-656e185ccdbc?limit=71' } }

Check failure on line 795 in src/api/resources/agents/client/Client.ts

View workflow job for this annotation

GitHub Actions / integration-main

tests/custom/agents.getContext.integration.ts > cortiClient.agents.getContext > should retrieve context with only required values > should successfully retrieve a context without errors or warnings

CortiError: Status code: 403 ❯ CustomAgents.__getContext src/api/resources/agents/client/Client.ts:795:27 ❯ tests/custom/agents.getContext.integration.ts:33:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, body: undefined, rawResponse: { headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, redirected: false, status: 403, statusText: 'Forbidden', type: 'basic', url: 'https://api.eu.corti.app/agents/0a72c85a-ed03-4f6b-b2e4-077eec3f397e/v1/contexts/019fc7f3-8ba1-7268-b057-21e718f2b922' } }
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
Expand Down Expand Up @@ -870,7 +870,7 @@
case 404:
throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
default:
throw new errors.CortiError({

Check failure on line 873 in src/api/resources/agents/client/Client.ts

View workflow job for this annotation

GitHub Actions / integration-main

tests/custom/agents.deleteContext.integration.ts > cortiClient.agents.deleteContext > should delete context with only required values > should successfully delete an existing context without errors or warnings

CortiError: Status code: 403 ❯ CustomAgents.__deleteContext src/api/resources/agents/client/Client.ts:873:27 ❯ tests/custom/agents.deleteContext.integration.ts:33:28 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { statusCode: 403, body: undefined, rawResponse: { headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, redirected: false, status: 403, statusText: 'Forbidden', type: 'basic', url: 'https://api.eu.corti.app/agents/a4a59fd0-37a0-4c0e-ad7f-abb3511f2638/v1/contexts/019fc7f4-9e49-7afa-a6f6-5ce2b150c4d5' } }
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type * as Corti from "../../../../index.js";
* }
* }
*/
export interface AgentsMessageSendParams {
export interface AgentsMessageSendBody {
message: Corti.AgentsMessage;
configuration?: Corti.AgentsMessageSendConfiguration;
/** Optional metadata that will be associated with the message. */
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/agents/client/requests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export type { AgentsGetContextRequest } from "./AgentsGetContextRequest.js";
export type { AgentsGetRegistryExpertsRequest } from "./AgentsGetRegistryExpertsRequest.js";
export type { AgentsGetTaskRequest } from "./AgentsGetTaskRequest.js";
export type { AgentsListRequest } from "./AgentsListRequest.js";
export type { AgentsMessageSendParams } from "./AgentsMessageSendParams.js";
export type { AgentsMessageSendBody } from "./AgentsMessageSendBody.js";
export type { AgentsUpdateAgent } from "./AgentsUpdateAgent.js";
2 changes: 1 addition & 1 deletion src/api/resources/codes/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CodesClient {
}

/**
* Predict medical codes from provided context.<br/><Note>This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10 (international), ICD-10-UK, CIM-10-FR, ICD-10-GM, OPCS-4, OPS, CCAM and CPT codes based on input text string or documentId.<br/><br/>More than one code system may be defined in a single request.<br/><br/>Code prediction requests have two possible values for context:<br/>- `text`: One set of code prediction results will be returned based on all input text defined.<br/>- `documentId`: Code prediction will be based on that defined document only.<br/><br/>The response includes two sets of results:<br/>- `Codes`: Codes predicted by the model.<br/>- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.<br/><br/>All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).</Note>
* Predict medical codes from provided context.<br/><Note>This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10 (international), ICD-10-UK, CIM-10-FR, ICD-10-GM, OPCS-4, OPS, CCAM, CPT and SNOMED CT codes based on input text string or documentId.<br/><br/>More than one code system may be defined in a single request.<br/><br/>Code prediction requests have two possible values for context:<br/>- `text`: One set of code prediction results will be returned based on all input text defined.<br/>- `documentId`: Code prediction will be based on that defined document only.<br/><br/>The response includes two sets of results:<br/>- `Codes`: Codes predicted by the model.<br/>- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.<br/><br/>All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).</Note>
*
* @param {Corti.CodesGeneralPredictRequest} request
* @param {CodesClient.RequestOptions} requestOptions - Request-specific configuration.
Expand Down
7 changes: 7 additions & 0 deletions src/api/types/CommonCodingSystemEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ export const CommonCodingSystemEnum = {
Ops: "ops",
Ccam: "ccam",
Snomedctint: "snomedctint",
Snomedctde: "snomedctde",
Snomedctfr: "snomedctfr",
Snomedctuk: "snomedctuk",
Snomedctes: "snomedctes",
Snomedctdk: "snomedctdk",
Snomedctse: "snomedctse",
Snomedctus: "snomedctus",
} as const;
export type CommonCodingSystemEnum = (typeof CommonCodingSystemEnum)[keyof typeof CommonCodingSystemEnum];
2 changes: 1 addition & 1 deletion src/api/types/GuidedEphemeralDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface GuidedEphemeralDocument {
templateId: string;
templateVersionId: string;
/** The BCP 47 language tag of the generated output. */
language: string;
outputLanguage: string;
/** The interaction whose context was used to generate this document, if supplied. */
interactionId?: string | null;
stringDocument: Record<string, string>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import type * as serializers from "../../../../index.js";
import { AgentsMessage } from "../../../../types/AgentsMessage.js";
import { AgentsMessageSendConfiguration } from "../../../../types/AgentsMessageSendConfiguration.js";

export const AgentsMessageSendParams: core.serialization.Schema<
serializers.AgentsMessageSendParams.Raw,
Corti.AgentsMessageSendParams
export const AgentsMessageSendBody: core.serialization.Schema<
serializers.AgentsMessageSendBody.Raw,
Corti.AgentsMessageSendBody
> = core.serialization.object({
message: AgentsMessage,
configuration: AgentsMessageSendConfiguration.optional(),
metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
});

export declare namespace AgentsMessageSendParams {
export declare namespace AgentsMessageSendBody {
export interface Raw {
message: AgentsMessage.Raw;
configuration?: AgentsMessageSendConfiguration.Raw | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AgentsCreateAgent } from "./AgentsCreateAgent.js";
export { AgentsMessageSendParams } from "./AgentsMessageSendParams.js";
export { AgentsMessageSendBody } from "./AgentsMessageSendBody.js";
export { AgentsUpdateAgent } from "./AgentsUpdateAgent.js";
16 changes: 15 additions & 1 deletion src/serialization/types/CommonCodingSystemEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export const CommonCodingSystemEnum: core.serialization.Schema<
"ops",
"ccam",
"snomedctint",
"snomedctde",
"snomedctfr",
"snomedctuk",
"snomedctes",
"snomedctdk",
"snomedctse",
"snomedctus",
]);

export declare namespace CommonCodingSystemEnum {
Expand All @@ -43,5 +50,12 @@ export declare namespace CommonCodingSystemEnum {
| "opcs4"
| "ops"
| "ccam"
| "snomedctint";
| "snomedctint"
| "snomedctde"
| "snomedctfr"
| "snomedctuk"
| "snomedctes"
| "snomedctdk"
| "snomedctse"
| "snomedctus";
}
4 changes: 2 additions & 2 deletions src/serialization/types/GuidedEphemeralDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const GuidedEphemeralDocument: core.serialization.ObjectSchema<
name: core.serialization.string(),
templateId: core.serialization.string(),
templateVersionId: core.serialization.string(),
language: core.serialization.string(),
outputLanguage: core.serialization.string(),
interactionId: core.serialization.string().optionalNullable(),
stringDocument: core.serialization.record(core.serialization.string(), core.serialization.string()),
structuredDocument: core.serialization
Expand All @@ -26,7 +26,7 @@ export declare namespace GuidedEphemeralDocument {
name: string;
templateId: string;
templateVersionId: string;
language: string;
outputLanguage: string;
interactionId?: (string | null | undefined) | null;
stringDocument: Record<string, string>;
structuredDocument?: (Record<string, unknown> | null | undefined) | null;
Expand Down
4 changes: 2 additions & 2 deletions tests/wire/documents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ describe("DocumentsClient", () => {
name: "name",
templateId: "templateId",
templateVersionId: "templateVersionId",
language: "language",
outputLanguage: "outputLanguage",
interactionId: "interactionId",
stringDocument: { key: "value" },
structuredDocument: { key: "value" },
Expand Down Expand Up @@ -1059,7 +1059,7 @@ describe("DocumentsClient", () => {
name: "name",
templateId: "templateId",
templateVersionId: "templateVersionId",
language: "language",
outputLanguage: "outputLanguage",
interactionId: "interactionId",
stringDocument: {
key: "value",
Expand Down
Loading