@gpt-core/client 0.11.2 → 0.12.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.d.mts CHANGED
@@ -4020,6 +4020,48 @@ declare class ServerError extends GptCoreError {
4020
4020
  declare class ConflictError extends GptCoreError {
4021
4021
  constructor(message?: string, options?: ConstructorParameters<typeof GptCoreError>[1]);
4022
4022
  }
4023
+ interface AgentVersionErrorOptions {
4024
+ statusCode?: number;
4025
+ code?: string;
4026
+ requestId?: string;
4027
+ headers?: Record<string, string>;
4028
+ body?: unknown;
4029
+ cause?: Error;
4030
+ pointer?: string;
4031
+ versionId?: string;
4032
+ agentId?: string;
4033
+ }
4034
+ /**
4035
+ * Base class for all agent-version endpoint errors. Prefer catching the
4036
+ * specific subclass; use this only for "any agent-version error" branches.
4037
+ */
4038
+ declare class AgentVersionError extends GptCoreError {
4039
+ readonly pointer?: string;
4040
+ readonly versionId?: string;
4041
+ readonly agentId?: string;
4042
+ constructor(message: string, options?: AgentVersionErrorOptions);
4043
+ }
4044
+ declare class VersionAlreadyUsedError extends AgentVersionError {
4045
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4046
+ }
4047
+ declare class VersionInUseCannotDeleteError extends AgentVersionError {
4048
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4049
+ }
4050
+ declare class VersionNotFoundError extends AgentVersionError {
4051
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4052
+ }
4053
+ declare class ReservedFieldError extends AgentVersionError {
4054
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4055
+ }
4056
+ declare class InvalidFieldTypeError extends AgentVersionError {
4057
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4058
+ }
4059
+ declare class MissingFieldNameError extends AgentVersionError {
4060
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4061
+ }
4062
+ declare class SchemaDefinitionInvalidError extends AgentVersionError {
4063
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4064
+ }
4023
4065
  /**
4024
4066
  * Parse error response and throw appropriate error class
4025
4067
  */
@@ -4204,7 +4246,7 @@ declare class BrowserApiKeyError extends Error {
4204
4246
  */
4205
4247
  declare const DEFAULT_API_VERSION = "2025-12-03";
4206
4248
  /** SDK version for User-Agent header */
4207
- declare const SDK_VERSION = "0.11.2";
4249
+ declare const SDK_VERSION = "0.12.0";
4208
4250
  /** Security configuration options */
4209
4251
  interface SecurityConfig {
4210
4252
  /**
@@ -5740,4 +5782,4 @@ type SearchAPI = ReturnType<typeof createSearchNamespace>;
5740
5782
  type ThreadsAPI = ReturnType<typeof createThreadsNamespace>;
5741
5783
  type CommunicationAPI = ReturnType<typeof createCommunicationNamespace>;
5742
5784
 
5743
- export { API_KEY_PREFIXES, type AgentCreateRequest, AgentCreateSchema, type AgentImportRequest, AgentImportSchema, type AgentTestInput, AgentTestInputSchema, type AgentUpdateRequest, AgentUpdateSchema, type AgentsAPI, type AiAPI, type AiSearchAdvancedRequest, AiSearchAdvancedSchema, type ApiKeyAllocateRequest, ApiKeyAllocateSchema, type ApiKeyCreateRequest, ApiKeyCreateSchema, type AppInfo, type ApplicationCreateRequest, ApplicationCreateSchema, type ApplicationUpdateRequest, ApplicationUpdateSchema, AuthenticationError, AuthorizationError, type BaseClientConfig, type BeginUploadRequest, BeginUploadSchema, type BillingAPI, BrowserApiKeyError, type BucketCreateRequest, BucketCreateSchema, type BucketUpdateRequest, BucketUpdateSchema, type CommunicationAPI, ConflictError, type ConversationCreateRequest, ConversationCreateSchema, type ConversationUpdateRequest, ConversationUpdateSchema, DEFAULT_API_VERSION, DEFAULT_RETRY_CONFIG, type DocumentUploadBase64Request, DocumentUploadBase64Schema, type EmbedRequest, EmbedRequestSchema, type ExtractionAPI, type ExtractionBatchCreateRequest, ExtractionBatchCreateSchema, type ExtractionExportCreateRequest, ExtractionExportCreateSchema, GptClient, GptCoreError, type IdentityAPI, InsecureConnectionError, type InvitationCreateRequest, InvitationCreateSchema, LOG_LEVELS, type LogLevel, type Logger, type LoginRequest, LoginRequestSchema, type MembershipCreateRequest, MembershipCreateSchema, type MessageCreateRequest, MessageCreateSchema, type MessageSendRequest, MessageSendSchema, type MessageStreamRequest, MessageStreamSchema, NetworkError, NotFoundError, type NotificationMethodCreateRequest, NotificationMethodCreateSchema, type NotificationMethodUpdateRequest, NotificationMethodUpdateSchema, type NotificationPreferenceCreateRequest, NotificationPreferenceCreateSchema, type NotificationPreferenceUpdateRequest, NotificationPreferenceUpdateSchema, type ObjectRegisterRequest, ObjectRegisterSchema, type PaginatedResponse, type PaginationLinks, type PaginationOptions, type PlatformAPI, type PresignedDownloadRequest, PresignedDownloadSchema, type PresignedUploadRequest, PresignedUploadSchema, RateLimitError, type RegisterRequest, RegisterRequestSchema, RequestBuilder, type RequestOptions, type RetryConfig, RetryTimeoutError, SDK_VERSION, type SavedSearchCreateRequest, SavedSearchCreateSchema, type SdkErrorEvent, SdkEventEmitter, type SdkEvents, type SdkRequestEvent, type SdkResponseEvent, type SdkRetryEvent, type SearchAPI, type SearchRequest, SearchRequestSchema, type SecurityConfig, ServerError, type StorageAPI, type StreamMessageChunk, type StreamOptions, type ThreadCreateRequest, ThreadCreateSchema, type ThreadMessageStreamRequest, ThreadMessageStreamSchema, type ThreadUpdateRequest, ThreadUpdateSchema, type ThreadsAPI, TimeoutError, type UserProfileUpdateRequest, UserProfileUpdateSchema, ValidationError, type WalletAddonsRequest, WalletAddonsSchema, type WalletAutoTopUpRequest, WalletAutoTopUpSchema, type WalletCreditsUpdateRequest, WalletCreditsUpdateSchema, type WebhookConfigCreateRequest, WebhookConfigCreateSchema, type WebhookConfigUpdateRequest, WebhookConfigUpdateSchema, WebhookSignatureError, type WebhookVerifyOptions, Webhooks, type WebhooksAPI, type WorkspaceCreateRequest, WorkspaceCreateSchema, type WorkspaceUpdateRequest, WorkspaceUpdateSchema, buildHeaders, buildUserAgent, collectStreamedMessage, handleApiError, isBrowserEnvironment, isSecureUrl, paginateAll, paginateToArray, retryWithBackoff, streamMessage, streamSSE, validateApiKey, withRetry };
5785
+ export { API_KEY_PREFIXES, type AgentCreateRequest, AgentCreateSchema, type AgentImportRequest, AgentImportSchema, type AgentTestInput, AgentTestInputSchema, type AgentUpdateRequest, AgentUpdateSchema, AgentVersionError, type AgentVersionErrorOptions, type AgentsAPI, type AiAPI, type AiSearchAdvancedRequest, AiSearchAdvancedSchema, type ApiKeyAllocateRequest, ApiKeyAllocateSchema, type ApiKeyCreateRequest, ApiKeyCreateSchema, type AppInfo, type ApplicationCreateRequest, ApplicationCreateSchema, type ApplicationUpdateRequest, ApplicationUpdateSchema, AuthenticationError, AuthorizationError, type BaseClientConfig, type BeginUploadRequest, BeginUploadSchema, type BillingAPI, BrowserApiKeyError, type BucketCreateRequest, BucketCreateSchema, type BucketUpdateRequest, BucketUpdateSchema, type CommunicationAPI, ConflictError, type ConversationCreateRequest, ConversationCreateSchema, type ConversationUpdateRequest, ConversationUpdateSchema, DEFAULT_API_VERSION, DEFAULT_RETRY_CONFIG, type DocumentUploadBase64Request, DocumentUploadBase64Schema, type EmbedRequest, EmbedRequestSchema, type ExtractionAPI, type ExtractionBatchCreateRequest, ExtractionBatchCreateSchema, type ExtractionExportCreateRequest, ExtractionExportCreateSchema, GptClient, GptCoreError, type IdentityAPI, InsecureConnectionError, InvalidFieldTypeError, type InvitationCreateRequest, InvitationCreateSchema, LOG_LEVELS, type LogLevel, type Logger, type LoginRequest, LoginRequestSchema, type MembershipCreateRequest, MembershipCreateSchema, type MessageCreateRequest, MessageCreateSchema, type MessageSendRequest, MessageSendSchema, type MessageStreamRequest, MessageStreamSchema, MissingFieldNameError, NetworkError, NotFoundError, type NotificationMethodCreateRequest, NotificationMethodCreateSchema, type NotificationMethodUpdateRequest, NotificationMethodUpdateSchema, type NotificationPreferenceCreateRequest, NotificationPreferenceCreateSchema, type NotificationPreferenceUpdateRequest, NotificationPreferenceUpdateSchema, type ObjectRegisterRequest, ObjectRegisterSchema, type PaginatedResponse, type PaginationLinks, type PaginationOptions, type PlatformAPI, type PresignedDownloadRequest, PresignedDownloadSchema, type PresignedUploadRequest, PresignedUploadSchema, RateLimitError, type RegisterRequest, RegisterRequestSchema, RequestBuilder, type RequestOptions, ReservedFieldError, type RetryConfig, RetryTimeoutError, SDK_VERSION, type SavedSearchCreateRequest, SavedSearchCreateSchema, SchemaDefinitionInvalidError, type SdkErrorEvent, SdkEventEmitter, type SdkEvents, type SdkRequestEvent, type SdkResponseEvent, type SdkRetryEvent, type SearchAPI, type SearchRequest, SearchRequestSchema, type SecurityConfig, ServerError, type StorageAPI, type StreamMessageChunk, type StreamOptions, type ThreadCreateRequest, ThreadCreateSchema, type ThreadMessageStreamRequest, ThreadMessageStreamSchema, type ThreadUpdateRequest, ThreadUpdateSchema, type ThreadsAPI, TimeoutError, type UserProfileUpdateRequest, UserProfileUpdateSchema, ValidationError, VersionAlreadyUsedError, VersionInUseCannotDeleteError, VersionNotFoundError, type WalletAddonsRequest, WalletAddonsSchema, type WalletAutoTopUpRequest, WalletAutoTopUpSchema, type WalletCreditsUpdateRequest, WalletCreditsUpdateSchema, type WebhookConfigCreateRequest, WebhookConfigCreateSchema, type WebhookConfigUpdateRequest, WebhookConfigUpdateSchema, WebhookSignatureError, type WebhookVerifyOptions, Webhooks, type WebhooksAPI, type WorkspaceCreateRequest, WorkspaceCreateSchema, type WorkspaceUpdateRequest, WorkspaceUpdateSchema, buildHeaders, buildUserAgent, collectStreamedMessage, handleApiError, isBrowserEnvironment, isSecureUrl, paginateAll, paginateToArray, retryWithBackoff, streamMessage, streamSSE, validateApiKey, withRetry };
package/dist/index.d.ts CHANGED
@@ -4020,6 +4020,48 @@ declare class ServerError extends GptCoreError {
4020
4020
  declare class ConflictError extends GptCoreError {
4021
4021
  constructor(message?: string, options?: ConstructorParameters<typeof GptCoreError>[1]);
4022
4022
  }
4023
+ interface AgentVersionErrorOptions {
4024
+ statusCode?: number;
4025
+ code?: string;
4026
+ requestId?: string;
4027
+ headers?: Record<string, string>;
4028
+ body?: unknown;
4029
+ cause?: Error;
4030
+ pointer?: string;
4031
+ versionId?: string;
4032
+ agentId?: string;
4033
+ }
4034
+ /**
4035
+ * Base class for all agent-version endpoint errors. Prefer catching the
4036
+ * specific subclass; use this only for "any agent-version error" branches.
4037
+ */
4038
+ declare class AgentVersionError extends GptCoreError {
4039
+ readonly pointer?: string;
4040
+ readonly versionId?: string;
4041
+ readonly agentId?: string;
4042
+ constructor(message: string, options?: AgentVersionErrorOptions);
4043
+ }
4044
+ declare class VersionAlreadyUsedError extends AgentVersionError {
4045
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4046
+ }
4047
+ declare class VersionInUseCannotDeleteError extends AgentVersionError {
4048
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4049
+ }
4050
+ declare class VersionNotFoundError extends AgentVersionError {
4051
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4052
+ }
4053
+ declare class ReservedFieldError extends AgentVersionError {
4054
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4055
+ }
4056
+ declare class InvalidFieldTypeError extends AgentVersionError {
4057
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4058
+ }
4059
+ declare class MissingFieldNameError extends AgentVersionError {
4060
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4061
+ }
4062
+ declare class SchemaDefinitionInvalidError extends AgentVersionError {
4063
+ constructor(message?: string, options?: AgentVersionErrorOptions);
4064
+ }
4023
4065
  /**
4024
4066
  * Parse error response and throw appropriate error class
4025
4067
  */
@@ -4204,7 +4246,7 @@ declare class BrowserApiKeyError extends Error {
4204
4246
  */
4205
4247
  declare const DEFAULT_API_VERSION = "2025-12-03";
4206
4248
  /** SDK version for User-Agent header */
4207
- declare const SDK_VERSION = "0.11.2";
4249
+ declare const SDK_VERSION = "0.12.0";
4208
4250
  /** Security configuration options */
4209
4251
  interface SecurityConfig {
4210
4252
  /**
@@ -5740,4 +5782,4 @@ type SearchAPI = ReturnType<typeof createSearchNamespace>;
5740
5782
  type ThreadsAPI = ReturnType<typeof createThreadsNamespace>;
5741
5783
  type CommunicationAPI = ReturnType<typeof createCommunicationNamespace>;
5742
5784
 
5743
- export { API_KEY_PREFIXES, type AgentCreateRequest, AgentCreateSchema, type AgentImportRequest, AgentImportSchema, type AgentTestInput, AgentTestInputSchema, type AgentUpdateRequest, AgentUpdateSchema, type AgentsAPI, type AiAPI, type AiSearchAdvancedRequest, AiSearchAdvancedSchema, type ApiKeyAllocateRequest, ApiKeyAllocateSchema, type ApiKeyCreateRequest, ApiKeyCreateSchema, type AppInfo, type ApplicationCreateRequest, ApplicationCreateSchema, type ApplicationUpdateRequest, ApplicationUpdateSchema, AuthenticationError, AuthorizationError, type BaseClientConfig, type BeginUploadRequest, BeginUploadSchema, type BillingAPI, BrowserApiKeyError, type BucketCreateRequest, BucketCreateSchema, type BucketUpdateRequest, BucketUpdateSchema, type CommunicationAPI, ConflictError, type ConversationCreateRequest, ConversationCreateSchema, type ConversationUpdateRequest, ConversationUpdateSchema, DEFAULT_API_VERSION, DEFAULT_RETRY_CONFIG, type DocumentUploadBase64Request, DocumentUploadBase64Schema, type EmbedRequest, EmbedRequestSchema, type ExtractionAPI, type ExtractionBatchCreateRequest, ExtractionBatchCreateSchema, type ExtractionExportCreateRequest, ExtractionExportCreateSchema, GptClient, GptCoreError, type IdentityAPI, InsecureConnectionError, type InvitationCreateRequest, InvitationCreateSchema, LOG_LEVELS, type LogLevel, type Logger, type LoginRequest, LoginRequestSchema, type MembershipCreateRequest, MembershipCreateSchema, type MessageCreateRequest, MessageCreateSchema, type MessageSendRequest, MessageSendSchema, type MessageStreamRequest, MessageStreamSchema, NetworkError, NotFoundError, type NotificationMethodCreateRequest, NotificationMethodCreateSchema, type NotificationMethodUpdateRequest, NotificationMethodUpdateSchema, type NotificationPreferenceCreateRequest, NotificationPreferenceCreateSchema, type NotificationPreferenceUpdateRequest, NotificationPreferenceUpdateSchema, type ObjectRegisterRequest, ObjectRegisterSchema, type PaginatedResponse, type PaginationLinks, type PaginationOptions, type PlatformAPI, type PresignedDownloadRequest, PresignedDownloadSchema, type PresignedUploadRequest, PresignedUploadSchema, RateLimitError, type RegisterRequest, RegisterRequestSchema, RequestBuilder, type RequestOptions, type RetryConfig, RetryTimeoutError, SDK_VERSION, type SavedSearchCreateRequest, SavedSearchCreateSchema, type SdkErrorEvent, SdkEventEmitter, type SdkEvents, type SdkRequestEvent, type SdkResponseEvent, type SdkRetryEvent, type SearchAPI, type SearchRequest, SearchRequestSchema, type SecurityConfig, ServerError, type StorageAPI, type StreamMessageChunk, type StreamOptions, type ThreadCreateRequest, ThreadCreateSchema, type ThreadMessageStreamRequest, ThreadMessageStreamSchema, type ThreadUpdateRequest, ThreadUpdateSchema, type ThreadsAPI, TimeoutError, type UserProfileUpdateRequest, UserProfileUpdateSchema, ValidationError, type WalletAddonsRequest, WalletAddonsSchema, type WalletAutoTopUpRequest, WalletAutoTopUpSchema, type WalletCreditsUpdateRequest, WalletCreditsUpdateSchema, type WebhookConfigCreateRequest, WebhookConfigCreateSchema, type WebhookConfigUpdateRequest, WebhookConfigUpdateSchema, WebhookSignatureError, type WebhookVerifyOptions, Webhooks, type WebhooksAPI, type WorkspaceCreateRequest, WorkspaceCreateSchema, type WorkspaceUpdateRequest, WorkspaceUpdateSchema, buildHeaders, buildUserAgent, collectStreamedMessage, handleApiError, isBrowserEnvironment, isSecureUrl, paginateAll, paginateToArray, retryWithBackoff, streamMessage, streamSSE, validateApiKey, withRetry };
5785
+ export { API_KEY_PREFIXES, type AgentCreateRequest, AgentCreateSchema, type AgentImportRequest, AgentImportSchema, type AgentTestInput, AgentTestInputSchema, type AgentUpdateRequest, AgentUpdateSchema, AgentVersionError, type AgentVersionErrorOptions, type AgentsAPI, type AiAPI, type AiSearchAdvancedRequest, AiSearchAdvancedSchema, type ApiKeyAllocateRequest, ApiKeyAllocateSchema, type ApiKeyCreateRequest, ApiKeyCreateSchema, type AppInfo, type ApplicationCreateRequest, ApplicationCreateSchema, type ApplicationUpdateRequest, ApplicationUpdateSchema, AuthenticationError, AuthorizationError, type BaseClientConfig, type BeginUploadRequest, BeginUploadSchema, type BillingAPI, BrowserApiKeyError, type BucketCreateRequest, BucketCreateSchema, type BucketUpdateRequest, BucketUpdateSchema, type CommunicationAPI, ConflictError, type ConversationCreateRequest, ConversationCreateSchema, type ConversationUpdateRequest, ConversationUpdateSchema, DEFAULT_API_VERSION, DEFAULT_RETRY_CONFIG, type DocumentUploadBase64Request, DocumentUploadBase64Schema, type EmbedRequest, EmbedRequestSchema, type ExtractionAPI, type ExtractionBatchCreateRequest, ExtractionBatchCreateSchema, type ExtractionExportCreateRequest, ExtractionExportCreateSchema, GptClient, GptCoreError, type IdentityAPI, InsecureConnectionError, InvalidFieldTypeError, type InvitationCreateRequest, InvitationCreateSchema, LOG_LEVELS, type LogLevel, type Logger, type LoginRequest, LoginRequestSchema, type MembershipCreateRequest, MembershipCreateSchema, type MessageCreateRequest, MessageCreateSchema, type MessageSendRequest, MessageSendSchema, type MessageStreamRequest, MessageStreamSchema, MissingFieldNameError, NetworkError, NotFoundError, type NotificationMethodCreateRequest, NotificationMethodCreateSchema, type NotificationMethodUpdateRequest, NotificationMethodUpdateSchema, type NotificationPreferenceCreateRequest, NotificationPreferenceCreateSchema, type NotificationPreferenceUpdateRequest, NotificationPreferenceUpdateSchema, type ObjectRegisterRequest, ObjectRegisterSchema, type PaginatedResponse, type PaginationLinks, type PaginationOptions, type PlatformAPI, type PresignedDownloadRequest, PresignedDownloadSchema, type PresignedUploadRequest, PresignedUploadSchema, RateLimitError, type RegisterRequest, RegisterRequestSchema, RequestBuilder, type RequestOptions, ReservedFieldError, type RetryConfig, RetryTimeoutError, SDK_VERSION, type SavedSearchCreateRequest, SavedSearchCreateSchema, SchemaDefinitionInvalidError, type SdkErrorEvent, SdkEventEmitter, type SdkEvents, type SdkRequestEvent, type SdkResponseEvent, type SdkRetryEvent, type SearchAPI, type SearchRequest, SearchRequestSchema, type SecurityConfig, ServerError, type StorageAPI, type StreamMessageChunk, type StreamOptions, type ThreadCreateRequest, ThreadCreateSchema, type ThreadMessageStreamRequest, ThreadMessageStreamSchema, type ThreadUpdateRequest, ThreadUpdateSchema, type ThreadsAPI, TimeoutError, type UserProfileUpdateRequest, UserProfileUpdateSchema, ValidationError, VersionAlreadyUsedError, VersionInUseCannotDeleteError, VersionNotFoundError, type WalletAddonsRequest, WalletAddonsSchema, type WalletAutoTopUpRequest, WalletAutoTopUpSchema, type WalletCreditsUpdateRequest, WalletCreditsUpdateSchema, type WebhookConfigCreateRequest, WebhookConfigCreateSchema, type WebhookConfigUpdateRequest, WebhookConfigUpdateSchema, WebhookSignatureError, type WebhookVerifyOptions, Webhooks, type WebhooksAPI, type WorkspaceCreateRequest, WorkspaceCreateSchema, type WorkspaceUpdateRequest, WorkspaceUpdateSchema, buildHeaders, buildUserAgent, collectStreamedMessage, handleApiError, isBrowserEnvironment, isSecureUrl, paginateAll, paginateToArray, retryWithBackoff, streamMessage, streamSSE, validateApiKey, withRetry };