@squidcloud/backend 1.0.471 → 1.0.472

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.
@@ -1,6 +1,6 @@
1
1
  import { AiFunctionId, ApiEndpointId, CollectionName, IntegrationId, IntegrationType, TopicName } from '@squidcloud/client';
2
2
  import { JSONSchema } from 'json-schema-typed';
3
- import { ActionMethodDecorator, AiFunctionAction, ClientConnectionStateChangeAction, ExecutableAction, LimiterConfig, LimitsAction, LlmAskAction, McpAuthorizerAction, McpToolAction, QueueMessageAction, SchedulerAction, SecureAiAgentAction, SecureAiQueryAction, SecureApiAction, SecureDatabaseAction, SecureDistributedLockAction, SecureGraphQLAction, SecureMetricAction, SecureNativeQueryAction, SecureStorageAction, SecureTopicAction, TriggerAction, WebhookAction } from '../../internal-common/src/public-types-backend/bundle-api.public-types';
3
+ import { ActionMethodDecorator, AiFunctionAction, ClientConnectionStateChangeAction, EventHandlerAction, ExecutableAction, LimiterConfig, LimitsAction, LlmAskAction, McpAuthorizerAction, McpToolAction, QueueMessageAction, SchedulerAction, SecureAiAgentAction, SecureAiQueryAction, SecureApiAction, SecureDatabaseAction, SecureDistributedLockAction, SecureGraphQLAction, SecureMetricAction, SecureNativeQueryAction, SecureStorageAction, SecureTopicAction, TriggerAction, WebhookAction } from '../../internal-common/src/public-types-backend/bundle-api.public-types';
4
4
  import { AiFunctionAttributes, AiFunctionParam, DatabaseActionType, MetricActionType, StorageActionType, TopicActionType } from '../../internal-common/src/public-types-backend/bundle-data.public-types';
5
5
  import { AiFunctionsConfiguratorRequest, AiFunctionsConfiguratorResponse, CronExpression, CronExpressionString, LlmServiceOptions, McpServerOptions, MutationType, SchedulerId, TriggerId, WebhookId } from './public-types';
6
6
  /**
@@ -138,6 +138,18 @@ export declare function secureGraphQL(integrationId: IntegrationId): ActionMetho
138
138
  * @category Decorator
139
139
  */
140
140
  export declare function onQueueMessage<T = unknown>(topicName: TopicName, integrationId?: IntegrationId): ActionMethodDecorator<QueueMessageAction<T>>;
141
+ /**
142
+ * Decorator that marks a function as a handler for an emitted event of the given `type`.
143
+ *
144
+ * Events are emitted with {@link SquidService.emitEvent} and delivered over core's internal event
145
+ * stream, so multiple subscribers may handle the same event type. The handler receives the emitted
146
+ * event (`{ id, type, payload }`).
147
+ *
148
+ * @param type The event type to subscribe to.
149
+ * @category Event
150
+ * @category Decorator
151
+ */
152
+ export declare function eventHandler<T = unknown>(type: string): ActionMethodDecorator<EventHandlerAction<T>>;
141
153
  /**
142
154
  * Decorator marking a function as executable, making it accessible via the Squid SDK.
143
155
  *