Repository navigation
[api-sync] Align the Node.js client with the public API - #22
Merged
Merged
Conversation
Adds customer memories, files, knowledge bases, notes list and read, and the conversation.start webhook. Brings model fields and enums in line with the API, and adds an operation-list test.
twindebank
force-pushed
the
api-sync/full-93c928210899
branch
from
November 25, 2026 14:35
fafb706 to
3a1693a
Compare
twindebank
marked this pull request as ready for review
November 27, 2026 11:21
gmtuca
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
@gradientlabs/clientwith the current public API, version3e9c6fa0a27454d8d5300c42e4215c475c3954b085dae9901f429d0c531e50f3(recorded inPUBLIC_API_VERSION). Replaces #13, which this PR carries in full.Breaking changes (0.x, so a minor bump)
Removed
StartConversationParams.metadata. The API has no such field and ignored it.Fields the API can omit are now optional in the response types:
Note.body/url,Procedure.max_daily_conversations,Topic.Description/ParentExternalID/PublicURL,Attachment.url,AgentMetadata.*,Conversation.latest_intent/latest_handoff_target,Attribute.description/is_root,Schema.raw,SourceConfig.cache. Code that reads them as always present needs a check.HandOffTargethas a new requiredref.Conversation.status,FinishConversationParams.reason_codeandTrafficGroupTarget.target_typeare now typed (ConversationStatus,ConversationFinishReasonCode,TrafficGroupTargetType). They are open unions, so any string still compiles.Tool creation accepts HTTP, webhook, async or draft settings on a branch. The server assigns the tool ID. Resource requests arrive as
action.executeevents.Article and topic upserts accept their documented optional fields. An internal note requires a body. Arbitrary JSON values are supported in memory, task and tool payloads.
Procedure reads omit the author. Add-message responses omit the subject and conversation token. Use the timeout setting to configure secret refresh requests.
A conversation’s intent and hand-off details are available when reading it after creation.
Added
client.customers:listMemories,batchCreateMemoriesV2and the deprecatedbatchCreateMemories(from [api-sync 2026-07-22] gradientlabs-nodejs: sync to OpenAPI spec #13).custom_typeis required on the deprecated call, as the API requires ([api-sync 2026-07-22] gradientlabs-nodejs: sync to OpenAPI spec #13 had it optional).client.files:beginUpload,create,list,listAll.client.knowledgeBases:list,create,get,update.client.notes.list,listAll,get, plusattributesandknowledge_base_idson notes.conversation.startwebhook event.knowledge_base_idson articles,refon hand-off target upsert,live_handoff_urlon voice call context,retryon HTTP tool definitions,transfer_modeon tool parameters,branch_id/branch_nameon tool, resource source and resource type creation,managedon resource sources.kustomer,salesforce_contact_email,salesforce_supplied_email, and thejsonandattachmentparameter types.examples/customers, and a conversation.start webhook case inexamples/webhooks.How it was checked
test/operations.test.tsholds a hand-kept map from each implemented API operation id to its method and fails if a method is missing.GET /spec.jsonis not exposed.conversation.startpayload.npm ci && npm run build && npm test && npm run lintall pass, as dotypecheckandprettier --check.Version
0.1.3 to 0.2.0, in its own commit (
package.json, lockfile, User-Agent constant, CHANGELOG). No tag is created.