@gpt-platform/client 0.7.0 → 0.7.2

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.ts CHANGED
@@ -606,7 +606,7 @@ declare class BrowserApiKeyError extends Error {
606
606
  }
607
607
 
608
608
  /** SDK version — updated automatically by mix update.sdks */
609
- declare const SDK_VERSION = "0.7.0";
609
+ declare const SDK_VERSION = "0.7.2";
610
610
  /** Default API version sent in every request — updated automatically by mix update.sdks */
611
611
  declare const DEFAULT_API_VERSION = "2026-03-11";
612
612
 
@@ -3232,7 +3232,26 @@ type ProcessingActivity = {
3232
3232
  * An attributes object for a processing_activity
3233
3233
  */
3234
3234
  attributes?: {
3235
- [key: string]: never;
3235
+ /**
3236
+ * EphiAsset IDs linked to this processing activity. Field included by default.
3237
+ */
3238
+ asset_ids?: Array<string> | null | unknown;
3239
+ /**
3240
+ * Whether this processing activity involves ePHI. Field included by default.
3241
+ */
3242
+ ephi_classification?: "contains_ephi" | "no_ephi" | unknown;
3243
+ /**
3244
+ * Last review date for this processing activity. Field included by default.
3245
+ */
3246
+ last_reviewed_at?: string | null | unknown;
3247
+ /**
3248
+ * HIPAA minimum necessary standard justification. Field included by default.
3249
+ */
3250
+ minimum_necessary_justification?: string | null | unknown;
3251
+ /**
3252
+ * How often this activity should be reviewed (days). Field included by default.
3253
+ */
3254
+ review_frequency_days?: number | null | unknown;
3236
3255
  };
3237
3256
  id: string;
3238
3257
  /**
@@ -4525,6 +4544,52 @@ type WatcherClaim = {
4525
4544
  };
4526
4545
  type: string;
4527
4546
  };
4547
+ /**
4548
+ * A "Resource object" representing a section-document
4549
+ */
4550
+ type SectionDocument = {
4551
+ /**
4552
+ * An attributes object for a section-document
4553
+ */
4554
+ attributes?: {
4555
+ /**
4556
+ * Field included by default.
4557
+ */
4558
+ doc_path?: string | null | unknown;
4559
+ /**
4560
+ * Field included by default.
4561
+ */
4562
+ format?: "markdown" | "mdx" | "html" | "text" | "rst" | unknown;
4563
+ /**
4564
+ * Field included by default.
4565
+ */
4566
+ indexed_at?: unknown;
4567
+ /**
4568
+ * Field included by default.
4569
+ */
4570
+ section_count?: number | null | unknown;
4571
+ /**
4572
+ * Field included by default.
4573
+ */
4574
+ source_id?: string | null | unknown;
4575
+ /**
4576
+ * Field included by default.
4577
+ */
4578
+ source_type: "extraction" | "crawler" | "knowledge_file" | "direct";
4579
+ /**
4580
+ * Field included by default.
4581
+ */
4582
+ source_url?: string | null | unknown;
4583
+ };
4584
+ id: string;
4585
+ /**
4586
+ * A relationships object for a section-document
4587
+ */
4588
+ relationships?: {
4589
+ [key: string]: never;
4590
+ };
4591
+ type: string;
4592
+ };
4528
4593
  /**
4529
4594
  * A "Resource object" representing a tenant
4530
4595
  */
@@ -6026,6 +6091,64 @@ type PermissionMeta = {
6026
6091
  };
6027
6092
  type: string;
6028
6093
  };
6094
+ /**
6095
+ * A "Resource object" representing a document-section
6096
+ */
6097
+ type DocumentSection = {
6098
+ /**
6099
+ * An attributes object for a document-section
6100
+ */
6101
+ attributes?: {
6102
+ /**
6103
+ * Field included by default.
6104
+ */
6105
+ content_preview?: string | null | unknown;
6106
+ /**
6107
+ * Field included by default.
6108
+ */
6109
+ doc_path: string;
6110
+ /**
6111
+ * Field included by default.
6112
+ */
6113
+ level: number;
6114
+ /**
6115
+ * Field included by default.
6116
+ */
6117
+ parent_stable_id?: string | null | unknown;
6118
+ /**
6119
+ * Field included by default.
6120
+ */
6121
+ position?: number | null | unknown;
6122
+ /**
6123
+ * Field included by default.
6124
+ */
6125
+ references?: Array<string> | null | unknown;
6126
+ /**
6127
+ * Field included by default.
6128
+ */
6129
+ stable_id: string;
6130
+ /**
6131
+ * Field included by default.
6132
+ */
6133
+ summary?: string | null | unknown;
6134
+ /**
6135
+ * Field included by default.
6136
+ */
6137
+ tags?: Array<string> | null | unknown;
6138
+ /**
6139
+ * Field included by default.
6140
+ */
6141
+ title: string;
6142
+ };
6143
+ id: string;
6144
+ /**
6145
+ * A relationships object for a document-section
6146
+ */
6147
+ relationships?: {
6148
+ [key: string]: never;
6149
+ };
6150
+ type: string;
6151
+ };
6029
6152
  /**
6030
6153
  * A "Resource object" representing a clinical-delivery
6031
6154
  */
@@ -7107,7 +7230,7 @@ type LegalDocument = {
7107
7230
  /**
7108
7231
  * Field included by default.
7109
7232
  */
7110
- document_type: "terms_of_service" | "privacy_policy" | "baa" | "dpa" | "scc";
7233
+ document_type: "terms_of_service" | "privacy_policy" | "baa" | "dpa" | "scc" | "npp" | "security_policy" | "incident_response_plan" | "contingency_plan" | "access_control_policy" | "risk_management_plan" | "training_policy" | "sanction_policy" | "breach_notification_policy" | "system_activity_review" | "data_retention_policy" | "minimum_necessary_policy" | "authorization_form";
7111
7234
  /**
7112
7235
  * Field included by default.
7113
7236
  */
@@ -20847,6 +20970,7 @@ declare class GptClient extends BaseClient {
20847
20970
  update: (id: string, attributes: UpdateCrmContactAttributes, options?: RequestOptions) => Promise<CrmContact>;
20848
20971
  delete: (id: string, options?: RequestOptions) => Promise<true>;
20849
20972
  listByWorkspace: (workspaceId: string, options?: {
20973
+ name?: string;
20850
20974
  status?: "lead" | "marketing_qualified" | "sales_qualified" | "opportunity" | "customer" | "evangelist" | "churned";
20851
20975
  filters?: AttributeFilter[];
20852
20976
  tags?: string[];
@@ -20874,6 +20998,7 @@ declare class GptClient extends BaseClient {
20874
20998
  get: (id: string, options?: RequestOptions) => Promise<CrmDeal>;
20875
20999
  create: (attributes: CreateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
20876
21000
  update: (id: string, attributes: UpdateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
21001
+ moveStage: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmDeal>;
20877
21002
  delete: (id: string, options?: RequestOptions) => Promise<true>;
20878
21003
  listByWorkspace: (workspaceId: string, options?: {
20879
21004
  page?: number;
@@ -20883,6 +21008,7 @@ declare class GptClient extends BaseClient {
20883
21008
  activities: {
20884
21009
  get: (id: string, options?: RequestOptions) => Promise<CrmActivity>;
20885
21010
  create: (attributes: CreateCrmActivityAttributes, options?: RequestOptions) => Promise<CrmActivity>;
21011
+ update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmActivity>;
20886
21012
  delete: (id: string, options?: RequestOptions) => Promise<true>;
20887
21013
  listByWorkspace: (workspaceId: string, options?: {
20888
21014
  page?: number;
@@ -20901,6 +21027,7 @@ declare class GptClient extends BaseClient {
20901
21027
  create: (attributes: CreateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
20902
21028
  update: (id: string, attributes: UpdateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
20903
21029
  delete: (id: string, options?: RequestOptions) => Promise<true>;
21030
+ listByPipeline: (pipelineId: string, options?: RequestOptions) => Promise<CrmPipelineStage[]>;
20904
21031
  };
20905
21032
  relationshipTypes: {
20906
21033
  get: (id: string, options?: RequestOptions) => Promise<CrmRelationshipType>;
@@ -21755,9 +21882,7 @@ declare class GptClient extends BaseClient {
21755
21882
  delete: (id: string, options?: RequestOptions) => Promise<true>;
21756
21883
  list: (options?: {
21757
21884
  page?: number;
21758
- pageSize
21759
- /** Training examples and sessions */
21760
- ? /** Training examples and sessions */: number;
21885
+ pageSize?: number;
21761
21886
  } & RequestOptions) => Promise<WebhookConfig[]>;
21762
21887
  listAll: (options?: RequestOptions) => Promise<WebhookConfig[]>;
21763
21888
  create: (attributes: CreateWebhookConfigAttributes, options?: RequestOptions) => Promise<WebhookConfig>;
@@ -21923,6 +22048,23 @@ declare class GptClient extends BaseClient {
21923
22048
  listPresets(params?: Record<string, string>): Promise<PermissionPresetListResult>;
21924
22049
  getPreset(id: string): Promise<PermissionPresetResult>;
21925
22050
  };
22051
+ /** Structured document sections — section documents and document sections */
22052
+ readonly memory: {
22053
+ sectionDocuments: {
22054
+ list: (params?: {
22055
+ page?: number;
22056
+ pageSize?: number;
22057
+ }, options?: RequestOptions) => Promise<SectionDocument[]>;
22058
+ get: (id: string, options?: RequestOptions) => Promise<SectionDocument>;
22059
+ };
22060
+ documentSections: {
22061
+ list: (params?: {
22062
+ page?: number;
22063
+ pageSize?: number;
22064
+ }, options?: RequestOptions) => Promise<DocumentSection[]>;
22065
+ get: (id: string, options?: RequestOptions) => Promise<DocumentSection>;
22066
+ };
22067
+ };
21926
22068
  constructor(config?: BaseClientConfig);
21927
22069
  /**
21928
22070
  * Subscribe to SDK lifecycle events.
@@ -22053,6 +22195,108 @@ declare class Webhooks {
22053
22195
  static safeVerify(payload: string, signatureHeader: string, secret: string, options?: WebhookVerifyOptions): Promise<boolean>;
22054
22196
  }
22055
22197
 
22198
+ /**
22199
+ * Creates the memory namespace for structured document section navigation.
22200
+ *
22201
+ * Provides access to indexed document structures and their heading-delimited
22202
+ * sections. Documents are indexed from extraction results, crawler output,
22203
+ * knowledge files, or direct uploads. Sections support full-text search
22204
+ * and byte-range content retrieval.
22205
+ *
22206
+ * Accessed via `client.memory.*`.
22207
+ *
22208
+ * @param rb - The internal `RequestBuilder` instance used to execute API calls.
22209
+ * @returns An object containing `sectionDocuments` and `documentSections`
22210
+ * sub-namespaces.
22211
+ */
22212
+ declare function createMemoryNamespace(rb: RequestBuilder): {
22213
+ /**
22214
+ * Sub-namespace for section document operations.
22215
+ *
22216
+ * A section document represents an indexed source (extraction document,
22217
+ * crawler page, knowledge file, or direct upload). Each section document
22218
+ * contains metadata about the source and links to its document sections.
22219
+ */
22220
+ sectionDocuments: {
22221
+ /**
22222
+ * Lists section documents in the current workspace.
22223
+ *
22224
+ * Returns paginated results sorted by creation date (newest first).
22225
+ *
22226
+ * @param params - Optional pagination parameters (`page[offset]`, `page[limit]`).
22227
+ * @param options - Optional request options such as custom headers or abort signal.
22228
+ * @returns A promise resolving to an array of section document records.
22229
+ *
22230
+ * @example
22231
+ * ```typescript
22232
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
22233
+ * const docs = await client.memory.sectionDocuments.list();
22234
+ * docs.forEach(d => console.log(d.attributes?.doc_path));
22235
+ * ```
22236
+ */
22237
+ list: (params?: {
22238
+ page?: number;
22239
+ pageSize?: number;
22240
+ }, options?: RequestOptions) => Promise<SectionDocument[]>;
22241
+ /**
22242
+ * Retrieves a single section document by its unique identifier.
22243
+ *
22244
+ * @param id - The UUID of the section document.
22245
+ * @param options - Optional request options.
22246
+ * @returns A promise resolving to the section document record.
22247
+ *
22248
+ * @example
22249
+ * ```typescript
22250
+ * const doc = await client.memory.sectionDocuments.get('sd_01HXYZ...');
22251
+ * console.log(doc.attributes?.source_type, doc.attributes?.section_count);
22252
+ * ```
22253
+ */
22254
+ get: (id: string, options?: RequestOptions) => Promise<SectionDocument>;
22255
+ };
22256
+ /**
22257
+ * Sub-namespace for document section operations.
22258
+ *
22259
+ * A document section represents one heading-delimited portion of an
22260
+ * indexed document. Sections have stable IDs that survive re-indexing,
22261
+ * enabling persistent cross-document references.
22262
+ */
22263
+ documentSections: {
22264
+ /**
22265
+ * Lists document sections in the current workspace.
22266
+ *
22267
+ * Returns paginated results sorted by position within their documents.
22268
+ *
22269
+ * @param params - Optional pagination parameters.
22270
+ * @param options - Optional request options.
22271
+ * @returns A promise resolving to an array of document section records.
22272
+ *
22273
+ * @example
22274
+ * ```typescript
22275
+ * const sections = await client.memory.documentSections.list();
22276
+ * sections.forEach(s => console.log(s.attributes?.title, s.attributes?.level));
22277
+ * ```
22278
+ */
22279
+ list: (params?: {
22280
+ page?: number;
22281
+ pageSize?: number;
22282
+ }, options?: RequestOptions) => Promise<DocumentSection[]>;
22283
+ /**
22284
+ * Retrieves a single document section by its unique identifier.
22285
+ *
22286
+ * @param id - The UUID of the document section.
22287
+ * @param options - Optional request options.
22288
+ * @returns A promise resolving to the document section record.
22289
+ *
22290
+ * @example
22291
+ * ```typescript
22292
+ * const section = await client.memory.documentSections.get('ds_01HXYZ...');
22293
+ * console.log(section.attributes?.title, section.attributes?.content_preview);
22294
+ * ```
22295
+ */
22296
+ get: (id: string, options?: RequestOptions) => Promise<DocumentSection>;
22297
+ };
22298
+ };
22299
+
22056
22300
  type ThreadsAPI = ReturnType<typeof createThreadsNamespace>;
22057
22301
  type SearchAPI = ReturnType<typeof createSearchNamespace>;
22058
22302
  type IdentityAPI = ReturnType<typeof createIdentityNamespace>;
@@ -22069,5 +22313,6 @@ type WebhooksAPI = ReturnType<typeof createWebhooksNamespace>;
22069
22313
  type SchedulingAPI = ReturnType<typeof createSchedulingNamespace>;
22070
22314
  type VoiceAPI = ReturnType<typeof createVoiceNamespace>;
22071
22315
  type ModelsAPI = ReturnType<typeof createModelsNamespace>;
22316
+ type MemoryAPI = ReturnType<typeof createMemoryNamespace>;
22072
22317
 
22073
- export { API_KEY_PREFIXES, type AccessGrant, type Agent, type AgentVersion, type AgentsAPI, type AiAPI, type ApiKey, type AppInfo, type ApprovalRequiredEvent, type AttributeFilter$1 as AttributeFilter, AuthenticationError, AuthorizationError, type BaseClientConfig, type BillingAPI, type BillingAccount, BrowserApiKeyError, type BuyAddonAttributes, type CampaignsAPI, CardDeclinedError, type CommunicationAPI, type ComposeWithAiAttributes, ConflictError, type CreditPackage, DEFAULT_API_VERSION, DEFAULT_RETRY_CONFIG, type DoneEvent, type EmailAPI, type ErrorEvent, type Execution, type ExecutionEvent, type ExtractionAPI, type ExtractionRowQueryParams, type ExtractionRowQueryResult, type FeatureDefinition, type FeatureUsage, GptClient, GptCoreError, type IdentityAPI, InsecureConnectionError, type Invitation, type Invoice, type IterationCompleteEvent, LOG_LEVELS, type ListModelsOptions, type LogLevel, type Logger, type MjmlCompileResult, type ModelInfo, type ModelTier, type ModelsAPI, NetworkError, NotFoundError, type PaginatedResponse, type PaginationLinks, type PaginationOptions, type PaymentMethod, type PaymentMethodCreateAttributes, type PaymentMethodTokenizeAttributes, type PaymentMethodUpdateAttributes, PaymentRequiredError, type Plan, type PlanFeatureAllocation, type PlatformAPI, RateLimitError, RequestBuilder, type RequestOptions, type RetryConfig, RetryTimeoutError, SDK_VERSION, type SchedulingAPI, type SdkErrorEvent, SdkEventEmitter, type SdkEvents, type SdkRequestEvent, type SdkResponseEvent, type SdkRetryEvent, type SearchAPI, type SeatInfo, type SecurityConfig, ServerError, type SessionNoteType, type SessionNoteValue, type StorageAPI, type StreamMessageChunk, type StreamOptions, SubscriptionConflictError, type TemplateVariableSchema, type TemplateVersion, type Tenant, type ThreadsAPI, TimeoutError, type TokenDeltaEvent, type ToolCallEvent, type ToolResultEvent, type Transaction, type TriggerPipelineAttributes, type UpdateFeatureDefinitionAttributes, type UsageHistoryEntry, type User, type UserProfile, ValidationError, type VoiceAPI, type VoiceFinalizeOptions, type VoiceRecording, type VoiceSession, type VoiceSessionStart, type VoiceStartOptions, type VoiceTranscribeOptions, type VoiceTranscribeResult, type VoiceTranscriptionResult, type Wallet, type WalletPaymentMethod, WebhookSignatureError, type WebhookVerifyOptions, Webhooks, type WebhooksAPI, type Workspace, buildHeaders, buildUserAgent, collectStreamedMessage, handleApiError, isBrowserEnvironment, isSecureUrl, paginateAll, paginateToArray, retryWithBackoff, streamMessage, streamSSE, validateApiKey, withRetry };
22318
+ export { API_KEY_PREFIXES, type AccessGrant, type Agent, type AgentVersion, type AgentsAPI, type AiAPI, type ApiKey, type AppInfo, type ApprovalRequiredEvent, type AttributeFilter$1 as AttributeFilter, AuthenticationError, AuthorizationError, type BaseClientConfig, type BillingAPI, type BillingAccount, BrowserApiKeyError, type BuyAddonAttributes, type CampaignsAPI, CardDeclinedError, type CommunicationAPI, type ComposeWithAiAttributes, ConflictError, type CreditPackage, DEFAULT_API_VERSION, DEFAULT_RETRY_CONFIG, type DocumentSection, type DoneEvent, type EmailAPI, type ErrorEvent, type Execution, type ExecutionEvent, type ExtractionAPI, type ExtractionRowQueryParams, type ExtractionRowQueryResult, type FeatureDefinition, type FeatureUsage, GptClient, GptCoreError, type IdentityAPI, InsecureConnectionError, type Invitation, type Invoice, type IterationCompleteEvent, LOG_LEVELS, type ListModelsOptions, type LogLevel, type Logger, type MemoryAPI, type MjmlCompileResult, type ModelInfo, type ModelTier, type ModelsAPI, NetworkError, NotFoundError, type PaginatedResponse, type PaginationLinks, type PaginationOptions, type PaymentMethod, type PaymentMethodCreateAttributes, type PaymentMethodTokenizeAttributes, type PaymentMethodUpdateAttributes, PaymentRequiredError, type Plan, type PlanFeatureAllocation, type PlatformAPI, RateLimitError, RequestBuilder, type RequestOptions, type RetryConfig, RetryTimeoutError, SDK_VERSION, type SchedulingAPI, type SdkErrorEvent, SdkEventEmitter, type SdkEvents, type SdkRequestEvent, type SdkResponseEvent, type SdkRetryEvent, type SearchAPI, type SeatInfo, type SectionDocument, type SecurityConfig, ServerError, type SessionNoteType, type SessionNoteValue, type StorageAPI, type StreamMessageChunk, type StreamOptions, SubscriptionConflictError, type TemplateVariableSchema, type TemplateVersion, type Tenant, type ThreadsAPI, TimeoutError, type TokenDeltaEvent, type ToolCallEvent, type ToolResultEvent, type Transaction, type TriggerPipelineAttributes, type UpdateFeatureDefinitionAttributes, type UsageHistoryEntry, type User, type UserProfile, ValidationError, type VoiceAPI, type VoiceFinalizeOptions, type VoiceRecording, type VoiceSession, type VoiceSessionStart, type VoiceStartOptions, type VoiceTranscribeOptions, type VoiceTranscribeResult, type VoiceTranscriptionResult, type Wallet, type WalletPaymentMethod, WebhookSignatureError, type WebhookVerifyOptions, Webhooks, type WebhooksAPI, type Workspace, buildHeaders, buildUserAgent, collectStreamedMessage, handleApiError, isBrowserEnvironment, isSecureUrl, paginateAll, paginateToArray, retryWithBackoff, streamMessage, streamSSE, validateApiKey, withRetry };