@naturali/sdk 0.1.0 → 0.27.0
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.
- package/README.md +15 -2
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +1 -12
- package/dist/index.d.mts +1 -12
- package/dist/index.mjs +4 -3
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@ pnpm add @naturali/sdk
|
|
|
13
13
|
import { NaturaliClient } from '@naturali/sdk';
|
|
14
14
|
|
|
15
15
|
const naturali = new NaturaliClient({
|
|
16
|
-
baseUrl: 'https://api.naturali.ai',
|
|
17
16
|
token: process.env.NATURALI_TOKEN, // nat_sk_… or a session access JWT
|
|
18
17
|
});
|
|
19
18
|
|
|
@@ -36,9 +35,11 @@ so the machine-readable `code` (`approval_required`, `budget_exceeded`,
|
|
|
36
35
|
|
|
37
36
|
## Options
|
|
38
37
|
|
|
38
|
+
The client always talks to `https://api.naturali.ai` — the only naturali.ai API
|
|
39
|
+
origin, and not configurable.
|
|
40
|
+
|
|
39
41
|
| Option | Purpose |
|
|
40
42
|
| --- | --- |
|
|
41
|
-
| `baseUrl` | API **origin** — operation paths already carry `/v1`, so pass `https://api.naturali.ai`, not `…/v1`. Defaults to `''` (same origin), which is what a browser app wants. |
|
|
42
43
|
| `token` | Sent as `Authorization: Bearer …`. Accepts a `nat_sk_…` API key or a session access JWT. |
|
|
43
44
|
| `headers` | Merged last, so it can override the header above or add your own. |
|
|
44
45
|
|
|
@@ -88,3 +89,15 @@ rebuilt from `api/openapi/v1/*.yaml` by `pnpm generate`, which `typecheck`,
|
|
|
88
89
|
pipeline.
|
|
89
90
|
|
|
90
91
|
The only hand-written source is `src/naturaliClient.ts`.
|
|
92
|
+
|
|
93
|
+
## Versioning
|
|
94
|
+
|
|
95
|
+
Releases are automatic, and the version tracks the API rather than a hand-picked
|
|
96
|
+
schedule. Any change to `api/openapi/v1/*.yaml` regenerates this package and
|
|
97
|
+
publishes it, because the specs are what it is generated *from* — so a new
|
|
98
|
+
version can mean the API gained a resource, not that the hand-written client
|
|
99
|
+
changed.
|
|
100
|
+
|
|
101
|
+
`fix:`/`chore:` changes release a patch, `feat:` a minor, and a breaking change
|
|
102
|
+
is held for human approval before it reaches npm. See the repository
|
|
103
|
+
[README](../../README.md#releasing).
|
package/dist/index.cjs
CHANGED
|
@@ -1714,6 +1714,8 @@ const bindResource = (SdkClass, client) => {
|
|
|
1714
1714
|
return value;
|
|
1715
1715
|
} });
|
|
1716
1716
|
};
|
|
1717
|
+
/** The naturali.ai API origin. Not configurable — there is only one. */
|
|
1718
|
+
const API_BASE_URL = "https://api.naturali.ai";
|
|
1717
1719
|
/**
|
|
1718
1720
|
* The naturali.ai API client.
|
|
1719
1721
|
*
|
|
@@ -1724,7 +1726,6 @@ const bindResource = (SdkClass, client) => {
|
|
|
1724
1726
|
* import { NaturaliClient } from '@naturali/sdk';
|
|
1725
1727
|
*
|
|
1726
1728
|
* const naturali = new NaturaliClient({
|
|
1727
|
-
* baseUrl: 'https://api.naturali.ai',
|
|
1728
1729
|
* token: process.env.NATURALI_TOKEN,
|
|
1729
1730
|
* });
|
|
1730
1731
|
*
|
|
@@ -1754,9 +1755,9 @@ var NaturaliClient = class {
|
|
|
1754
1755
|
traces;
|
|
1755
1756
|
/** The underlying HTTP client, for interceptors or one-off requests. */
|
|
1756
1757
|
http;
|
|
1757
|
-
constructor({
|
|
1758
|
+
constructor({ token, headers } = {}) {
|
|
1758
1759
|
this.http = createClient(createConfig({
|
|
1759
|
-
baseUrl:
|
|
1760
|
+
baseUrl: API_BASE_URL,
|
|
1760
1761
|
headers: {
|
|
1761
1762
|
...token ? { Authorization: `Bearer ${token}` } : {},
|
|
1762
1763
|
...headers
|
package/dist/index.d.cts
CHANGED
|
@@ -5635,16 +5635,6 @@ declare class Traces {
|
|
|
5635
5635
|
//#endregion
|
|
5636
5636
|
//#region src/naturaliClient.d.ts
|
|
5637
5637
|
interface NaturaliClientOptions {
|
|
5638
|
-
/**
|
|
5639
|
-
* Origin of the naturali.ai API. Every operation path already carries the
|
|
5640
|
-
* `/v1` prefix, so this is the host only — not `https://…/v1`.
|
|
5641
|
-
*
|
|
5642
|
-
* Defaults to the current origin (`''`), which keeps a browser app
|
|
5643
|
-
* same-origin.
|
|
5644
|
-
*
|
|
5645
|
-
* @example 'https://api.naturali.ai'
|
|
5646
|
-
*/
|
|
5647
|
-
baseUrl?: string;
|
|
5648
5638
|
/**
|
|
5649
5639
|
* Bearer credential: a `nat_sk_…` API key or a session access JWT. Sets
|
|
5650
5640
|
* `Authorization: Bearer <token>` on every request.
|
|
@@ -5670,7 +5660,6 @@ interface NaturaliClientOptions {
|
|
|
5670
5660
|
* import { NaturaliClient } from '@naturali/sdk';
|
|
5671
5661
|
*
|
|
5672
5662
|
* const naturali = new NaturaliClient({
|
|
5673
|
-
* baseUrl: 'https://api.naturali.ai',
|
|
5674
5663
|
* token: process.env.NATURALI_TOKEN,
|
|
5675
5664
|
* });
|
|
5676
5665
|
*
|
|
@@ -5700,7 +5689,7 @@ declare class NaturaliClient {
|
|
|
5700
5689
|
readonly traces: typeof Traces;
|
|
5701
5690
|
/** The underlying HTTP client, for interceptors or one-off requests. */
|
|
5702
5691
|
readonly http: Client;
|
|
5703
|
-
constructor({
|
|
5692
|
+
constructor({ token, headers }?: NaturaliClientOptions);
|
|
5704
5693
|
}
|
|
5705
5694
|
//#endregion
|
|
5706
5695
|
export { type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageResponse, type AddSessionMessageResponses, type Agent, type AgentCreate, type AgentId, type AgentList, type AgentUpdate, Agents, type ApiKeyCreate, type ApiKeyCreated, type ApiKeyId, type ApiKeyList, type ApiKeyRecord, type ApiKeyUpdate, ApiKeys, Auth, type AuthSession, type Channel, type ChannelBinding, type ChannelBindingSet, type ChannelCreate, type ChannelId, type ChannelList, type ChannelUpdate, Channels, type ClientOptions, type CollectionId, type ConfirmPasswordResetData, type ConfirmPasswordResetError, type ConfirmPasswordResetErrors, type ConfirmPasswordResetResponse, type ConfirmPasswordResetResponses, type Contact, type ContactConversation, type ContactConversationList, type ContactCreate, type ContactId, type ContactIdentity, type ContactIdentityCreate, type ContactList, type ContactMerge, type ContactMergeList, type ContactMergeRequest, type ContactMergeResult, type ContactUpdate, Contacts, type Conversation, type ConversationId, type ConversationList, type ConversationMessage, type ConversationMessageList, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentResponse, type CreateAgentResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateContactData, type CreateContactError, type CreateContactErrors, type CreateContactIdentityData, type CreateContactIdentityError, type CreateContactIdentityErrors, type CreateContactIdentityResponse, type CreateContactIdentityResponses, type CreateContactResponse, type CreateContactResponses, type CreateGenerationData, type CreateGenerationError, type CreateGenerationErrors, type CreateGenerationResponse, type CreateGenerationResponses, type CreateKnowledgeCollectionData, type CreateKnowledgeCollectionError, type CreateKnowledgeCollectionErrors, type CreateKnowledgeCollectionResponse, type CreateKnowledgeCollectionResponses, type CreateKnowledgeDocumentData, type CreateKnowledgeDocumentError, type CreateKnowledgeDocumentErrors, type CreateKnowledgeDocumentResponse, type CreateKnowledgeDocumentResponses, type CreateProjectData, type CreateProjectError, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateProviderData, type CreateProviderError, type CreateProviderErrors, type CreateProviderResponse, type CreateProviderResponses, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionResponse, type CreateSessionResponses, type CreateToolData, type CreateToolError, type CreateToolErrors, type CreateToolResponse, type CreateToolResponses, type Credentials, type Cursor, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteChannelBindingData, type DeleteChannelBindingError, type DeleteChannelBindingErrors, type DeleteChannelBindingResponse, type DeleteChannelBindingResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteContactData, type DeleteContactError, type DeleteContactErrors, type DeleteContactIdentityData, type DeleteContactIdentityError, type DeleteContactIdentityErrors, type DeleteContactIdentityResponse, type DeleteContactIdentityResponses, type DeleteContactResponse, type DeleteContactResponses, type DeleteKnowledgeCollectionData, type DeleteKnowledgeCollectionError, type DeleteKnowledgeCollectionErrors, type DeleteKnowledgeCollectionResponse, type DeleteKnowledgeCollectionResponses, type DeleteKnowledgeDocumentData, type DeleteKnowledgeDocumentError, type DeleteKnowledgeDocumentErrors, type DeleteKnowledgeDocumentResponse, type DeleteKnowledgeDocumentResponses, type DeleteProjectData, type DeleteProjectError, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteProviderData, type DeleteProviderError, type DeleteProviderErrors, type DeleteProviderResponse, type DeleteProviderResponses, type DeleteToolData, type DeleteToolError, type DeleteToolErrors, type DeleteToolResponse, type DeleteToolResponses, type DiscordModes, type DocumentId, type ErrorResponse, type Force, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type Generation, type GenerationCreate, type GenerationId, type GenerationList, type GenerationResult, type GenerationStatus, Generations, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetApiKeyData, type GetApiKeyError, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetChannelBindingData, type GetChannelBindingError, type GetChannelBindingErrors, type GetChannelBindingResponse, type GetChannelBindingResponses, type GetChannelConversationData, type GetChannelConversationError, type GetChannelConversationErrors, type GetChannelConversationResponse, type GetChannelConversationResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetContactData, type GetContactError, type GetContactErrors, type GetContactResponse, type GetContactResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetGenerationData, type GetGenerationError, type GetGenerationErrors, type GetGenerationResponse, type GetGenerationResponses, type GetKnowledgeCollectionData, type GetKnowledgeCollectionError, type GetKnowledgeCollectionErrors, type GetKnowledgeCollectionResponse, type GetKnowledgeCollectionResponses, type GetKnowledgeDocumentData, type GetKnowledgeDocumentError, type GetKnowledgeDocumentErrors, type GetKnowledgeDocumentResponse, type GetKnowledgeDocumentResponses, type GetModelData, type GetModelError, type GetModelErrors, type GetModelResponse, type GetModelResponses, type GetProjectData, type GetProjectError, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetProjectUsageData, type GetProjectUsageError, type GetProjectUsageErrors, type GetProjectUsageResponse, type GetProjectUsageResponses, type GetProviderData, type GetProviderError, type GetProviderErrors, type GetProviderResponse, type GetProviderResponses, type GetSessionData, type GetSessionError, type GetSessionErrors, type GetSessionResponse, type GetSessionResponses, type GetToolData, type GetToolError, type GetToolErrors, type GetToolResponse, type GetToolResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type HttpExecute, type IdempotencyKey, type IdentityId, Knowledge, type KnowledgeChunk, type KnowledgeCollection, type KnowledgeCollectionCreate, type KnowledgeCollectionList, type KnowledgeCollectionUpdate, type KnowledgeDocument, type KnowledgeDocumentCreate, type KnowledgeDocumentList, type KnowledgeQueryRequest, type KnowledgeQueryResult, type Limit, type ListAgentGenerationsData, type ListAgentGenerationsError, type ListAgentGenerationsErrors, type ListAgentGenerationsResponse, type ListAgentGenerationsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListChannelConversationMessagesData, type ListChannelConversationMessagesError, type ListChannelConversationMessagesErrors, type ListChannelConversationMessagesResponse, type ListChannelConversationMessagesResponses, type ListChannelConversationsData, type ListChannelConversationsError, type ListChannelConversationsErrors, type ListChannelConversationsResponse, type ListChannelConversationsResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListContactConversationsData, type ListContactConversationsError, type ListContactConversationsErrors, type ListContactConversationsResponse, type ListContactConversationsResponses, type ListContactMergesData, type ListContactMergesError, type ListContactMergesErrors, type ListContactMergesResponse, type ListContactMergesResponses, type ListContactsData, type ListContactsError, type ListContactsErrors, type ListContactsResponse, type ListContactsResponses, type ListKnowledgeCollectionsData, type ListKnowledgeCollectionsError, type ListKnowledgeCollectionsErrors, type ListKnowledgeCollectionsResponse, type ListKnowledgeCollectionsResponses, type ListKnowledgeDocumentsData, type ListKnowledgeDocumentsError, type ListKnowledgeDocumentsErrors, type ListKnowledgeDocumentsResponse, type ListKnowledgeDocumentsResponses, type ListModelsData, type ListModelsError, type ListModelsErrors, type ListModelsResponse, type ListModelsResponses, type ListProjectsData, type ListProjectsError, type ListProjectsErrors, type ListProjectsResponse, type ListProjectsResponses, type ListProvidersData, type ListProvidersError, type ListProvidersErrors, type ListProvidersResponse, type ListProvidersResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTraceGenerationsData, type ListTraceGenerationsError, type ListTraceGenerationsErrors, type ListTraceGenerationsResponse, type ListTraceGenerationsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type LoginData, type LoginError, type LoginErrors, type LoginResponse, type LoginResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutRequest, type LogoutResponse, type LogoutResponses, type McpConfig, type MergeContactData, type MergeContactError, type MergeContactErrors, type MergeContactResponse, type MergeContactResponses, type MergeId, type Message, type MessagesLimit, type Model, type ModelList, Models, NaturaliClient, type NaturaliClientOptions, type Offset, type Options, type PasswordResetConfirm, type PasswordResetRequest, type Project, type ProjectCreate, type ProjectId, type ProjectList, type ProjectUpdate, type ProjectUsage, Projects, type Provider, type ProviderCreate, type ProviderId, type ProviderList, type ProviderUpdate, Providers, type QueryKnowledgeCollectionData, type QueryKnowledgeCollectionError, type QueryKnowledgeCollectionErrors, type QueryKnowledgeCollectionResponse, type QueryKnowledgeCollectionResponses, type RefreshRequest, type RefreshSessionData, type RefreshSessionError, type RefreshSessionErrors, type RefreshSessionResponse, type RefreshSessionResponses, type ReingestKnowledgeDocumentData, type ReingestKnowledgeDocumentError, type ReingestKnowledgeDocumentErrors, type ReingestKnowledgeDocumentResponse, type ReingestKnowledgeDocumentResponses, type RequestPasswordResetData, type RequestPasswordResetError, type RequestPasswordResetErrors, type RequestPasswordResetResponses, type RevertContactMergeData, type RevertContactMergeError, type RevertContactMergeErrors, type RevertContactMergeResponse, type RevertContactMergeResponses, type RotateApiKeyData, type RotateApiKeyError, type RotateApiKeyErrors, type RotateApiKeyResponse, type RotateApiKeyResponses, type Session, type SessionCreate, type SessionGenerate, type SessionGeneration, type SessionId, type SessionMessage, type SessionMessageCreate, Sessions, type SetChannelBindingData, type SetChannelBindingError, type SetChannelBindingErrors, type SetChannelBindingResponse, type SetChannelBindingResponses, type SignupData, type SignupError, type SignupErrors, type SignupRequest, type SignupResponse, type SignupResponses, type Tool, type ToolChoice, type ToolContext, type ToolCreate, type ToolId, type ToolList, type ToolUpdate, Tools, type Trace, type TraceId, type TraceList, type TraceTreeNode, Traces, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateContactData, type UpdateContactError, type UpdateContactErrors, type UpdateContactResponse, type UpdateContactResponses, type UpdateKnowledgeCollectionData, type UpdateKnowledgeCollectionError, type UpdateKnowledgeCollectionErrors, type UpdateKnowledgeCollectionResponse, type UpdateKnowledgeCollectionResponses, type UpdateProjectData, type UpdateProjectError, type UpdateProjectErrors, type UpdateProjectResponse, type UpdateProjectResponses, type UpdateProviderData, type UpdateProviderError, type UpdateProviderErrors, type UpdateProviderResponse, type UpdateProviderResponses, type UpdateToolData, type UpdateToolError, type UpdateToolErrors, type UpdateToolResponse, type UpdateToolResponses, type UsageGroup, type UsageTokens, type User, type VerifyEmailData, type VerifyEmailError, type VerifyEmailErrors, type VerifyEmailRequest, type VerifyEmailResponse, type VerifyEmailResponses, createClient, createConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -5635,16 +5635,6 @@ declare class Traces {
|
|
|
5635
5635
|
//#endregion
|
|
5636
5636
|
//#region src/naturaliClient.d.ts
|
|
5637
5637
|
interface NaturaliClientOptions {
|
|
5638
|
-
/**
|
|
5639
|
-
* Origin of the naturali.ai API. Every operation path already carries the
|
|
5640
|
-
* `/v1` prefix, so this is the host only — not `https://…/v1`.
|
|
5641
|
-
*
|
|
5642
|
-
* Defaults to the current origin (`''`), which keeps a browser app
|
|
5643
|
-
* same-origin.
|
|
5644
|
-
*
|
|
5645
|
-
* @example 'https://api.naturali.ai'
|
|
5646
|
-
*/
|
|
5647
|
-
baseUrl?: string;
|
|
5648
5638
|
/**
|
|
5649
5639
|
* Bearer credential: a `nat_sk_…` API key or a session access JWT. Sets
|
|
5650
5640
|
* `Authorization: Bearer <token>` on every request.
|
|
@@ -5670,7 +5660,6 @@ interface NaturaliClientOptions {
|
|
|
5670
5660
|
* import { NaturaliClient } from '@naturali/sdk';
|
|
5671
5661
|
*
|
|
5672
5662
|
* const naturali = new NaturaliClient({
|
|
5673
|
-
* baseUrl: 'https://api.naturali.ai',
|
|
5674
5663
|
* token: process.env.NATURALI_TOKEN,
|
|
5675
5664
|
* });
|
|
5676
5665
|
*
|
|
@@ -5700,7 +5689,7 @@ declare class NaturaliClient {
|
|
|
5700
5689
|
readonly traces: typeof Traces;
|
|
5701
5690
|
/** The underlying HTTP client, for interceptors or one-off requests. */
|
|
5702
5691
|
readonly http: Client;
|
|
5703
|
-
constructor({
|
|
5692
|
+
constructor({ token, headers }?: NaturaliClientOptions);
|
|
5704
5693
|
}
|
|
5705
5694
|
//#endregion
|
|
5706
5695
|
export { type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageResponse, type AddSessionMessageResponses, type Agent, type AgentCreate, type AgentId, type AgentList, type AgentUpdate, Agents, type ApiKeyCreate, type ApiKeyCreated, type ApiKeyId, type ApiKeyList, type ApiKeyRecord, type ApiKeyUpdate, ApiKeys, Auth, type AuthSession, type Channel, type ChannelBinding, type ChannelBindingSet, type ChannelCreate, type ChannelId, type ChannelList, type ChannelUpdate, Channels, type ClientOptions, type CollectionId, type ConfirmPasswordResetData, type ConfirmPasswordResetError, type ConfirmPasswordResetErrors, type ConfirmPasswordResetResponse, type ConfirmPasswordResetResponses, type Contact, type ContactConversation, type ContactConversationList, type ContactCreate, type ContactId, type ContactIdentity, type ContactIdentityCreate, type ContactList, type ContactMerge, type ContactMergeList, type ContactMergeRequest, type ContactMergeResult, type ContactUpdate, Contacts, type Conversation, type ConversationId, type ConversationList, type ConversationMessage, type ConversationMessageList, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentResponse, type CreateAgentResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateContactData, type CreateContactError, type CreateContactErrors, type CreateContactIdentityData, type CreateContactIdentityError, type CreateContactIdentityErrors, type CreateContactIdentityResponse, type CreateContactIdentityResponses, type CreateContactResponse, type CreateContactResponses, type CreateGenerationData, type CreateGenerationError, type CreateGenerationErrors, type CreateGenerationResponse, type CreateGenerationResponses, type CreateKnowledgeCollectionData, type CreateKnowledgeCollectionError, type CreateKnowledgeCollectionErrors, type CreateKnowledgeCollectionResponse, type CreateKnowledgeCollectionResponses, type CreateKnowledgeDocumentData, type CreateKnowledgeDocumentError, type CreateKnowledgeDocumentErrors, type CreateKnowledgeDocumentResponse, type CreateKnowledgeDocumentResponses, type CreateProjectData, type CreateProjectError, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateProviderData, type CreateProviderError, type CreateProviderErrors, type CreateProviderResponse, type CreateProviderResponses, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionResponse, type CreateSessionResponses, type CreateToolData, type CreateToolError, type CreateToolErrors, type CreateToolResponse, type CreateToolResponses, type Credentials, type Cursor, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteChannelBindingData, type DeleteChannelBindingError, type DeleteChannelBindingErrors, type DeleteChannelBindingResponse, type DeleteChannelBindingResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteContactData, type DeleteContactError, type DeleteContactErrors, type DeleteContactIdentityData, type DeleteContactIdentityError, type DeleteContactIdentityErrors, type DeleteContactIdentityResponse, type DeleteContactIdentityResponses, type DeleteContactResponse, type DeleteContactResponses, type DeleteKnowledgeCollectionData, type DeleteKnowledgeCollectionError, type DeleteKnowledgeCollectionErrors, type DeleteKnowledgeCollectionResponse, type DeleteKnowledgeCollectionResponses, type DeleteKnowledgeDocumentData, type DeleteKnowledgeDocumentError, type DeleteKnowledgeDocumentErrors, type DeleteKnowledgeDocumentResponse, type DeleteKnowledgeDocumentResponses, type DeleteProjectData, type DeleteProjectError, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteProviderData, type DeleteProviderError, type DeleteProviderErrors, type DeleteProviderResponse, type DeleteProviderResponses, type DeleteToolData, type DeleteToolError, type DeleteToolErrors, type DeleteToolResponse, type DeleteToolResponses, type DiscordModes, type DocumentId, type ErrorResponse, type Force, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type Generation, type GenerationCreate, type GenerationId, type GenerationList, type GenerationResult, type GenerationStatus, Generations, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetApiKeyData, type GetApiKeyError, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetChannelBindingData, type GetChannelBindingError, type GetChannelBindingErrors, type GetChannelBindingResponse, type GetChannelBindingResponses, type GetChannelConversationData, type GetChannelConversationError, type GetChannelConversationErrors, type GetChannelConversationResponse, type GetChannelConversationResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetContactData, type GetContactError, type GetContactErrors, type GetContactResponse, type GetContactResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetGenerationData, type GetGenerationError, type GetGenerationErrors, type GetGenerationResponse, type GetGenerationResponses, type GetKnowledgeCollectionData, type GetKnowledgeCollectionError, type GetKnowledgeCollectionErrors, type GetKnowledgeCollectionResponse, type GetKnowledgeCollectionResponses, type GetKnowledgeDocumentData, type GetKnowledgeDocumentError, type GetKnowledgeDocumentErrors, type GetKnowledgeDocumentResponse, type GetKnowledgeDocumentResponses, type GetModelData, type GetModelError, type GetModelErrors, type GetModelResponse, type GetModelResponses, type GetProjectData, type GetProjectError, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetProjectUsageData, type GetProjectUsageError, type GetProjectUsageErrors, type GetProjectUsageResponse, type GetProjectUsageResponses, type GetProviderData, type GetProviderError, type GetProviderErrors, type GetProviderResponse, type GetProviderResponses, type GetSessionData, type GetSessionError, type GetSessionErrors, type GetSessionResponse, type GetSessionResponses, type GetToolData, type GetToolError, type GetToolErrors, type GetToolResponse, type GetToolResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type HttpExecute, type IdempotencyKey, type IdentityId, Knowledge, type KnowledgeChunk, type KnowledgeCollection, type KnowledgeCollectionCreate, type KnowledgeCollectionList, type KnowledgeCollectionUpdate, type KnowledgeDocument, type KnowledgeDocumentCreate, type KnowledgeDocumentList, type KnowledgeQueryRequest, type KnowledgeQueryResult, type Limit, type ListAgentGenerationsData, type ListAgentGenerationsError, type ListAgentGenerationsErrors, type ListAgentGenerationsResponse, type ListAgentGenerationsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListChannelConversationMessagesData, type ListChannelConversationMessagesError, type ListChannelConversationMessagesErrors, type ListChannelConversationMessagesResponse, type ListChannelConversationMessagesResponses, type ListChannelConversationsData, type ListChannelConversationsError, type ListChannelConversationsErrors, type ListChannelConversationsResponse, type ListChannelConversationsResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListContactConversationsData, type ListContactConversationsError, type ListContactConversationsErrors, type ListContactConversationsResponse, type ListContactConversationsResponses, type ListContactMergesData, type ListContactMergesError, type ListContactMergesErrors, type ListContactMergesResponse, type ListContactMergesResponses, type ListContactsData, type ListContactsError, type ListContactsErrors, type ListContactsResponse, type ListContactsResponses, type ListKnowledgeCollectionsData, type ListKnowledgeCollectionsError, type ListKnowledgeCollectionsErrors, type ListKnowledgeCollectionsResponse, type ListKnowledgeCollectionsResponses, type ListKnowledgeDocumentsData, type ListKnowledgeDocumentsError, type ListKnowledgeDocumentsErrors, type ListKnowledgeDocumentsResponse, type ListKnowledgeDocumentsResponses, type ListModelsData, type ListModelsError, type ListModelsErrors, type ListModelsResponse, type ListModelsResponses, type ListProjectsData, type ListProjectsError, type ListProjectsErrors, type ListProjectsResponse, type ListProjectsResponses, type ListProvidersData, type ListProvidersError, type ListProvidersErrors, type ListProvidersResponse, type ListProvidersResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTraceGenerationsData, type ListTraceGenerationsError, type ListTraceGenerationsErrors, type ListTraceGenerationsResponse, type ListTraceGenerationsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type LoginData, type LoginError, type LoginErrors, type LoginResponse, type LoginResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutRequest, type LogoutResponse, type LogoutResponses, type McpConfig, type MergeContactData, type MergeContactError, type MergeContactErrors, type MergeContactResponse, type MergeContactResponses, type MergeId, type Message, type MessagesLimit, type Model, type ModelList, Models, NaturaliClient, type NaturaliClientOptions, type Offset, type Options, type PasswordResetConfirm, type PasswordResetRequest, type Project, type ProjectCreate, type ProjectId, type ProjectList, type ProjectUpdate, type ProjectUsage, Projects, type Provider, type ProviderCreate, type ProviderId, type ProviderList, type ProviderUpdate, Providers, type QueryKnowledgeCollectionData, type QueryKnowledgeCollectionError, type QueryKnowledgeCollectionErrors, type QueryKnowledgeCollectionResponse, type QueryKnowledgeCollectionResponses, type RefreshRequest, type RefreshSessionData, type RefreshSessionError, type RefreshSessionErrors, type RefreshSessionResponse, type RefreshSessionResponses, type ReingestKnowledgeDocumentData, type ReingestKnowledgeDocumentError, type ReingestKnowledgeDocumentErrors, type ReingestKnowledgeDocumentResponse, type ReingestKnowledgeDocumentResponses, type RequestPasswordResetData, type RequestPasswordResetError, type RequestPasswordResetErrors, type RequestPasswordResetResponses, type RevertContactMergeData, type RevertContactMergeError, type RevertContactMergeErrors, type RevertContactMergeResponse, type RevertContactMergeResponses, type RotateApiKeyData, type RotateApiKeyError, type RotateApiKeyErrors, type RotateApiKeyResponse, type RotateApiKeyResponses, type Session, type SessionCreate, type SessionGenerate, type SessionGeneration, type SessionId, type SessionMessage, type SessionMessageCreate, Sessions, type SetChannelBindingData, type SetChannelBindingError, type SetChannelBindingErrors, type SetChannelBindingResponse, type SetChannelBindingResponses, type SignupData, type SignupError, type SignupErrors, type SignupRequest, type SignupResponse, type SignupResponses, type Tool, type ToolChoice, type ToolContext, type ToolCreate, type ToolId, type ToolList, type ToolUpdate, Tools, type Trace, type TraceId, type TraceList, type TraceTreeNode, Traces, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateContactData, type UpdateContactError, type UpdateContactErrors, type UpdateContactResponse, type UpdateContactResponses, type UpdateKnowledgeCollectionData, type UpdateKnowledgeCollectionError, type UpdateKnowledgeCollectionErrors, type UpdateKnowledgeCollectionResponse, type UpdateKnowledgeCollectionResponses, type UpdateProjectData, type UpdateProjectError, type UpdateProjectErrors, type UpdateProjectResponse, type UpdateProjectResponses, type UpdateProviderData, type UpdateProviderError, type UpdateProviderErrors, type UpdateProviderResponse, type UpdateProviderResponses, type UpdateToolData, type UpdateToolError, type UpdateToolErrors, type UpdateToolResponse, type UpdateToolResponses, type UsageGroup, type UsageTokens, type User, type VerifyEmailData, type VerifyEmailError, type VerifyEmailErrors, type VerifyEmailRequest, type VerifyEmailResponse, type VerifyEmailResponses, createClient, createConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1713,6 +1713,8 @@ const bindResource = (SdkClass, client) => {
|
|
|
1713
1713
|
return value;
|
|
1714
1714
|
} });
|
|
1715
1715
|
};
|
|
1716
|
+
/** The naturali.ai API origin. Not configurable — there is only one. */
|
|
1717
|
+
const API_BASE_URL = "https://api.naturali.ai";
|
|
1716
1718
|
/**
|
|
1717
1719
|
* The naturali.ai API client.
|
|
1718
1720
|
*
|
|
@@ -1723,7 +1725,6 @@ const bindResource = (SdkClass, client) => {
|
|
|
1723
1725
|
* import { NaturaliClient } from '@naturali/sdk';
|
|
1724
1726
|
*
|
|
1725
1727
|
* const naturali = new NaturaliClient({
|
|
1726
|
-
* baseUrl: 'https://api.naturali.ai',
|
|
1727
1728
|
* token: process.env.NATURALI_TOKEN,
|
|
1728
1729
|
* });
|
|
1729
1730
|
*
|
|
@@ -1753,9 +1754,9 @@ var NaturaliClient = class {
|
|
|
1753
1754
|
traces;
|
|
1754
1755
|
/** The underlying HTTP client, for interceptors or one-off requests. */
|
|
1755
1756
|
http;
|
|
1756
|
-
constructor({
|
|
1757
|
+
constructor({ token, headers } = {}) {
|
|
1757
1758
|
this.http = createClient(createConfig({
|
|
1758
|
-
baseUrl:
|
|
1759
|
+
baseUrl: API_BASE_URL,
|
|
1759
1760
|
headers: {
|
|
1760
1761
|
...token ? { Authorization: `Bearer ${token}` } : {},
|
|
1761
1762
|
...headers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,13 +36,14 @@
|
|
|
36
36
|
"tsdown": "^0.22.7",
|
|
37
37
|
"tsx": "^4.23.1",
|
|
38
38
|
"typescript": "~6.0.3",
|
|
39
|
-
"vitest": "^4.1.10"
|
|
39
|
+
"vitest": "^4.1.10",
|
|
40
|
+
"@naturali/api": "0.27.0"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
43
|
"generate": "tsx scripts/generate.ts",
|
|
43
|
-
"typecheck": "
|
|
44
|
-
"test": "
|
|
45
|
-
"build": "
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"build": "tsdown"
|
|
46
47
|
},
|
|
47
48
|
"main": "./dist/index.mjs",
|
|
48
49
|
"types": "./dist/index.d.mts"
|