@happyvertical/messages 0.101.3 → 0.102.1

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,5 +1,11 @@
1
+ /**
2
+ * Email Bridge Adapter
3
+ *
4
+ * Thin wrapper that adapts @happyvertical/email EmailClient
5
+ * to the unified MessageClient interface.
6
+ */
1
7
  import { BaseMessageClient } from '../shared/base.js';
2
- import { EmailBridgeOptions, FetchOptions, Message, MessageAdapterType, MessageClientCapabilities, SendOptions, SendResult } from '../shared/types.js';
8
+ import type { EmailBridgeOptions, FetchOptions, Message, MessageAdapterType, MessageClientCapabilities, SendOptions, SendResult } from '../shared/types.js';
3
9
  export declare class EmailBridgeAdapter extends BaseMessageClient {
4
10
  private emailClient;
5
11
  private emailOptions;
@@ -1,5 +1,10 @@
1
+ /**
2
+ * Slack Adapter
3
+ *
4
+ * Implements MessageClient interface for Slack using @slack/web-api.
5
+ */
1
6
  import { BaseMessageClient } from '../shared/base.js';
2
- import { Channel, FetchOptions, Message, MessageAdapterType, MessageClientCapabilities, SendOptions, SendResult, SlackOptions } from '../shared/types.js';
7
+ import type { Channel, FetchOptions, Message, MessageAdapterType, MessageClientCapabilities, SendOptions, SendResult, SlackOptions } from '../shared/types.js';
3
8
  export declare class SlackAdapter extends BaseMessageClient {
4
9
  private client;
5
10
  private botToken;
@@ -1,5 +1,11 @@
1
+ /**
2
+ * Twitter Adapter
3
+ *
4
+ * Implements MessageClient interface for Twitter/X using API v2.
5
+ * Uses OAuth 1.0a signing via node:crypto (no external dependency).
6
+ */
1
7
  import { BaseMessageClient } from '../shared/base.js';
2
- import { FetchOptions, Message, MessageAdapterType, MessageClientCapabilities, SendOptions, SendResult, TwitterOptions } from '../shared/types.js';
8
+ import type { FetchOptions, Message, MessageAdapterType, MessageClientCapabilities, SendOptions, SendResult, TwitterOptions } from '../shared/types.js';
3
9
  export declare class TwitterAdapter extends BaseMessageClient {
4
10
  private apiKey;
5
11
  private apiSecret;
@@ -1,6 +1,9 @@
1
- import { Logger } from '@happyvertical/logger';
1
+ /**
2
+ * Base message client adapter class
3
+ */
4
+ import { type Logger } from '@happyvertical/logger';
2
5
  import { MessagingError } from './errors.js';
3
- import { Channel, FetchOptions, Message, MessageAdapterType, MessageClient, MessageClientCapabilities, MessageClientConfig, SendOptions, SendResult } from './types.js';
6
+ import type { Channel, FetchOptions, Message, MessageAdapterType, MessageClient, MessageClientCapabilities, MessageClientConfig, SendOptions, SendResult } from './types.js';
4
7
  /**
5
8
  * Base adapter class providing shared functionality.
6
9
  *
@@ -1,4 +1,7 @@
1
- import { EmailBridgeOptions, GetMessageClientOptions, MessageClient, SlackOptions, TwitterOptions } from './types.js';
1
+ /**
2
+ * Factory function and type guards for @happyvertical/messages package
3
+ */
4
+ import type { EmailBridgeOptions, GetMessageClientOptions, MessageClient, SlackOptions, TwitterOptions } from './types.js';
2
5
  export declare function isSlackOptions(opts: GetMessageClientOptions): opts is SlackOptions;
3
6
  export declare function isTwitterOptions(opts: GetMessageClientOptions): opts is TwitterOptions;
4
7
  export declare function isEmailBridgeOptions(opts: GetMessageClientOptions): opts is EmailBridgeOptions;
@@ -1,5 +1,11 @@
1
- import { GetEmailClientOptions } from '@happyvertical/email';
2
- import { Logger } from '@happyvertical/logger';
1
+ /**
2
+ * Core types for @happyvertical/messages package
3
+ *
4
+ * Unified, protocol-agnostic messaging types for Slack, Twitter, and Email.
5
+ * No database dependencies — use @happyvertical/smrt-messages for persistence.
6
+ */
7
+ import type { GetEmailClientOptions } from '@happyvertical/email';
8
+ import type { Logger } from '@happyvertical/logger';
3
9
  export interface Message {
4
10
  id?: string;
5
11
  channelId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/messages",
3
- "version": "0.101.3",
3
+ "version": "0.102.1",
4
4
  "description": "Unified multi-channel messaging with adapter-based architecture (Slack, Twitter, Email)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,9 +24,9 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@happyvertical/email": "0.101.3",
28
- "@happyvertical/logger": "0.101.3",
29
- "@happyvertical/utils": "0.101.3",
27
+ "@happyvertical/email": "0.102.1",
28
+ "@happyvertical/logger": "0.102.1",
29
+ "@happyvertical/utils": "0.102.1",
30
30
  "@slack/web-api": "^7.15.1"
31
31
  },
32
32
  "devDependencies": {