Skip to content

Commit 8d57b25

Browse files
author
Evan Greer
committed
feat: adds documentation
1 parent 68542f2 commit 8d57b25

4 files changed

Lines changed: 39 additions & 2 deletions

File tree

src/embedded/classes/IterableEmbeddedMessageDefaultAction.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* IterableEmbeddedMessageDefaultAction represents the default action defined as
3+
* a response to user events for an embedded message
4+
*/
15
export class IterableEmbeddedMessageDefaultAction {
26
/**
37
* The type of iterable action

src/embedded/classes/IterableEmbeddedMessageElements.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,36 @@ import { IterableEmbeddedMessageDefaultAction } from './IterableEmbeddedMessageD
22
import { IterableEmbeddedMessageElementsButton } from './IterableEmbeddedMessageElementsButton';
33
import { IterableEmbeddedMessageText } from './IterableEmbeddedMessageText';
44

5+
/**
6+
* IterableEmbeddedMessageElements represents the elements of an embedded message.
7+
*/
58
export class IterableEmbeddedMessageElements {
9+
/** The title of the embedded message */
610
readonly title?: string;
11+
/** The body of the embedded message */
712
readonly body?: string;
13+
/** The url of the embedded message image */
814
readonly mediaUrl?: string;
15+
/** The caption of the embedded message image */
916
readonly mediaUrlCaption?: string;
17+
/** The default action of the embedded message */
1018
readonly defaultAction?: IterableEmbeddedMessageDefaultAction;
19+
/** The buttons of the embedded message */
1120
readonly buttons?: IterableEmbeddedMessageElementsButton[];
21+
/** The text elements of the embedded message */
1222
readonly text?: IterableEmbeddedMessageText[];
1323

24+
/**
25+
* Creates an instance of `IterableEmbeddedMessageElements`.
26+
*
27+
* @param title - The title of the embedded message.
28+
* @param body - The body of the embedded message.
29+
* @param mediaUrl - The url of the embedded message image.
30+
* @param mediaUrlCaption - The caption of the embedded message image.
31+
* @param defaultAction - The default action of the embedded message.
32+
* @param buttons - The buttons of the embedded message.
33+
* @param text - The text elements of the embedded message.
34+
*/
1435
constructor(
1536
title?: string,
1637
body?: string,
@@ -29,6 +50,12 @@ export class IterableEmbeddedMessageElements {
2950
this.text = text;
3051
}
3152

53+
/**
54+
* Creates an instance of `IterableEmbeddedMessageElements` from a dictionary object.
55+
*
56+
* @param dict - The dictionary object containing the properties to initialize the `IterableEmbeddedMessageElements` instance.
57+
* @returns A new instance of `IterableEmbeddedMessageElements` initialized with the provided dictionary properties.
58+
*/
3259
static fromDict(
3360
dict: Partial<EmbeddedMessageElementsDict>
3461
): IterableEmbeddedMessageElements {
@@ -60,6 +87,9 @@ export class IterableEmbeddedMessageElements {
6087
}
6188
}
6289

90+
/**
91+
* An interface defining the dictionary object containing the properties for the embedded message elements.
92+
*/
6393
export interface EmbeddedMessageElementsDict {
6494
title?: string;
6595
body?: string;

src/embedded/classes/IterableEmbeddedMessageElementsButtonAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* IterableEmbeddedMessageElementsButtonAction represents an action defined as a response to user events
3-
* for an embedded message button.
2+
* IterableEmbeddedMessageElementsButtonAction represents an action defined as
3+
* a response to user events for an embedded message button
44
*/
55
export class IterableEmbeddedMessageElementsButtonAction {
66
/**

src/embedded/classes/IterableEmbeddedMessageText.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* IterableEmbeddedMessageText represents a text element in an embedded message.
3+
*/
14
export class IterableEmbeddedMessageText {
25
/** The id of the text element */
36
readonly id: string;

0 commit comments

Comments
 (0)