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": "d981f1427d8889752487302ca1272eae7460c7ee",
"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/3202ef45-c28f-4ab9-b1fa-025f1b0a6754/v1/contexts/019fc672-fcf3-7de7-ac77-27d6b9953381?limit=82&offset=17' } }

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/54db8f9b-5920-4ef9-a43c-8b8210eade44/v1/contexts/019fc672-eb87-7abd-9bb8-867285f44599?offset=26' } }

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/304e1462-5299-44f2-a2f6-a54b1a9080e6/v1/contexts/019fc672-d648-7916-ba51-ba9ff0cf3889?limit=56' } }

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/34477377-1b56-474a-b599-f08f7e18d457/v1/contexts/019fc672-c2ca-7e0d-8565-68385964f543' } }
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/fe38193c-5d0c-402d-b05e-caeb884b26c8/v1/contexts/019fc673-e8e8-7500-8d2c-817418931f6d' } }
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/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";
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