@naturali/sdk 0.29.1 → 0.31.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/dist/index.cjs +2 -79
- package/dist/index.d.cts +6 -174
- package/dist/index.d.mts +6 -174
- package/dist/index.mjs +2 -79
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -749,37 +749,6 @@ var ApiKeys = class {
|
|
|
749
749
|
}
|
|
750
750
|
};
|
|
751
751
|
var Auth = class {
|
|
752
|
-
/**
|
|
753
|
-
* Create an account
|
|
754
|
-
*
|
|
755
|
-
* Creates a user and opens a session. A verification email is sent separately; unverified accounts may be limited until verified.
|
|
756
|
-
*
|
|
757
|
-
*/
|
|
758
|
-
static signup(options) {
|
|
759
|
-
return (options.client ?? client).post({
|
|
760
|
-
url: "/v1/auth/signup",
|
|
761
|
-
...options,
|
|
762
|
-
headers: {
|
|
763
|
-
"Content-Type": "application/json",
|
|
764
|
-
...options.headers
|
|
765
|
-
}
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Log in
|
|
770
|
-
*
|
|
771
|
-
* Exchanges email + password for an access JWT and a refresh token.
|
|
772
|
-
*/
|
|
773
|
-
static login(options) {
|
|
774
|
-
return (options.client ?? client).post({
|
|
775
|
-
url: "/v1/auth/login",
|
|
776
|
-
...options,
|
|
777
|
-
headers: {
|
|
778
|
-
"Content-Type": "application/json",
|
|
779
|
-
...options.headers
|
|
780
|
-
}
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
752
|
/**
|
|
784
753
|
* Email a sign-in code
|
|
785
754
|
*
|
|
@@ -815,7 +784,7 @@ var Auth = class {
|
|
|
815
784
|
/**
|
|
816
785
|
* Refresh a session
|
|
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).
|
|
787
|
+
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
|
|
819
788
|
*
|
|
820
789
|
*/
|
|
821
790
|
static refreshSession(options) {
|
|
@@ -831,7 +800,7 @@ var Auth = class {
|
|
|
831
800
|
/**
|
|
832
801
|
* Log out
|
|
833
802
|
*
|
|
834
|
-
* Revokes the current refresh token (and its rotation family). Pass `all: true` to revoke every active session for the user.
|
|
803
|
+
* Revokes the current refresh token (and its rotation family) and clears the `refresh_token` cookie. Pass `all: true` to revoke every active session for the user.
|
|
835
804
|
*
|
|
836
805
|
*/
|
|
837
806
|
static logout(options) {
|
|
@@ -845,52 +814,6 @@ var Auth = class {
|
|
|
845
814
|
});
|
|
846
815
|
}
|
|
847
816
|
/**
|
|
848
|
-
* Request a password reset
|
|
849
|
-
*
|
|
850
|
-
* Sends a password-reset email if the address has an account. Always responds 202 so account existence is never leaked.
|
|
851
|
-
*
|
|
852
|
-
*/
|
|
853
|
-
static requestPasswordReset(options) {
|
|
854
|
-
return (options.client ?? client).post({
|
|
855
|
-
url: "/v1/auth/password/reset-request",
|
|
856
|
-
...options,
|
|
857
|
-
headers: {
|
|
858
|
-
"Content-Type": "application/json",
|
|
859
|
-
...options.headers
|
|
860
|
-
}
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
/**
|
|
864
|
-
* Complete a password reset
|
|
865
|
-
*
|
|
866
|
-
* Sets a new password using a valid one-time reset token, then revokes existing sessions.
|
|
867
|
-
*/
|
|
868
|
-
static confirmPasswordReset(options) {
|
|
869
|
-
return (options.client ?? client).post({
|
|
870
|
-
url: "/v1/auth/password/reset",
|
|
871
|
-
...options,
|
|
872
|
-
headers: {
|
|
873
|
-
"Content-Type": "application/json",
|
|
874
|
-
...options.headers
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
/**
|
|
879
|
-
* Verify an email address
|
|
880
|
-
*
|
|
881
|
-
* Confirms an email address using a one-time verification token.
|
|
882
|
-
*/
|
|
883
|
-
static verifyEmail(options) {
|
|
884
|
-
return (options.client ?? client).post({
|
|
885
|
-
url: "/v1/auth/verify-email",
|
|
886
|
-
...options,
|
|
887
|
-
headers: {
|
|
888
|
-
"Content-Type": "application/json",
|
|
889
|
-
...options.headers
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
817
|
* Get the current identity
|
|
895
818
|
*
|
|
896
819
|
* Returns the user behind the presented access token.
|
package/dist/index.d.cts
CHANGED
|
@@ -513,10 +513,6 @@ type ApiKeyList = {
|
|
|
513
513
|
data: Array<ApiKeyRecord>;
|
|
514
514
|
next_cursor: string | null;
|
|
515
515
|
};
|
|
516
|
-
type Credentials = {
|
|
517
|
-
email: string;
|
|
518
|
-
password: string;
|
|
519
|
-
};
|
|
520
516
|
type SignInCodeRequest = {
|
|
521
517
|
email: string;
|
|
522
518
|
};
|
|
@@ -534,14 +530,8 @@ type SignInCodeVerify = {
|
|
|
534
530
|
type Acknowledgement = {
|
|
535
531
|
message?: string;
|
|
536
532
|
};
|
|
537
|
-
type SignupRequest = Credentials & {
|
|
538
|
-
/**
|
|
539
|
-
* Display name for the user.
|
|
540
|
-
*/
|
|
541
|
-
name?: string;
|
|
542
|
-
};
|
|
543
533
|
/**
|
|
544
|
-
* A short-lived access JWT plus a rotating refresh token.
|
|
534
|
+
* A short-lived access JWT plus a rotating refresh token. The refresh token is also set as an httpOnly, SameSite=Lax cookie scoped to `/v1/auth` (Secure whenever the connection is https), which is what carries a browser session across a reload; the body copy is for clients with no cookie jar, such as the CLI.
|
|
545
535
|
*
|
|
546
536
|
*/
|
|
547
537
|
type AuthSession = {
|
|
@@ -561,7 +551,8 @@ type AuthSession = {
|
|
|
561
551
|
user: User;
|
|
562
552
|
};
|
|
563
553
|
/**
|
|
564
|
-
*
|
|
554
|
+
* Send an empty object from a browser — the httpOnly `refresh_token` cookie is presented instead, and takes over when the body omits the field.
|
|
555
|
+
*
|
|
565
556
|
*/
|
|
566
557
|
type RefreshRequest = {
|
|
567
558
|
refresh_token?: string;
|
|
@@ -576,22 +567,6 @@ type LogoutRequest = {
|
|
|
576
567
|
*/
|
|
577
568
|
all?: boolean;
|
|
578
569
|
};
|
|
579
|
-
type PasswordResetRequest = {
|
|
580
|
-
email: string;
|
|
581
|
-
};
|
|
582
|
-
type PasswordResetConfirm = {
|
|
583
|
-
/**
|
|
584
|
-
* One-time reset token from the email link.
|
|
585
|
-
*/
|
|
586
|
-
token: string;
|
|
587
|
-
new_password: string;
|
|
588
|
-
};
|
|
589
|
-
type VerifyEmailRequest = {
|
|
590
|
-
/**
|
|
591
|
-
* One-time verification token from the email link.
|
|
592
|
-
*/
|
|
593
|
-
token: string;
|
|
594
|
-
};
|
|
595
570
|
type User = {
|
|
596
571
|
/**
|
|
597
572
|
* Public user ID (user_ prefix).
|
|
@@ -2353,58 +2328,6 @@ type RotateApiKeyResponses = {
|
|
|
2353
2328
|
200: ApiKeyCreated;
|
|
2354
2329
|
};
|
|
2355
2330
|
type RotateApiKeyResponse = RotateApiKeyResponses[keyof RotateApiKeyResponses];
|
|
2356
|
-
type SignupData = {
|
|
2357
|
-
body: SignupRequest;
|
|
2358
|
-
path?: never;
|
|
2359
|
-
query?: never;
|
|
2360
|
-
url: '/v1/auth/signup';
|
|
2361
|
-
};
|
|
2362
|
-
type SignupErrors = {
|
|
2363
|
-
/**
|
|
2364
|
-
* The request was malformed or failed validation.
|
|
2365
|
-
*/
|
|
2366
|
-
400: ErrorResponse;
|
|
2367
|
-
/**
|
|
2368
|
-
* An account with this email already exists.
|
|
2369
|
-
*/
|
|
2370
|
-
409: ErrorResponse;
|
|
2371
|
-
};
|
|
2372
|
-
type SignupError = SignupErrors[keyof SignupErrors];
|
|
2373
|
-
type SignupResponses = {
|
|
2374
|
-
/**
|
|
2375
|
-
* Account created; a session is returned.
|
|
2376
|
-
*/
|
|
2377
|
-
201: AuthSession;
|
|
2378
|
-
};
|
|
2379
|
-
type SignupResponse = SignupResponses[keyof SignupResponses];
|
|
2380
|
-
type LoginData = {
|
|
2381
|
-
body: Credentials;
|
|
2382
|
-
path?: never;
|
|
2383
|
-
query?: never;
|
|
2384
|
-
url: '/v1/auth/login';
|
|
2385
|
-
};
|
|
2386
|
-
type LoginErrors = {
|
|
2387
|
-
/**
|
|
2388
|
-
* The request was malformed or failed validation.
|
|
2389
|
-
*/
|
|
2390
|
-
400: ErrorResponse;
|
|
2391
|
-
/**
|
|
2392
|
-
* Invalid email or password.
|
|
2393
|
-
*/
|
|
2394
|
-
401: ErrorResponse;
|
|
2395
|
-
/**
|
|
2396
|
-
* Too many attempts — the account is temporarily locked.
|
|
2397
|
-
*/
|
|
2398
|
-
429: ErrorResponse;
|
|
2399
|
-
};
|
|
2400
|
-
type LoginError = LoginErrors[keyof LoginErrors];
|
|
2401
|
-
type LoginResponses = {
|
|
2402
|
-
/**
|
|
2403
|
-
* Authenticated; a session is returned.
|
|
2404
|
-
*/
|
|
2405
|
-
200: AuthSession;
|
|
2406
|
-
};
|
|
2407
|
-
type LoginResponse = LoginResponses[keyof LoginResponses];
|
|
2408
2331
|
type RequestSignInCodeData = {
|
|
2409
2332
|
body: SignInCodeRequest;
|
|
2410
2333
|
path?: never;
|
|
@@ -2495,65 +2418,6 @@ type LogoutResponses = {
|
|
|
2495
2418
|
204: void;
|
|
2496
2419
|
};
|
|
2497
2420
|
type LogoutResponse = LogoutResponses[keyof LogoutResponses];
|
|
2498
|
-
type RequestPasswordResetData = {
|
|
2499
|
-
body: PasswordResetRequest;
|
|
2500
|
-
path?: never;
|
|
2501
|
-
query?: never;
|
|
2502
|
-
url: '/v1/auth/password/reset-request';
|
|
2503
|
-
};
|
|
2504
|
-
type RequestPasswordResetErrors = {
|
|
2505
|
-
/**
|
|
2506
|
-
* The request was malformed or failed validation.
|
|
2507
|
-
*/
|
|
2508
|
-
400: ErrorResponse;
|
|
2509
|
-
};
|
|
2510
|
-
type RequestPasswordResetError = RequestPasswordResetErrors[keyof RequestPasswordResetErrors];
|
|
2511
|
-
type RequestPasswordResetResponses = {
|
|
2512
|
-
/**
|
|
2513
|
-
* If the email maps to an account, a reset link has been sent.
|
|
2514
|
-
*/
|
|
2515
|
-
202: unknown;
|
|
2516
|
-
};
|
|
2517
|
-
type ConfirmPasswordResetData = {
|
|
2518
|
-
body: PasswordResetConfirm;
|
|
2519
|
-
path?: never;
|
|
2520
|
-
query?: never;
|
|
2521
|
-
url: '/v1/auth/password/reset';
|
|
2522
|
-
};
|
|
2523
|
-
type ConfirmPasswordResetErrors = {
|
|
2524
|
-
/**
|
|
2525
|
-
* The reset token is invalid or expired.
|
|
2526
|
-
*/
|
|
2527
|
-
400: ErrorResponse;
|
|
2528
|
-
};
|
|
2529
|
-
type ConfirmPasswordResetError = ConfirmPasswordResetErrors[keyof ConfirmPasswordResetErrors];
|
|
2530
|
-
type ConfirmPasswordResetResponses = {
|
|
2531
|
-
/**
|
|
2532
|
-
* Password updated; existing sessions revoked.
|
|
2533
|
-
*/
|
|
2534
|
-
204: void;
|
|
2535
|
-
};
|
|
2536
|
-
type ConfirmPasswordResetResponse = ConfirmPasswordResetResponses[keyof ConfirmPasswordResetResponses];
|
|
2537
|
-
type VerifyEmailData = {
|
|
2538
|
-
body: VerifyEmailRequest;
|
|
2539
|
-
path?: never;
|
|
2540
|
-
query?: never;
|
|
2541
|
-
url: '/v1/auth/verify-email';
|
|
2542
|
-
};
|
|
2543
|
-
type VerifyEmailErrors = {
|
|
2544
|
-
/**
|
|
2545
|
-
* The verification token is invalid or expired.
|
|
2546
|
-
*/
|
|
2547
|
-
400: ErrorResponse;
|
|
2548
|
-
};
|
|
2549
|
-
type VerifyEmailError = VerifyEmailErrors[keyof VerifyEmailErrors];
|
|
2550
|
-
type VerifyEmailResponses = {
|
|
2551
|
-
/**
|
|
2552
|
-
* Email verified.
|
|
2553
|
-
*/
|
|
2554
|
-
204: void;
|
|
2555
|
-
};
|
|
2556
|
-
type VerifyEmailResponse = VerifyEmailResponses[keyof VerifyEmailResponses];
|
|
2557
2421
|
type GetCurrentUserData = {
|
|
2558
2422
|
body?: never;
|
|
2559
2423
|
path?: never;
|
|
@@ -5217,19 +5081,6 @@ declare class ApiKeys {
|
|
|
5217
5081
|
static rotateApiKey<ThrowOnError extends boolean = false>(options: Options<RotateApiKeyData, ThrowOnError>): RequestResult<RotateApiKeyResponses, RotateApiKeyErrors, ThrowOnError>;
|
|
5218
5082
|
}
|
|
5219
5083
|
declare class Auth {
|
|
5220
|
-
/**
|
|
5221
|
-
* Create an account
|
|
5222
|
-
*
|
|
5223
|
-
* Creates a user and opens a session. A verification email is sent separately; unverified accounts may be limited until verified.
|
|
5224
|
-
*
|
|
5225
|
-
*/
|
|
5226
|
-
static signup<ThrowOnError extends boolean = false>(options: Options<SignupData, ThrowOnError>): RequestResult<SignupResponses, SignupErrors, ThrowOnError>;
|
|
5227
|
-
/**
|
|
5228
|
-
* Log in
|
|
5229
|
-
*
|
|
5230
|
-
* Exchanges email + password for an access JWT and a refresh token.
|
|
5231
|
-
*/
|
|
5232
|
-
static login<ThrowOnError extends boolean = false>(options: Options<LoginData, ThrowOnError>): RequestResult<LoginResponses, LoginErrors, ThrowOnError>;
|
|
5233
5084
|
/**
|
|
5234
5085
|
* Email a sign-in code
|
|
5235
5086
|
*
|
|
@@ -5247,36 +5098,17 @@ declare class Auth {
|
|
|
5247
5098
|
/**
|
|
5248
5099
|
* Refresh a session
|
|
5249
5100
|
*
|
|
5250
|
-
* 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).
|
|
5101
|
+
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
|
|
5251
5102
|
*
|
|
5252
5103
|
*/
|
|
5253
5104
|
static refreshSession<ThrowOnError extends boolean = false>(options: Options<RefreshSessionData, ThrowOnError>): RequestResult<RefreshSessionResponses, RefreshSessionErrors, ThrowOnError>;
|
|
5254
5105
|
/**
|
|
5255
5106
|
* Log out
|
|
5256
5107
|
*
|
|
5257
|
-
* Revokes the current refresh token (and its rotation family). Pass `all: true` to revoke every active session for the user.
|
|
5108
|
+
* Revokes the current refresh token (and its rotation family) and clears the `refresh_token` cookie. Pass `all: true` to revoke every active session for the user.
|
|
5258
5109
|
*
|
|
5259
5110
|
*/
|
|
5260
5111
|
static logout<ThrowOnError extends boolean = false>(options?: Options<LogoutData, ThrowOnError>): RequestResult<LogoutResponses, LogoutErrors, ThrowOnError>;
|
|
5261
|
-
/**
|
|
5262
|
-
* Request a password reset
|
|
5263
|
-
*
|
|
5264
|
-
* Sends a password-reset email if the address has an account. Always responds 202 so account existence is never leaked.
|
|
5265
|
-
*
|
|
5266
|
-
*/
|
|
5267
|
-
static requestPasswordReset<ThrowOnError extends boolean = false>(options: Options<RequestPasswordResetData, ThrowOnError>): RequestResult<RequestPasswordResetResponses, RequestPasswordResetErrors, ThrowOnError>;
|
|
5268
|
-
/**
|
|
5269
|
-
* Complete a password reset
|
|
5270
|
-
*
|
|
5271
|
-
* Sets a new password using a valid one-time reset token, then revokes existing sessions.
|
|
5272
|
-
*/
|
|
5273
|
-
static confirmPasswordReset<ThrowOnError extends boolean = false>(options: Options<ConfirmPasswordResetData, ThrowOnError>): RequestResult<ConfirmPasswordResetResponses, ConfirmPasswordResetErrors, ThrowOnError>;
|
|
5274
|
-
/**
|
|
5275
|
-
* Verify an email address
|
|
5276
|
-
*
|
|
5277
|
-
* Confirms an email address using a one-time verification token.
|
|
5278
|
-
*/
|
|
5279
|
-
static verifyEmail<ThrowOnError extends boolean = false>(options: Options<VerifyEmailData, ThrowOnError>): RequestResult<VerifyEmailResponses, VerifyEmailErrors, ThrowOnError>;
|
|
5280
5112
|
/**
|
|
5281
5113
|
* Get the current identity
|
|
5282
5114
|
*
|
|
@@ -5773,4 +5605,4 @@ declare class NaturaliClient {
|
|
|
5773
5605
|
constructor({ token, headers }?: NaturaliClientOptions);
|
|
5774
5606
|
}
|
|
5775
5607
|
//#endregion
|
|
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 };
|
|
5608
|
+
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 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 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 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 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 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 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 VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -513,10 +513,6 @@ type ApiKeyList = {
|
|
|
513
513
|
data: Array<ApiKeyRecord>;
|
|
514
514
|
next_cursor: string | null;
|
|
515
515
|
};
|
|
516
|
-
type Credentials = {
|
|
517
|
-
email: string;
|
|
518
|
-
password: string;
|
|
519
|
-
};
|
|
520
516
|
type SignInCodeRequest = {
|
|
521
517
|
email: string;
|
|
522
518
|
};
|
|
@@ -534,14 +530,8 @@ type SignInCodeVerify = {
|
|
|
534
530
|
type Acknowledgement = {
|
|
535
531
|
message?: string;
|
|
536
532
|
};
|
|
537
|
-
type SignupRequest = Credentials & {
|
|
538
|
-
/**
|
|
539
|
-
* Display name for the user.
|
|
540
|
-
*/
|
|
541
|
-
name?: string;
|
|
542
|
-
};
|
|
543
533
|
/**
|
|
544
|
-
* A short-lived access JWT plus a rotating refresh token.
|
|
534
|
+
* A short-lived access JWT plus a rotating refresh token. The refresh token is also set as an httpOnly, SameSite=Lax cookie scoped to `/v1/auth` (Secure whenever the connection is https), which is what carries a browser session across a reload; the body copy is for clients with no cookie jar, such as the CLI.
|
|
545
535
|
*
|
|
546
536
|
*/
|
|
547
537
|
type AuthSession = {
|
|
@@ -561,7 +551,8 @@ type AuthSession = {
|
|
|
561
551
|
user: User;
|
|
562
552
|
};
|
|
563
553
|
/**
|
|
564
|
-
*
|
|
554
|
+
* Send an empty object from a browser — the httpOnly `refresh_token` cookie is presented instead, and takes over when the body omits the field.
|
|
555
|
+
*
|
|
565
556
|
*/
|
|
566
557
|
type RefreshRequest = {
|
|
567
558
|
refresh_token?: string;
|
|
@@ -576,22 +567,6 @@ type LogoutRequest = {
|
|
|
576
567
|
*/
|
|
577
568
|
all?: boolean;
|
|
578
569
|
};
|
|
579
|
-
type PasswordResetRequest = {
|
|
580
|
-
email: string;
|
|
581
|
-
};
|
|
582
|
-
type PasswordResetConfirm = {
|
|
583
|
-
/**
|
|
584
|
-
* One-time reset token from the email link.
|
|
585
|
-
*/
|
|
586
|
-
token: string;
|
|
587
|
-
new_password: string;
|
|
588
|
-
};
|
|
589
|
-
type VerifyEmailRequest = {
|
|
590
|
-
/**
|
|
591
|
-
* One-time verification token from the email link.
|
|
592
|
-
*/
|
|
593
|
-
token: string;
|
|
594
|
-
};
|
|
595
570
|
type User = {
|
|
596
571
|
/**
|
|
597
572
|
* Public user ID (user_ prefix).
|
|
@@ -2353,58 +2328,6 @@ type RotateApiKeyResponses = {
|
|
|
2353
2328
|
200: ApiKeyCreated;
|
|
2354
2329
|
};
|
|
2355
2330
|
type RotateApiKeyResponse = RotateApiKeyResponses[keyof RotateApiKeyResponses];
|
|
2356
|
-
type SignupData = {
|
|
2357
|
-
body: SignupRequest;
|
|
2358
|
-
path?: never;
|
|
2359
|
-
query?: never;
|
|
2360
|
-
url: '/v1/auth/signup';
|
|
2361
|
-
};
|
|
2362
|
-
type SignupErrors = {
|
|
2363
|
-
/**
|
|
2364
|
-
* The request was malformed or failed validation.
|
|
2365
|
-
*/
|
|
2366
|
-
400: ErrorResponse;
|
|
2367
|
-
/**
|
|
2368
|
-
* An account with this email already exists.
|
|
2369
|
-
*/
|
|
2370
|
-
409: ErrorResponse;
|
|
2371
|
-
};
|
|
2372
|
-
type SignupError = SignupErrors[keyof SignupErrors];
|
|
2373
|
-
type SignupResponses = {
|
|
2374
|
-
/**
|
|
2375
|
-
* Account created; a session is returned.
|
|
2376
|
-
*/
|
|
2377
|
-
201: AuthSession;
|
|
2378
|
-
};
|
|
2379
|
-
type SignupResponse = SignupResponses[keyof SignupResponses];
|
|
2380
|
-
type LoginData = {
|
|
2381
|
-
body: Credentials;
|
|
2382
|
-
path?: never;
|
|
2383
|
-
query?: never;
|
|
2384
|
-
url: '/v1/auth/login';
|
|
2385
|
-
};
|
|
2386
|
-
type LoginErrors = {
|
|
2387
|
-
/**
|
|
2388
|
-
* The request was malformed or failed validation.
|
|
2389
|
-
*/
|
|
2390
|
-
400: ErrorResponse;
|
|
2391
|
-
/**
|
|
2392
|
-
* Invalid email or password.
|
|
2393
|
-
*/
|
|
2394
|
-
401: ErrorResponse;
|
|
2395
|
-
/**
|
|
2396
|
-
* Too many attempts — the account is temporarily locked.
|
|
2397
|
-
*/
|
|
2398
|
-
429: ErrorResponse;
|
|
2399
|
-
};
|
|
2400
|
-
type LoginError = LoginErrors[keyof LoginErrors];
|
|
2401
|
-
type LoginResponses = {
|
|
2402
|
-
/**
|
|
2403
|
-
* Authenticated; a session is returned.
|
|
2404
|
-
*/
|
|
2405
|
-
200: AuthSession;
|
|
2406
|
-
};
|
|
2407
|
-
type LoginResponse = LoginResponses[keyof LoginResponses];
|
|
2408
2331
|
type RequestSignInCodeData = {
|
|
2409
2332
|
body: SignInCodeRequest;
|
|
2410
2333
|
path?: never;
|
|
@@ -2495,65 +2418,6 @@ type LogoutResponses = {
|
|
|
2495
2418
|
204: void;
|
|
2496
2419
|
};
|
|
2497
2420
|
type LogoutResponse = LogoutResponses[keyof LogoutResponses];
|
|
2498
|
-
type RequestPasswordResetData = {
|
|
2499
|
-
body: PasswordResetRequest;
|
|
2500
|
-
path?: never;
|
|
2501
|
-
query?: never;
|
|
2502
|
-
url: '/v1/auth/password/reset-request';
|
|
2503
|
-
};
|
|
2504
|
-
type RequestPasswordResetErrors = {
|
|
2505
|
-
/**
|
|
2506
|
-
* The request was malformed or failed validation.
|
|
2507
|
-
*/
|
|
2508
|
-
400: ErrorResponse;
|
|
2509
|
-
};
|
|
2510
|
-
type RequestPasswordResetError = RequestPasswordResetErrors[keyof RequestPasswordResetErrors];
|
|
2511
|
-
type RequestPasswordResetResponses = {
|
|
2512
|
-
/**
|
|
2513
|
-
* If the email maps to an account, a reset link has been sent.
|
|
2514
|
-
*/
|
|
2515
|
-
202: unknown;
|
|
2516
|
-
};
|
|
2517
|
-
type ConfirmPasswordResetData = {
|
|
2518
|
-
body: PasswordResetConfirm;
|
|
2519
|
-
path?: never;
|
|
2520
|
-
query?: never;
|
|
2521
|
-
url: '/v1/auth/password/reset';
|
|
2522
|
-
};
|
|
2523
|
-
type ConfirmPasswordResetErrors = {
|
|
2524
|
-
/**
|
|
2525
|
-
* The reset token is invalid or expired.
|
|
2526
|
-
*/
|
|
2527
|
-
400: ErrorResponse;
|
|
2528
|
-
};
|
|
2529
|
-
type ConfirmPasswordResetError = ConfirmPasswordResetErrors[keyof ConfirmPasswordResetErrors];
|
|
2530
|
-
type ConfirmPasswordResetResponses = {
|
|
2531
|
-
/**
|
|
2532
|
-
* Password updated; existing sessions revoked.
|
|
2533
|
-
*/
|
|
2534
|
-
204: void;
|
|
2535
|
-
};
|
|
2536
|
-
type ConfirmPasswordResetResponse = ConfirmPasswordResetResponses[keyof ConfirmPasswordResetResponses];
|
|
2537
|
-
type VerifyEmailData = {
|
|
2538
|
-
body: VerifyEmailRequest;
|
|
2539
|
-
path?: never;
|
|
2540
|
-
query?: never;
|
|
2541
|
-
url: '/v1/auth/verify-email';
|
|
2542
|
-
};
|
|
2543
|
-
type VerifyEmailErrors = {
|
|
2544
|
-
/**
|
|
2545
|
-
* The verification token is invalid or expired.
|
|
2546
|
-
*/
|
|
2547
|
-
400: ErrorResponse;
|
|
2548
|
-
};
|
|
2549
|
-
type VerifyEmailError = VerifyEmailErrors[keyof VerifyEmailErrors];
|
|
2550
|
-
type VerifyEmailResponses = {
|
|
2551
|
-
/**
|
|
2552
|
-
* Email verified.
|
|
2553
|
-
*/
|
|
2554
|
-
204: void;
|
|
2555
|
-
};
|
|
2556
|
-
type VerifyEmailResponse = VerifyEmailResponses[keyof VerifyEmailResponses];
|
|
2557
2421
|
type GetCurrentUserData = {
|
|
2558
2422
|
body?: never;
|
|
2559
2423
|
path?: never;
|
|
@@ -5217,19 +5081,6 @@ declare class ApiKeys {
|
|
|
5217
5081
|
static rotateApiKey<ThrowOnError extends boolean = false>(options: Options<RotateApiKeyData, ThrowOnError>): RequestResult<RotateApiKeyResponses, RotateApiKeyErrors, ThrowOnError>;
|
|
5218
5082
|
}
|
|
5219
5083
|
declare class Auth {
|
|
5220
|
-
/**
|
|
5221
|
-
* Create an account
|
|
5222
|
-
*
|
|
5223
|
-
* Creates a user and opens a session. A verification email is sent separately; unverified accounts may be limited until verified.
|
|
5224
|
-
*
|
|
5225
|
-
*/
|
|
5226
|
-
static signup<ThrowOnError extends boolean = false>(options: Options<SignupData, ThrowOnError>): RequestResult<SignupResponses, SignupErrors, ThrowOnError>;
|
|
5227
|
-
/**
|
|
5228
|
-
* Log in
|
|
5229
|
-
*
|
|
5230
|
-
* Exchanges email + password for an access JWT and a refresh token.
|
|
5231
|
-
*/
|
|
5232
|
-
static login<ThrowOnError extends boolean = false>(options: Options<LoginData, ThrowOnError>): RequestResult<LoginResponses, LoginErrors, ThrowOnError>;
|
|
5233
5084
|
/**
|
|
5234
5085
|
* Email a sign-in code
|
|
5235
5086
|
*
|
|
@@ -5247,36 +5098,17 @@ declare class Auth {
|
|
|
5247
5098
|
/**
|
|
5248
5099
|
* Refresh a session
|
|
5249
5100
|
*
|
|
5250
|
-
* 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).
|
|
5101
|
+
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
|
|
5251
5102
|
*
|
|
5252
5103
|
*/
|
|
5253
5104
|
static refreshSession<ThrowOnError extends boolean = false>(options: Options<RefreshSessionData, ThrowOnError>): RequestResult<RefreshSessionResponses, RefreshSessionErrors, ThrowOnError>;
|
|
5254
5105
|
/**
|
|
5255
5106
|
* Log out
|
|
5256
5107
|
*
|
|
5257
|
-
* Revokes the current refresh token (and its rotation family). Pass `all: true` to revoke every active session for the user.
|
|
5108
|
+
* Revokes the current refresh token (and its rotation family) and clears the `refresh_token` cookie. Pass `all: true` to revoke every active session for the user.
|
|
5258
5109
|
*
|
|
5259
5110
|
*/
|
|
5260
5111
|
static logout<ThrowOnError extends boolean = false>(options?: Options<LogoutData, ThrowOnError>): RequestResult<LogoutResponses, LogoutErrors, ThrowOnError>;
|
|
5261
|
-
/**
|
|
5262
|
-
* Request a password reset
|
|
5263
|
-
*
|
|
5264
|
-
* Sends a password-reset email if the address has an account. Always responds 202 so account existence is never leaked.
|
|
5265
|
-
*
|
|
5266
|
-
*/
|
|
5267
|
-
static requestPasswordReset<ThrowOnError extends boolean = false>(options: Options<RequestPasswordResetData, ThrowOnError>): RequestResult<RequestPasswordResetResponses, RequestPasswordResetErrors, ThrowOnError>;
|
|
5268
|
-
/**
|
|
5269
|
-
* Complete a password reset
|
|
5270
|
-
*
|
|
5271
|
-
* Sets a new password using a valid one-time reset token, then revokes existing sessions.
|
|
5272
|
-
*/
|
|
5273
|
-
static confirmPasswordReset<ThrowOnError extends boolean = false>(options: Options<ConfirmPasswordResetData, ThrowOnError>): RequestResult<ConfirmPasswordResetResponses, ConfirmPasswordResetErrors, ThrowOnError>;
|
|
5274
|
-
/**
|
|
5275
|
-
* Verify an email address
|
|
5276
|
-
*
|
|
5277
|
-
* Confirms an email address using a one-time verification token.
|
|
5278
|
-
*/
|
|
5279
|
-
static verifyEmail<ThrowOnError extends boolean = false>(options: Options<VerifyEmailData, ThrowOnError>): RequestResult<VerifyEmailResponses, VerifyEmailErrors, ThrowOnError>;
|
|
5280
5112
|
/**
|
|
5281
5113
|
* Get the current identity
|
|
5282
5114
|
*
|
|
@@ -5773,4 +5605,4 @@ declare class NaturaliClient {
|
|
|
5773
5605
|
constructor({ token, headers }?: NaturaliClientOptions);
|
|
5774
5606
|
}
|
|
5775
5607
|
//#endregion
|
|
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 };
|
|
5608
|
+
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 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 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 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 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 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 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 VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -748,37 +748,6 @@ var ApiKeys = class {
|
|
|
748
748
|
}
|
|
749
749
|
};
|
|
750
750
|
var Auth = class {
|
|
751
|
-
/**
|
|
752
|
-
* Create an account
|
|
753
|
-
*
|
|
754
|
-
* Creates a user and opens a session. A verification email is sent separately; unverified accounts may be limited until verified.
|
|
755
|
-
*
|
|
756
|
-
*/
|
|
757
|
-
static signup(options) {
|
|
758
|
-
return (options.client ?? client).post({
|
|
759
|
-
url: "/v1/auth/signup",
|
|
760
|
-
...options,
|
|
761
|
-
headers: {
|
|
762
|
-
"Content-Type": "application/json",
|
|
763
|
-
...options.headers
|
|
764
|
-
}
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Log in
|
|
769
|
-
*
|
|
770
|
-
* Exchanges email + password for an access JWT and a refresh token.
|
|
771
|
-
*/
|
|
772
|
-
static login(options) {
|
|
773
|
-
return (options.client ?? client).post({
|
|
774
|
-
url: "/v1/auth/login",
|
|
775
|
-
...options,
|
|
776
|
-
headers: {
|
|
777
|
-
"Content-Type": "application/json",
|
|
778
|
-
...options.headers
|
|
779
|
-
}
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
751
|
/**
|
|
783
752
|
* Email a sign-in code
|
|
784
753
|
*
|
|
@@ -814,7 +783,7 @@ var Auth = class {
|
|
|
814
783
|
/**
|
|
815
784
|
* Refresh a session
|
|
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).
|
|
786
|
+
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
|
|
818
787
|
*
|
|
819
788
|
*/
|
|
820
789
|
static refreshSession(options) {
|
|
@@ -830,7 +799,7 @@ var Auth = class {
|
|
|
830
799
|
/**
|
|
831
800
|
* Log out
|
|
832
801
|
*
|
|
833
|
-
* Revokes the current refresh token (and its rotation family). Pass `all: true` to revoke every active session for the user.
|
|
802
|
+
* Revokes the current refresh token (and its rotation family) and clears the `refresh_token` cookie. Pass `all: true` to revoke every active session for the user.
|
|
834
803
|
*
|
|
835
804
|
*/
|
|
836
805
|
static logout(options) {
|
|
@@ -844,52 +813,6 @@ var Auth = class {
|
|
|
844
813
|
});
|
|
845
814
|
}
|
|
846
815
|
/**
|
|
847
|
-
* Request a password reset
|
|
848
|
-
*
|
|
849
|
-
* Sends a password-reset email if the address has an account. Always responds 202 so account existence is never leaked.
|
|
850
|
-
*
|
|
851
|
-
*/
|
|
852
|
-
static requestPasswordReset(options) {
|
|
853
|
-
return (options.client ?? client).post({
|
|
854
|
-
url: "/v1/auth/password/reset-request",
|
|
855
|
-
...options,
|
|
856
|
-
headers: {
|
|
857
|
-
"Content-Type": "application/json",
|
|
858
|
-
...options.headers
|
|
859
|
-
}
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* Complete a password reset
|
|
864
|
-
*
|
|
865
|
-
* Sets a new password using a valid one-time reset token, then revokes existing sessions.
|
|
866
|
-
*/
|
|
867
|
-
static confirmPasswordReset(options) {
|
|
868
|
-
return (options.client ?? client).post({
|
|
869
|
-
url: "/v1/auth/password/reset",
|
|
870
|
-
...options,
|
|
871
|
-
headers: {
|
|
872
|
-
"Content-Type": "application/json",
|
|
873
|
-
...options.headers
|
|
874
|
-
}
|
|
875
|
-
});
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* Verify an email address
|
|
879
|
-
*
|
|
880
|
-
* Confirms an email address using a one-time verification token.
|
|
881
|
-
*/
|
|
882
|
-
static verifyEmail(options) {
|
|
883
|
-
return (options.client ?? client).post({
|
|
884
|
-
url: "/v1/auth/verify-email",
|
|
885
|
-
...options,
|
|
886
|
-
headers: {
|
|
887
|
-
"Content-Type": "application/json",
|
|
888
|
-
...options.headers
|
|
889
|
-
}
|
|
890
|
-
});
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
816
|
* Get the current identity
|
|
894
817
|
*
|
|
895
818
|
* Returns the user behind the presented access token.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
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.31.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|