@redplanethq/sdk 0.1.14 → 0.1.16
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 +36 -1
- package/dist/index.d.ts +36 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -385,6 +385,40 @@ declare class McpAuthParams {
|
|
|
385
385
|
server_url: string;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
+
interface WidgetRenderContext {
|
|
389
|
+
placement: 'tui' | 'webapp';
|
|
390
|
+
pat: string;
|
|
391
|
+
accounts: Array<{
|
|
392
|
+
id: string;
|
|
393
|
+
slug: string;
|
|
394
|
+
name?: string;
|
|
395
|
+
}>;
|
|
396
|
+
baseUrl: string;
|
|
397
|
+
}
|
|
398
|
+
/** Metadata only — used in integration Spec (no render function) */
|
|
399
|
+
interface WidgetMeta {
|
|
400
|
+
name: string;
|
|
401
|
+
slug: string;
|
|
402
|
+
description: string;
|
|
403
|
+
support: Array<'tui' | 'webapp'>;
|
|
404
|
+
tuiPlacement?: 'overview' | 'below-input';
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* A zero-argument React function component (webapp placement).
|
|
408
|
+
* Context (pat, accountId, baseUrl) is baked in via closure.
|
|
409
|
+
*/
|
|
410
|
+
type WebWidgetComponent = () => unknown;
|
|
411
|
+
/**
|
|
412
|
+
* A pi-tui Component instance (tui placement).
|
|
413
|
+
* Returned by createPlayer / createList / etc. from @redplanethq/ui/tui.
|
|
414
|
+
*/
|
|
415
|
+
type TuiWidgetComponent = object;
|
|
416
|
+
/** Union of the two surface-specific component types */
|
|
417
|
+
type WidgetComponent = WebWidgetComponent | TuiWidgetComponent;
|
|
418
|
+
/** Full widget — used in widgets/index.ts (includes render) */
|
|
419
|
+
interface WidgetSpec extends WidgetMeta {
|
|
420
|
+
render(context: WidgetRenderContext): Promise<WidgetComponent>;
|
|
421
|
+
}
|
|
388
422
|
declare enum IntegrationEventType {
|
|
389
423
|
/**
|
|
390
424
|
* Processes authentication data and returns tokens/credentials to be saved
|
|
@@ -444,6 +478,7 @@ declare class Spec {
|
|
|
444
478
|
api_key?: APIKeyParams;
|
|
445
479
|
mcp?: McpAuthParams;
|
|
446
480
|
};
|
|
481
|
+
widgets?: WidgetMeta[];
|
|
447
482
|
}
|
|
448
483
|
interface Config {
|
|
449
484
|
access_token: string;
|
|
@@ -1205,4 +1240,4 @@ declare class CoreClient {
|
|
|
1205
1240
|
checkAuth(): Promise<MeResponse>;
|
|
1206
1241
|
}
|
|
1207
1242
|
|
|
1208
|
-
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 };
|
|
1243
|
+
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
|
@@ -385,6 +385,40 @@ declare class McpAuthParams {
|
|
|
385
385
|
server_url: string;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
+
interface WidgetRenderContext {
|
|
389
|
+
placement: 'tui' | 'webapp';
|
|
390
|
+
pat: string;
|
|
391
|
+
accounts: Array<{
|
|
392
|
+
id: string;
|
|
393
|
+
slug: string;
|
|
394
|
+
name?: string;
|
|
395
|
+
}>;
|
|
396
|
+
baseUrl: string;
|
|
397
|
+
}
|
|
398
|
+
/** Metadata only — used in integration Spec (no render function) */
|
|
399
|
+
interface WidgetMeta {
|
|
400
|
+
name: string;
|
|
401
|
+
slug: string;
|
|
402
|
+
description: string;
|
|
403
|
+
support: Array<'tui' | 'webapp'>;
|
|
404
|
+
tuiPlacement?: 'overview' | 'below-input';
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* A zero-argument React function component (webapp placement).
|
|
408
|
+
* Context (pat, accountId, baseUrl) is baked in via closure.
|
|
409
|
+
*/
|
|
410
|
+
type WebWidgetComponent = () => unknown;
|
|
411
|
+
/**
|
|
412
|
+
* A pi-tui Component instance (tui placement).
|
|
413
|
+
* Returned by createPlayer / createList / etc. from @redplanethq/ui/tui.
|
|
414
|
+
*/
|
|
415
|
+
type TuiWidgetComponent = object;
|
|
416
|
+
/** Union of the two surface-specific component types */
|
|
417
|
+
type WidgetComponent = WebWidgetComponent | TuiWidgetComponent;
|
|
418
|
+
/** Full widget — used in widgets/index.ts (includes render) */
|
|
419
|
+
interface WidgetSpec extends WidgetMeta {
|
|
420
|
+
render(context: WidgetRenderContext): Promise<WidgetComponent>;
|
|
421
|
+
}
|
|
388
422
|
declare enum IntegrationEventType {
|
|
389
423
|
/**
|
|
390
424
|
* Processes authentication data and returns tokens/credentials to be saved
|
|
@@ -444,6 +478,7 @@ declare class Spec {
|
|
|
444
478
|
api_key?: APIKeyParams;
|
|
445
479
|
mcp?: McpAuthParams;
|
|
446
480
|
};
|
|
481
|
+
widgets?: WidgetMeta[];
|
|
447
482
|
}
|
|
448
483
|
interface Config {
|
|
449
484
|
access_token: string;
|
|
@@ -1205,4 +1240,4 @@ declare class CoreClient {
|
|
|
1205
1240
|
checkAuth(): Promise<MeResponse>;
|
|
1206
1241
|
}
|
|
1207
1242
|
|
|
1208
|
-
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 };
|
|
1243
|
+
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 };
|