@stacksjs/chat 0.75.529 → 0.75.535

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.
@@ -88,6 +88,7 @@ export declare interface DiscordMessage {
88
88
  }
89
89
  }
90
90
  export declare class DiscordDriver extends BaseChatDriver {
91
+ /** @defaultValue 'discord' */
91
92
  name: string;
92
93
  private settings;
93
94
  private explicitRetries;
@@ -81,6 +81,7 @@ export declare interface SlackAttachment {
81
81
  ts?: number
82
82
  }
83
83
  export declare class SlackDriver extends BaseChatDriver {
84
+ /** @defaultValue 'slack' */
84
85
  name: string;
85
86
  private settings;
86
87
  private explicitRetries;
@@ -85,6 +85,7 @@ export declare interface TeamsMessage {
85
85
  }>
86
86
  }
87
87
  export declare class TeamsDriver extends BaseChatDriver {
88
+ /** @defaultValue 'teams' */
88
89
  name: string;
89
90
  private settings;
90
91
  private explicitRetries;
@@ -36,7 +36,7 @@ export declare class DiscordGateway {
36
36
  private identity;
37
37
  private options;
38
38
  constructor(identity: GatewayIdentity, options: GatewayOptions);
39
- whenReady(timeoutMs?: unknown): Promise<any>;
39
+ whenReady(timeoutMs?: number): Promise<any>;
40
40
  connect(): void;
41
41
  stop(): void;
42
42
  private send;
@@ -1,19 +1,7 @@
1
- export declare function channelPermissions(input: {
2
- guildId: string
3
- ownerId?: string | null
4
- userId: string
5
- memberRoles: string[]
6
- roles: RoleLike[]
7
- overwrites: OverwriteLike[]
8
- }): bigint;
9
- export declare function canRead(permissions: bigint): boolean;
10
1
  /**
11
2
  * Whether a member can see a channel, by Discord's own rules: the server's
12
3
  * @everyone role and the member's roles set the base, Administrator sees
13
4
  * everything, and the channel's overwrites then apply in order - @everyone,
14
5
  * then the member's roles together, then the member themselves.
15
6
  */
16
- export declare const VIEW_CHANNEL: boolean;
17
- export declare const READ_MESSAGE_HISTORY: boolean;
18
- export declare interface RoleLike { id: string, permissions: string | number }
19
- export declare interface OverwriteLike { id: string, type: number | string, allow: string | number, deny: string | number }
7
+ export declare const VIEW_CHANNEL: bigint;
@@ -27,6 +27,7 @@ export declare interface DiscordInboxConfig {
27
27
  */
28
28
  export declare class DiscordInboxDriver implements InboxDriver {
29
29
  readonly provider: 'discord';
30
+ /** @defaultValue 'Discord' */
30
31
  readonly label: string;
31
32
  private token;
32
33
  private account;
@@ -9,12 +9,6 @@ export declare function unixMsToAppleDate(ms: number): number;
9
9
  * "\uFFFC": not empty, and invisible. Shown as text it is an empty bubble.
10
10
  */
11
11
  export declare function messageText(plain: string | null, attributedBody: Uint8Array | null): string | null;
12
- /**
13
- * `associated_message_guid` points at a part of a message, not the message:
14
- * `p:0/<guid>` for the first part, `bp:<guid>` for a balloon. Reactions are
15
- * shown on the message, so strip the part.
16
- */
17
- export declare function reactionTarget(raw: string | null): string | null;
18
12
  /**
19
13
  * Read-only access to the Messages app's database.
20
14
  *
@@ -90,20 +84,3 @@ export declare class MessagesAccessError extends Error {
90
84
  public readonly path: string;
91
85
  constructor(path: string, cause: unknown);
92
86
  }
93
- export declare class MessagesDb {
94
- private db;
95
- private messageColumns;
96
- private hasRecoverable;
97
- public readonly path: string;
98
- constructor(path?: string);
99
- private hasChatProperties;
100
- attachmentFile(guid: string): string | null;
101
- close(): void;
102
- latestRowId(): number;
103
- private column;
104
- chats(): ChatRow[];
105
- private participantsByChat;
106
- messages(chatGuids: string[], options?: MessageQuery): MessageRow[];
107
- attachmentPath(guid: string): { path: string | null, mimeType: string | null, name: string } | null;
108
- private attachmentsFor;
109
- }
@@ -34,6 +34,7 @@ export declare interface IMessageConfig {
34
34
  */
35
35
  export declare class IMessageDriver implements InboxDriver {
36
36
  readonly provider: 'imessage';
37
+ /** @defaultValue 'iMessage' */
37
38
  readonly label: string;
38
39
  private databasePath;
39
40
  private addressBookDir;
@@ -23,6 +23,7 @@ export declare class SlackApiError extends Error {
23
23
  */
24
24
  export declare class SlackInboxDriver implements InboxDriver {
25
25
  readonly provider: 'slack';
26
+ /** @defaultValue 'Slack' */
26
27
  readonly label: string;
27
28
  private token;
28
29
  private fetch;
@@ -32,6 +32,7 @@ export declare interface WhatsAppConfig {
32
32
  */
33
33
  export declare class WhatsAppDriver implements InboxDriver {
34
34
  readonly provider: 'whatsapp';
35
+ /** @defaultValue 'WhatsApp' */
35
36
  readonly label: string;
36
37
  private databasePath;
37
38
  private mediaRoot;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.529",
5
+ "version": "0.75.535",
6
6
  "description": "Easily interact with chat APIs.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -58,14 +58,14 @@
58
58
  "prepublishOnly": "bun run build"
59
59
  },
60
60
  "dependencies": {
61
- "@stacksjs/orm": "0.75.529",
62
- "@stacksjs/config": "0.75.529",
63
- "@stacksjs/logging": "0.75.529"
61
+ "@stacksjs/orm": "0.75.535",
62
+ "@stacksjs/config": "0.75.535",
63
+ "@stacksjs/logging": "0.75.535"
64
64
  },
65
65
  "devDependencies": {
66
- "@stacksjs/cli": "0.75.529",
67
- "@stacksjs/error-handling": "0.75.529",
68
- "@stacksjs/types": "0.75.529",
66
+ "@stacksjs/cli": "0.75.535",
67
+ "@stacksjs/error-handling": "0.75.535",
68
+ "@stacksjs/types": "0.75.535",
69
69
  "better-dx": "^0.2.24"
70
70
  }
71
71
  }