import type * as esbuild from 'esbuild'; import { SchemaTransformOptions } from '../../common/types'; import { InterfacePackage } from '../../package'; import * as utils from '../../utils'; import { z } from '../../zui'; import { SchemaStore, BrandedSchema } from './branded-schema'; import { BaseConfig, BaseEvents, BaseActions, BaseChannels, BaseStates, BaseEntities, BaseConfigs } from './generic'; import { ConfigurationDefinition, EventDefinition, ChannelDefinition, ActionDefinition, StateDefinition, UserDefinition, SecretDefinition, EntityDefinition, AdditionalConfigurationDefinition, InterfaceExtension } from './types'; export * from './types'; export type IntegrationDefinitionProps = { name: TName; version: TVersion; title?: string; description?: string; icon?: string; readme?: string; attributes?: Record; identifier?: { extractScript?: string; fallbackHandlerScript?: string; }; configuration?: ConfigurationDefinition; configurations?: { [K in keyof TConfigs]: AdditionalConfigurationDefinition; }; events?: { [K in keyof TEvents]: EventDefinition; }; actions?: { [K in keyof TActions]: ActionDefinition; }; channels?: { [K in keyof TChannels]: ChannelDefinition; }; states?: { [K in keyof TStates]: StateDefinition; }; user?: UserDefinition; secrets?: Record; entities?: { [K in keyof TEntities]: EntityDefinition; }; interfaces?: Record; __advanced?: SchemaTransformOptions & { esbuild?: Partial; extraOperations?: Record; }; }; type EntitiesOfPackage = { [K in keyof TPackage['definition']['entities']]: NonNullable[K]['schema']; }; type ActionsOfPackage = { [K in keyof TPackage['definition']['actions']]: NonNullable[K]['input']['schema']; }; type EventsOfPackage = { [K in keyof TPackage['definition']['events']]: NonNullable[K]['schema']; }; type ChannelsOfPackage = { [K in keyof TPackage['definition']['channels']]: { [M in keyof NonNullable[K]['messages']]: NonNullable[K]['messages']>[M]['schema']; }; }; export type ActionOverrideProps = utils.types.AtLeastOneProperty, 'title' | 'description' | 'billable' | 'cacheable' | 'attributes'> & { name: string; }>; export type EventOverrideProps = utils.types.AtLeastOneProperty, 'title' | 'description' | 'attributes'> & { name: string; }>; export type ChannelOverrideProps = utils.types.AtLeastOneProperty, 'title' | 'description'> & { name: string; message: { tags: Required['message']>['tags']; }; conversation: { tags: Required['conversation']>['tags']; }; }>; type ActionOverrides = utils.types.AtLeastOneProperty>; type EventOverrides = utils.types.AtLeastOneProperty>; type ChannelOverrides = utils.types.AtLeastOneProperty>; type ExtensionBuilderInput = { entities: SchemaStore; }; type ExtensionBuilderOutput = { entities: { [K in keyof TInterfaceEntities]: BrandedSchema>>; }; actions?: ActionOverrides>; events?: EventOverrides>; channels?: ChannelOverrides>; }; type ExtensionBuilder = (input: ExtensionBuilderInput) => ExtensionBuilderOutput; export declare class IntegrationDefinition { readonly props: IntegrationDefinitionProps; readonly name: this['props']['name']; readonly version: this['props']['version']; readonly title: this['props']['title']; readonly description: this['props']['description']; readonly icon: this['props']['icon']; readonly readme: this['props']['readme']; readonly configuration: this['props']['configuration']; readonly configurations: this['props']['configurations']; readonly events: this['props']['events']; readonly actions: this['props']['actions']; readonly channels: this['props']['channels']; readonly states: this['props']['states']; readonly user: this['props']['user']; readonly secrets: this['props']['secrets']; readonly identifier: this['props']['identifier']; readonly entities: this['props']['entities']; readonly interfaces: this['props']['interfaces']; readonly __advanced: this['props']['__advanced']; readonly attributes: this['props']['attributes']; constructor(props: IntegrationDefinitionProps); get metadata(): { readonly sdkVersion: string; }; extend

(interfacePkg: P, builder: ExtensionBuilder, ActionsOfPackage

, EventsOfPackage

, ChannelsOfPackage

>): this; private _callBuilder; private _mergeActions; private _mergeEvents; private _mergeChannels; private _mergeMessage; private _mergeObjectSchemas; }