Skip to content

Commit ac62585

Browse files
author
Evan Greer
committed
feat: adds comments to IterableEmbeddedMessageMetadata
1 parent 0bb9997 commit ac62585

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

File renamed without changes.

src/embedded/classes/IterableEmbeddedMessageMetadata.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1+
/**
2+
* Metadata for an embedded message.
3+
*/
14
export class IterableEmbeddedMessageMetadata {
5+
/** The ID for the embedded message */
26
readonly messageId: string;
7+
8+
/** The placement ID for the embedded message */
39
readonly placementId: number;
10+
11+
/** The campaign ID for the embedded message */
412
readonly campaignId?: number;
13+
14+
/** Whether the embedded message is a proof */
515
readonly isProof: boolean;
616

17+
/**
18+
* Constructs an instance of IterableEmbeddedMessageMetadata.
19+
*
20+
* @param messageId - The ID for the embedded message.
21+
* @param placementId - The placement ID for the embedded message.
22+
* @param campaignId - The campaign ID for the embedded message.
23+
* @param isProof - Whether the embedded message is a proof.
24+
*/
725
constructor(
826
messageId: string,
927
placementId: number,
@@ -16,6 +34,14 @@ export class IterableEmbeddedMessageMetadata {
1634
this.isProof = isProof;
1735
}
1836

37+
/**
38+
* Creates an instance of `IterableEmbeddedMessageMetadata` from a dictionary object.
39+
*
40+
* @param dict - The dictionary objectcontaining the metadata properties.
41+
* This corresponds to the properties in {@link IterableEmbeddedMessageMetadata}
42+
*
43+
* @returns A new instance of `IterableEmbeddedMessageMetadata` with the provided properties.
44+
*/
1945
static fromDict(
2046
dict: Partial<EmbeddedMessageMetadataDict>
2147
): IterableEmbeddedMessageMetadata {
@@ -31,6 +57,9 @@ export class IterableEmbeddedMessageMetadata {
3157
}
3258
}
3359

60+
/**
61+
* An interface defining the dictionary object containing the metadata properties for an embedded message.
62+
*/
3463
export interface EmbeddedMessageMetadataDict {
3564
messageId: string;
3665
placementId: number;

0 commit comments

Comments
 (0)