@naturali/sdk 0.28.2 → 0.29.1
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/dist/index.cjs +32 -0
- package/dist/index.d.cts +82 -1
- package/dist/index.d.mts +82 -1
- package/dist/index.mjs +32 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -781,6 +781,38 @@ var Auth = class {
|
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
783
|
/**
|
|
784
|
+
* Email a sign-in code
|
|
785
|
+
*
|
|
786
|
+
* Emails a short numeric code to the address. Always responds 200 with the same body whether or not the address has an account, so it never leaks existence. A first-time address gets an account on its first successful verification, so this is both sign-up and log-in. Issuing a code invalidates any previous one for the same address.
|
|
787
|
+
*
|
|
788
|
+
*/
|
|
789
|
+
static requestSignInCode(options) {
|
|
790
|
+
return (options.client ?? client).post({
|
|
791
|
+
url: "/v1/auth/code",
|
|
792
|
+
...options,
|
|
793
|
+
headers: {
|
|
794
|
+
"Content-Type": "application/json",
|
|
795
|
+
...options.headers
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Redeem a sign-in code
|
|
801
|
+
*
|
|
802
|
+
* Exchanges an emailed code for a session, creating the account if the address is new. The code is single-use and short-lived. A code is destroyed after too many wrong guesses, since six digits is small enough to guess given unlimited attempts — the client must then request a new one rather than retry.
|
|
803
|
+
*
|
|
804
|
+
*/
|
|
805
|
+
static verifySignInCode(options) {
|
|
806
|
+
return (options.client ?? client).post({
|
|
807
|
+
url: "/v1/auth/code/verify",
|
|
808
|
+
...options,
|
|
809
|
+
headers: {
|
|
810
|
+
"Content-Type": "application/json",
|
|
811
|
+
...options.headers
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
784
816
|
* Refresh a session
|
|
785
817
|
*
|
|
786
818
|
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection).
|
package/dist/index.d.cts
CHANGED
|
@@ -517,6 +517,23 @@ type Credentials = {
|
|
|
517
517
|
email: string;
|
|
518
518
|
password: string;
|
|
519
519
|
};
|
|
520
|
+
type SignInCodeRequest = {
|
|
521
|
+
email: string;
|
|
522
|
+
};
|
|
523
|
+
type SignInCodeVerify = {
|
|
524
|
+
email: string;
|
|
525
|
+
/**
|
|
526
|
+
* The code from the email, as sent — digits only.
|
|
527
|
+
*/
|
|
528
|
+
code: string;
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* A deliberately uninformative confirmation. The wording is identical for a known and an unknown address so the response cannot be used to enumerate accounts.
|
|
532
|
+
*
|
|
533
|
+
*/
|
|
534
|
+
type Acknowledgement = {
|
|
535
|
+
message?: string;
|
|
536
|
+
};
|
|
520
537
|
type SignupRequest = Credentials & {
|
|
521
538
|
/**
|
|
522
539
|
* Display name for the user.
|
|
@@ -2388,6 +2405,56 @@ type LoginResponses = {
|
|
|
2388
2405
|
200: AuthSession;
|
|
2389
2406
|
};
|
|
2390
2407
|
type LoginResponse = LoginResponses[keyof LoginResponses];
|
|
2408
|
+
type RequestSignInCodeData = {
|
|
2409
|
+
body: SignInCodeRequest;
|
|
2410
|
+
path?: never;
|
|
2411
|
+
query?: never;
|
|
2412
|
+
url: '/v1/auth/code';
|
|
2413
|
+
};
|
|
2414
|
+
type RequestSignInCodeErrors = {
|
|
2415
|
+
/**
|
|
2416
|
+
* The request was malformed or failed validation.
|
|
2417
|
+
*/
|
|
2418
|
+
400: ErrorResponse;
|
|
2419
|
+
};
|
|
2420
|
+
type RequestSignInCodeError = RequestSignInCodeErrors[keyof RequestSignInCodeErrors];
|
|
2421
|
+
type RequestSignInCodeResponses = {
|
|
2422
|
+
/**
|
|
2423
|
+
* If the address can receive a code, one has been sent.
|
|
2424
|
+
*/
|
|
2425
|
+
200: Acknowledgement;
|
|
2426
|
+
};
|
|
2427
|
+
type RequestSignInCodeResponse = RequestSignInCodeResponses[keyof RequestSignInCodeResponses];
|
|
2428
|
+
type VerifySignInCodeData = {
|
|
2429
|
+
body: SignInCodeVerify;
|
|
2430
|
+
path?: never;
|
|
2431
|
+
query?: never;
|
|
2432
|
+
url: '/v1/auth/code/verify';
|
|
2433
|
+
};
|
|
2434
|
+
type VerifySignInCodeErrors = {
|
|
2435
|
+
/**
|
|
2436
|
+
* The request was malformed or failed validation.
|
|
2437
|
+
*/
|
|
2438
|
+
400: ErrorResponse;
|
|
2439
|
+
/**
|
|
2440
|
+
* The code is wrong, expired, or already used (`invalid_token` / `expired_token`).
|
|
2441
|
+
*
|
|
2442
|
+
*/
|
|
2443
|
+
401: ErrorResponse;
|
|
2444
|
+
/**
|
|
2445
|
+
* Too many incorrect attempts (`too_many_attempts`); the code has been destroyed and a new one must be requested.
|
|
2446
|
+
*
|
|
2447
|
+
*/
|
|
2448
|
+
429: ErrorResponse;
|
|
2449
|
+
};
|
|
2450
|
+
type VerifySignInCodeError = VerifySignInCodeErrors[keyof VerifySignInCodeErrors];
|
|
2451
|
+
type VerifySignInCodeResponses = {
|
|
2452
|
+
/**
|
|
2453
|
+
* Authenticated; a session is returned.
|
|
2454
|
+
*/
|
|
2455
|
+
200: AuthSession;
|
|
2456
|
+
};
|
|
2457
|
+
type VerifySignInCodeResponse = VerifySignInCodeResponses[keyof VerifySignInCodeResponses];
|
|
2391
2458
|
type RefreshSessionData = {
|
|
2392
2459
|
body: RefreshRequest;
|
|
2393
2460
|
path?: never;
|
|
@@ -5163,6 +5230,20 @@ declare class Auth {
|
|
|
5163
5230
|
* Exchanges email + password for an access JWT and a refresh token.
|
|
5164
5231
|
*/
|
|
5165
5232
|
static login<ThrowOnError extends boolean = false>(options: Options<LoginData, ThrowOnError>): RequestResult<LoginResponses, LoginErrors, ThrowOnError>;
|
|
5233
|
+
/**
|
|
5234
|
+
* Email a sign-in code
|
|
5235
|
+
*
|
|
5236
|
+
* Emails a short numeric code to the address. Always responds 200 with the same body whether or not the address has an account, so it never leaks existence. A first-time address gets an account on its first successful verification, so this is both sign-up and log-in. Issuing a code invalidates any previous one for the same address.
|
|
5237
|
+
*
|
|
5238
|
+
*/
|
|
5239
|
+
static requestSignInCode<ThrowOnError extends boolean = false>(options: Options<RequestSignInCodeData, ThrowOnError>): RequestResult<RequestSignInCodeResponses, RequestSignInCodeErrors, ThrowOnError>;
|
|
5240
|
+
/**
|
|
5241
|
+
* Redeem a sign-in code
|
|
5242
|
+
*
|
|
5243
|
+
* Exchanges an emailed code for a session, creating the account if the address is new. The code is single-use and short-lived. A code is destroyed after too many wrong guesses, since six digits is small enough to guess given unlimited attempts — the client must then request a new one rather than retry.
|
|
5244
|
+
*
|
|
5245
|
+
*/
|
|
5246
|
+
static verifySignInCode<ThrowOnError extends boolean = false>(options: Options<VerifySignInCodeData, ThrowOnError>): RequestResult<VerifySignInCodeResponses, VerifySignInCodeErrors, ThrowOnError>;
|
|
5166
5247
|
/**
|
|
5167
5248
|
* Refresh a session
|
|
5168
5249
|
*
|
|
@@ -5692,4 +5773,4 @@ declare class NaturaliClient {
|
|
|
5692
5773
|
constructor({ token, headers }?: NaturaliClientOptions);
|
|
5693
5774
|
}
|
|
5694
5775
|
//#endregion
|
|
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 };
|
|
5776
|
+
export { type Acknowledgement, 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 RequestSignInCodeData, type RequestSignInCodeError, type RequestSignInCodeErrors, type RequestSignInCodeResponse, type RequestSignInCodeResponses, 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 SignInCodeRequest, type SignInCodeVerify, 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, type VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -517,6 +517,23 @@ type Credentials = {
|
|
|
517
517
|
email: string;
|
|
518
518
|
password: string;
|
|
519
519
|
};
|
|
520
|
+
type SignInCodeRequest = {
|
|
521
|
+
email: string;
|
|
522
|
+
};
|
|
523
|
+
type SignInCodeVerify = {
|
|
524
|
+
email: string;
|
|
525
|
+
/**
|
|
526
|
+
* The code from the email, as sent — digits only.
|
|
527
|
+
*/
|
|
528
|
+
code: string;
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* A deliberately uninformative confirmation. The wording is identical for a known and an unknown address so the response cannot be used to enumerate accounts.
|
|
532
|
+
*
|
|
533
|
+
*/
|
|
534
|
+
type Acknowledgement = {
|
|
535
|
+
message?: string;
|
|
536
|
+
};
|
|
520
537
|
type SignupRequest = Credentials & {
|
|
521
538
|
/**
|
|
522
539
|
* Display name for the user.
|
|
@@ -2388,6 +2405,56 @@ type LoginResponses = {
|
|
|
2388
2405
|
200: AuthSession;
|
|
2389
2406
|
};
|
|
2390
2407
|
type LoginResponse = LoginResponses[keyof LoginResponses];
|
|
2408
|
+
type RequestSignInCodeData = {
|
|
2409
|
+
body: SignInCodeRequest;
|
|
2410
|
+
path?: never;
|
|
2411
|
+
query?: never;
|
|
2412
|
+
url: '/v1/auth/code';
|
|
2413
|
+
};
|
|
2414
|
+
type RequestSignInCodeErrors = {
|
|
2415
|
+
/**
|
|
2416
|
+
* The request was malformed or failed validation.
|
|
2417
|
+
*/
|
|
2418
|
+
400: ErrorResponse;
|
|
2419
|
+
};
|
|
2420
|
+
type RequestSignInCodeError = RequestSignInCodeErrors[keyof RequestSignInCodeErrors];
|
|
2421
|
+
type RequestSignInCodeResponses = {
|
|
2422
|
+
/**
|
|
2423
|
+
* If the address can receive a code, one has been sent.
|
|
2424
|
+
*/
|
|
2425
|
+
200: Acknowledgement;
|
|
2426
|
+
};
|
|
2427
|
+
type RequestSignInCodeResponse = RequestSignInCodeResponses[keyof RequestSignInCodeResponses];
|
|
2428
|
+
type VerifySignInCodeData = {
|
|
2429
|
+
body: SignInCodeVerify;
|
|
2430
|
+
path?: never;
|
|
2431
|
+
query?: never;
|
|
2432
|
+
url: '/v1/auth/code/verify';
|
|
2433
|
+
};
|
|
2434
|
+
type VerifySignInCodeErrors = {
|
|
2435
|
+
/**
|
|
2436
|
+
* The request was malformed or failed validation.
|
|
2437
|
+
*/
|
|
2438
|
+
400: ErrorResponse;
|
|
2439
|
+
/**
|
|
2440
|
+
* The code is wrong, expired, or already used (`invalid_token` / `expired_token`).
|
|
2441
|
+
*
|
|
2442
|
+
*/
|
|
2443
|
+
401: ErrorResponse;
|
|
2444
|
+
/**
|
|
2445
|
+
* Too many incorrect attempts (`too_many_attempts`); the code has been destroyed and a new one must be requested.
|
|
2446
|
+
*
|
|
2447
|
+
*/
|
|
2448
|
+
429: ErrorResponse;
|
|
2449
|
+
};
|
|
2450
|
+
type VerifySignInCodeError = VerifySignInCodeErrors[keyof VerifySignInCodeErrors];
|
|
2451
|
+
type VerifySignInCodeResponses = {
|
|
2452
|
+
/**
|
|
2453
|
+
* Authenticated; a session is returned.
|
|
2454
|
+
*/
|
|
2455
|
+
200: AuthSession;
|
|
2456
|
+
};
|
|
2457
|
+
type VerifySignInCodeResponse = VerifySignInCodeResponses[keyof VerifySignInCodeResponses];
|
|
2391
2458
|
type RefreshSessionData = {
|
|
2392
2459
|
body: RefreshRequest;
|
|
2393
2460
|
path?: never;
|
|
@@ -5163,6 +5230,20 @@ declare class Auth {
|
|
|
5163
5230
|
* Exchanges email + password for an access JWT and a refresh token.
|
|
5164
5231
|
*/
|
|
5165
5232
|
static login<ThrowOnError extends boolean = false>(options: Options<LoginData, ThrowOnError>): RequestResult<LoginResponses, LoginErrors, ThrowOnError>;
|
|
5233
|
+
/**
|
|
5234
|
+
* Email a sign-in code
|
|
5235
|
+
*
|
|
5236
|
+
* Emails a short numeric code to the address. Always responds 200 with the same body whether or not the address has an account, so it never leaks existence. A first-time address gets an account on its first successful verification, so this is both sign-up and log-in. Issuing a code invalidates any previous one for the same address.
|
|
5237
|
+
*
|
|
5238
|
+
*/
|
|
5239
|
+
static requestSignInCode<ThrowOnError extends boolean = false>(options: Options<RequestSignInCodeData, ThrowOnError>): RequestResult<RequestSignInCodeResponses, RequestSignInCodeErrors, ThrowOnError>;
|
|
5240
|
+
/**
|
|
5241
|
+
* Redeem a sign-in code
|
|
5242
|
+
*
|
|
5243
|
+
* Exchanges an emailed code for a session, creating the account if the address is new. The code is single-use and short-lived. A code is destroyed after too many wrong guesses, since six digits is small enough to guess given unlimited attempts — the client must then request a new one rather than retry.
|
|
5244
|
+
*
|
|
5245
|
+
*/
|
|
5246
|
+
static verifySignInCode<ThrowOnError extends boolean = false>(options: Options<VerifySignInCodeData, ThrowOnError>): RequestResult<VerifySignInCodeResponses, VerifySignInCodeErrors, ThrowOnError>;
|
|
5166
5247
|
/**
|
|
5167
5248
|
* Refresh a session
|
|
5168
5249
|
*
|
|
@@ -5692,4 +5773,4 @@ declare class NaturaliClient {
|
|
|
5692
5773
|
constructor({ token, headers }?: NaturaliClientOptions);
|
|
5693
5774
|
}
|
|
5694
5775
|
//#endregion
|
|
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 };
|
|
5776
|
+
export { type Acknowledgement, 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 RequestSignInCodeData, type RequestSignInCodeError, type RequestSignInCodeErrors, type RequestSignInCodeResponse, type RequestSignInCodeResponses, 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 SignInCodeRequest, type SignInCodeVerify, 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, type VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -780,6 +780,38 @@ var Auth = class {
|
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
|
+
* Email a sign-in code
|
|
784
|
+
*
|
|
785
|
+
* Emails a short numeric code to the address. Always responds 200 with the same body whether or not the address has an account, so it never leaks existence. A first-time address gets an account on its first successful verification, so this is both sign-up and log-in. Issuing a code invalidates any previous one for the same address.
|
|
786
|
+
*
|
|
787
|
+
*/
|
|
788
|
+
static requestSignInCode(options) {
|
|
789
|
+
return (options.client ?? client).post({
|
|
790
|
+
url: "/v1/auth/code",
|
|
791
|
+
...options,
|
|
792
|
+
headers: {
|
|
793
|
+
"Content-Type": "application/json",
|
|
794
|
+
...options.headers
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Redeem a sign-in code
|
|
800
|
+
*
|
|
801
|
+
* Exchanges an emailed code for a session, creating the account if the address is new. The code is single-use and short-lived. A code is destroyed after too many wrong guesses, since six digits is small enough to guess given unlimited attempts — the client must then request a new one rather than retry.
|
|
802
|
+
*
|
|
803
|
+
*/
|
|
804
|
+
static verifySignInCode(options) {
|
|
805
|
+
return (options.client ?? client).post({
|
|
806
|
+
url: "/v1/auth/code/verify",
|
|
807
|
+
...options,
|
|
808
|
+
headers: {
|
|
809
|
+
"Content-Type": "application/json",
|
|
810
|
+
...options.headers
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
783
815
|
* Refresh a session
|
|
784
816
|
*
|
|
785
817
|
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"tsx": "^4.23.1",
|
|
38
38
|
"typescript": "~6.0.3",
|
|
39
39
|
"vitest": "^4.1.10",
|
|
40
|
-
"@naturali/api": "0.
|
|
40
|
+
"@naturali/api": "0.29.1"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|