@redplanethq/sdk 0.1.15 → 0.1.17

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
@@ -394,15 +394,32 @@ interface WidgetRenderContext {
394
394
  name?: string;
395
395
  }>;
396
396
  baseUrl: string;
397
+ /** Call to trigger a TUI re-render after updating internal state (TUI only) */
398
+ requestRender?: () => void;
397
399
  }
398
- interface WidgetSpec {
400
+ /** Metadata only — used in integration Spec (no render function) */
401
+ interface WidgetMeta {
399
402
  name: string;
400
403
  slug: string;
401
404
  description: string;
402
405
  support: Array<'tui' | 'webapp'>;
403
406
  tuiPlacement?: 'overview' | 'below-input';
404
- refreshInterval?: number;
405
- render(context: WidgetRenderContext): Promise<unknown>;
407
+ }
408
+ /**
409
+ * A zero-argument React function component (webapp placement).
410
+ * Context (pat, accountId, baseUrl) is baked in via closure.
411
+ */
412
+ type WebWidgetComponent = () => unknown;
413
+ /**
414
+ * A pi-tui Component instance (tui placement).
415
+ * Returned by createPlayer / createList / etc. from @redplanethq/ui/tui.
416
+ */
417
+ type TuiWidgetComponent = object;
418
+ /** Union of the two surface-specific component types */
419
+ type WidgetComponent = WebWidgetComponent | TuiWidgetComponent;
420
+ /** Full widget — used in widgets/index.ts (includes render) */
421
+ interface WidgetSpec extends WidgetMeta {
422
+ render(context: WidgetRenderContext): Promise<WidgetComponent>;
406
423
  }
407
424
  declare enum IntegrationEventType {
408
425
  /**
@@ -463,7 +480,7 @@ declare class Spec {
463
480
  api_key?: APIKeyParams;
464
481
  mcp?: McpAuthParams;
465
482
  };
466
- widgets?: WidgetSpec[];
483
+ widgets?: WidgetMeta[];
467
484
  }
468
485
  interface Config {
469
486
  access_token: string;
@@ -1225,4 +1242,4 @@ declare class CoreClient {
1225
1242
  checkAuth(): Promise<MeResponse>;
1226
1243
  }
1227
1244
 
1228
- export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WidgetRenderContext, type WidgetSpec };
1245
+ export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebWidgetComponent, type WidgetComponent, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
package/dist/index.d.ts CHANGED
@@ -394,15 +394,32 @@ interface WidgetRenderContext {
394
394
  name?: string;
395
395
  }>;
396
396
  baseUrl: string;
397
+ /** Call to trigger a TUI re-render after updating internal state (TUI only) */
398
+ requestRender?: () => void;
397
399
  }
398
- interface WidgetSpec {
400
+ /** Metadata only — used in integration Spec (no render function) */
401
+ interface WidgetMeta {
399
402
  name: string;
400
403
  slug: string;
401
404
  description: string;
402
405
  support: Array<'tui' | 'webapp'>;
403
406
  tuiPlacement?: 'overview' | 'below-input';
404
- refreshInterval?: number;
405
- render(context: WidgetRenderContext): Promise<unknown>;
407
+ }
408
+ /**
409
+ * A zero-argument React function component (webapp placement).
410
+ * Context (pat, accountId, baseUrl) is baked in via closure.
411
+ */
412
+ type WebWidgetComponent = () => unknown;
413
+ /**
414
+ * A pi-tui Component instance (tui placement).
415
+ * Returned by createPlayer / createList / etc. from @redplanethq/ui/tui.
416
+ */
417
+ type TuiWidgetComponent = object;
418
+ /** Union of the two surface-specific component types */
419
+ type WidgetComponent = WebWidgetComponent | TuiWidgetComponent;
420
+ /** Full widget — used in widgets/index.ts (includes render) */
421
+ interface WidgetSpec extends WidgetMeta {
422
+ render(context: WidgetRenderContext): Promise<WidgetComponent>;
406
423
  }
407
424
  declare enum IntegrationEventType {
408
425
  /**
@@ -463,7 +480,7 @@ declare class Spec {
463
480
  api_key?: APIKeyParams;
464
481
  mcp?: McpAuthParams;
465
482
  };
466
- widgets?: WidgetSpec[];
483
+ widgets?: WidgetMeta[];
467
484
  }
468
485
  interface Config {
469
486
  access_token: string;
@@ -1225,4 +1242,4 @@ declare class CoreClient {
1225
1242
  checkAuth(): Promise<MeResponse>;
1226
1243
  }
1227
1244
 
1228
- export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WidgetRenderContext, type WidgetSpec };
1245
+ export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, GRAPH_ASPECTS, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, type GraphAspect, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebWidgetComponent, type WidgetComponent, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redplanethq/sdk",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "CORE Node.JS SDK",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",