@almadar/integrations 2.36.0 → 2.37.0

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.
@@ -49,7 +49,11 @@ interface IntegrationResult<T = unknown> {
49
49
  /**
50
50
  * Integration error codes
51
51
  */
52
- type IntegrationErrorCode = 'VALIDATION_ERROR' | 'AUTH_ERROR' | 'RATE_LIMIT_ERROR' | 'TIMEOUT_ERROR' | 'NETWORK_ERROR' | 'SERVICE_ERROR' | 'UNKNOWN_ERROR';
52
+ type IntegrationErrorCode = 'VALIDATION_ERROR' | 'AUTH_ERROR' | 'RATE_LIMIT_ERROR' | 'TIMEOUT_ERROR' | 'NETWORK_ERROR' | 'SERVICE_ERROR'
53
+ /** The service is known but its credentials/config are absent. */
54
+ | 'NOT_CONFIGURED'
55
+ /** No integration is registered under this name. */
56
+ | 'UNKNOWN_INTEGRATION' | 'UNKNOWN_ERROR';
53
57
  /**
54
58
  * Integration error
55
59
  */
@@ -199,6 +203,8 @@ declare abstract class BaseIntegration {
199
203
  * Validate action params against registry
200
204
  */
201
205
  protected validateParams(action: string, params: IntegrationParams): ReturnType<typeof validateParams>;
206
+ /** A rejected call: a real IntegrationError naming every failing param (kept in `details`). */
207
+ protected validationFailure(action: string, errors: ValidationError[]): IntegrationResult;
202
208
  /**
203
209
  * Handle errors uniformly
204
210
  */
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { e as IntegrationLogger, c as IntegrationErrorCode, a as IntegrationConfig, B as BaseIntegration, d as IntegrationFactory, g as IntegrationParams, h as IntegrationResult, I as IntegrationCallContext } from './BaseIntegration-BYlbMFlf.js';
2
- export { b as IntegrationError, f as IntegrationParamValue, U as UnknownActionError, V as ValidationError, i as ValidationResult, j as getIntegrationFactory, r as resetIntegrationFactory, v as validateParams } from './BaseIntegration-BYlbMFlf.js';
3
- import { e as CredentialStore, d as CredentialPersistence, H as HookDeclaration } from './store-OiFX0Tkn.js';
4
- export { A as ArxivActions, C as CLIActions, a as CREDENTIAL_ENTITY_TYPE, b as CREDENTIAL_MASTER_KEY_ENV, c as CredentialEntry, D as DatabaseActions, f as DatabaseDriver, g as DatabaseQueryParamValue, h as DatabaseQueryParams, i as DatabaseQueryResult, j as DatabaseRow, k as DeepAgentActions, l as DockerActions, E as EmailActions, G as GitHubActions, I as IconifyActions, m as IntegrationActionName, n as IntegrationContracts, o as IntegrationName, L as LLMIntegrationActions, M as MLActions, O as OAuthActions, p as OtelActions, Q as QueueActions, R as RedisActions, S as StorageActions, q as StripeActions, T as TwilioActions, W as WebhookActions, r as WikimediaActions, Y as YouTubeActions, s as allCredentialEnvVars, t as declaredCredentialEnvVars, u as serviceHooks } from './store-OiFX0Tkn.js';
1
+ import { e as IntegrationLogger, c as IntegrationErrorCode, a as IntegrationConfig, B as BaseIntegration, d as IntegrationFactory, g as IntegrationParams, h as IntegrationResult, I as IntegrationCallContext } from './BaseIntegration-CWdas-N_.js';
2
+ export { b as IntegrationError, f as IntegrationParamValue, U as UnknownActionError, V as ValidationError, i as ValidationResult, j as getIntegrationFactory, r as resetIntegrationFactory, v as validateParams } from './BaseIntegration-CWdas-N_.js';
3
+ import { e as CredentialStore, d as CredentialPersistence, H as HookDeclaration } from './store-RNvxZO-q.js';
4
+ export { A as ArxivActions, C as CLIActions, a as CREDENTIAL_ENTITY_TYPE, b as CREDENTIAL_MASTER_KEY_ENV, c as CredentialEntry, D as DatabaseActions, f as DatabaseDriver, g as DatabaseQueryParamValue, h as DatabaseQueryParams, i as DatabaseQueryResult, j as DatabaseRow, k as DeepAgentActions, l as DockerActions, E as EmailActions, G as GitHubActions, I as IconifyActions, m as IntegrationActionName, n as IntegrationContracts, o as IntegrationName, L as LLMIntegrationActions, M as MLActions, O as OAuthActions, p as OtelActions, Q as QueueActions, R as RedisActions, S as StorageActions, q as StripeActions, T as TwilioActions, W as WebhookActions, r as WikimediaActions, Y as YouTubeActions, s as allCredentialEnvVars, t as declaredCredentialEnvVars, u as serviceHooks } from './store-RNvxZO-q.js';
5
5
  import { LogMeta, EntityRow, EventPayload } from '@almadar/core';
6
6
  export { GitHubIntegration } from './integrations/github/index.js';
7
7