@linktr.ee/messaging-react 3.3.3 → 3.3.4

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.
package/dist/index.d.ts CHANGED
@@ -1222,6 +1222,29 @@ export declare interface MessagingShellProps extends ChannelViewPassthroughProps
1222
1222
 
1223
1223
  export declare function normalizeLanguageCode(language?: string): string | undefined;
1224
1224
 
1225
+ /**
1226
+ * Action intents supported by Linktree official CTA attachments.
1227
+ */
1228
+ export declare type OfficialCtaActionKind =
1229
+ /** Open the existing share-to-socials flow for the current platform. */
1230
+ 'post_to_socials'
1231
+ /** Navigate to an external URL when the CTA represents plain navigation. */
1232
+ | 'open_external_url';
1233
+
1234
+ export declare interface OfficialCtaActionPayload {
1235
+ kind?: OfficialCtaActionKind;
1236
+ label?: string;
1237
+ url?: string;
1238
+ }
1239
+
1240
+ /**
1241
+ * Structured attachment shape for server-authored Linktree official CTA cards.
1242
+ */
1243
+ export declare type OfficialCtaAttachment = Attachment & {
1244
+ action?: OfficialCtaActionPayload;
1245
+ type: 'linktree_official_cta';
1246
+ };
1247
+
1225
1248
  /**
1226
1249
  * Generic participant interface for different host environments
1227
1250
  */
@@ -1393,6 +1416,9 @@ export { }
1393
1416
 
1394
1417
 
1395
1418
  declare module 'stream-chat' {
1419
+ interface CustomAttachmentData {
1420
+ action?: OfficialCtaActionPayload;
1421
+ }
1396
1422
  interface CustomChannelData {
1397
1423
  /**
1398
1424
  * Whether the channel has at least one visitor-originated message.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/index.ts CHANGED
@@ -57,7 +57,12 @@ export type {
57
57
  Participant,
58
58
  LockedAttachmentSource,
59
59
  } from './types'
60
- export type { MessageMetadata } from './stream-custom-data'
60
+ export type {
61
+ MessageMetadata,
62
+ OfficialCtaActionKind,
63
+ OfficialCtaActionPayload,
64
+ OfficialCtaAttachment,
65
+ } from './stream-custom-data'
61
66
  export type { AvatarProps } from './components/Avatar'
62
67
  export type { ActionButtonProps } from './components/ActionButton'
63
68
  export type {
@@ -12,6 +12,7 @@
12
12
  * to be included in the distributed types.
13
13
  */
14
14
 
15
+ import type { Attachment } from 'stream-chat'
15
16
  import 'stream-chat'
16
17
 
17
18
  export type DmAgentSystemType =
@@ -45,7 +46,34 @@ export interface MessageMetadata {
45
46
  attachment_detail?: string
46
47
  }
47
48
 
49
+ /**
50
+ * Action intents supported by Linktree official CTA attachments.
51
+ */
52
+ export type OfficialCtaActionKind =
53
+ /** Open the existing share-to-socials flow for the current platform. */
54
+ | 'post_to_socials'
55
+ /** Navigate to an external URL when the CTA represents plain navigation. */
56
+ | 'open_external_url'
57
+
58
+ export interface OfficialCtaActionPayload {
59
+ kind?: OfficialCtaActionKind
60
+ label?: string
61
+ url?: string
62
+ }
63
+
64
+ /**
65
+ * Structured attachment shape for server-authored Linktree official CTA cards.
66
+ */
67
+ export type OfficialCtaAttachment = Attachment & {
68
+ action?: OfficialCtaActionPayload
69
+ type: 'linktree_official_cta'
70
+ }
71
+
48
72
  declare module 'stream-chat' {
73
+ interface CustomAttachmentData {
74
+ action?: OfficialCtaActionPayload
75
+ }
76
+
49
77
  interface CustomChannelData {
50
78
  /**
51
79
  * Whether the channel has at least one visitor-originated message.