1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { Activity, PagedResult, TranscriptInfo, TranscriptStore } from 'botbuilder';
|
9 | import { BlobStorageSettings } from './blobStorage';
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare const checkedCollectionsKey: unique symbol;
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export declare class AzureBlobTranscriptStore implements TranscriptStore {
|
27 | |
28 |
|
29 |
|
30 |
|
31 | private static [checkedCollectionsKey];
|
32 | private readonly settings;
|
33 | private client;
|
34 | private pageSize;
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 | constructor(settings: BlobStorageSettings);
|
41 | /**
|
42 | * Log an activity to the transcript.
|
43 | *
|
44 | * @param activity Activity being logged.
|
45 | */
|
46 | logActivity(activity: Activity): Promise<void>;
|
47 | /**
|
48 | * Get activities for a conversation (Aka the transcript)
|
49 | *
|
50 | * @param channelId Channel Id.
|
51 | * @param conversationId Conversation Id.
|
52 | * @param continuationToken Continuation token to page through results.
|
53 | * @param startDate Earliest time to include.
|
54 | */
|
55 | getTranscriptActivities(channelId: string, conversationId: string, continuationToken?: string, startDate?: Date): Promise<PagedResult<Activity>>;
|
56 | /**
|
57 | * List conversations in the channelId.
|
58 | *
|
59 | * @param channelId Channel Id.
|
60 | * @param continuationToken ContinuationToken token to page through results.
|
61 | */
|
62 | listTranscripts(channelId: string, continuationToken?: string): Promise<PagedResult<TranscriptInfo>>;
|
63 | /**
|
64 | * Delete a specific conversation and all of it's activities.
|
65 | *
|
66 | * @param channelId Channel Id where conversation took place.
|
67 | * @param conversationId Id of the conversation to delete.
|
68 | */
|
69 | deleteTranscript(channelId: string, conversationId: string): Promise<void>;
|
70 | /**
|
71 | * Parse a BlobResult as an [Activity](xref:botframework-schema.Activity).
|
72 | *
|
73 | * @param blob BlobResult to parse as an [Activity](xref:botframework-schema.Activity).
|
74 | * @returns The parsed [Activity](xref:botframework-schema.Activity).
|
75 | */
|
76 | private blobToActivity;
|
77 | /**
|
78 | * @private
|
79 | */
|
80 | private getActivityBlobs;
|
81 | /**
|
82 | * @private
|
83 | */
|
84 | private getTranscriptsFolders;
|
85 | /**
|
86 | * @private
|
87 | */
|
88 | private getConversationsBlobs;
|
89 | /**
|
90 | * Check if a container name is valid.
|
91 | *
|
92 | * @param container String representing the container name to validate.
|
93 | * @returns A boolean value that indicates whether or not the name is valid.
|
94 | */
|
95 | private checkContainerName;
|
96 | /**
|
97 | * Get the blob name based on the [Activity](xref:botframework-schema.Activity).
|
98 | *
|
99 | * @param activity [Activity](xref:botframework-schema.Activity) to get the blob name from.
|
100 | * @returns The blob name.
|
101 | */
|
102 | private getBlobName;
|
103 | /**
|
104 | * Get the directory name.
|
105 | *
|
106 | * @param channelId Channel Id.
|
107 | * @param conversationId Id of the conversation to get the directory name from.
|
108 | * @returns The sanitized directory name.
|
109 | */
|
110 | private getDirName;
|
111 | /**
|
112 | * Escape a given key to be compatible for use with BlobStorage.
|
113 | *
|
114 | * @param key Key to be sanitized(scaped).
|
115 | * @returns The sanitized key.
|
116 | */
|
117 | private sanitizeKey;
|
118 | /**
|
119 | * @private
|
120 | */
|
121 | private getTicks;
|
122 | /**
|
123 | * Delay Container creation if it does not exist.
|
124 | */
|
125 | private ensureContainerExists;
|
126 | /**
|
127 | * Create a Blob Service.
|
128 | *
|
129 | * @param param0 Settings required for configuring the Blob Service.
|
130 | * @param param0.storageAccountOrConnectionString Storage account or connection string.
|
131 | * @param param0.storageAccessKey Storage access key.
|
132 | * @param param0.host Blob Service host.
|
133 | * @returns The BlobService created.
|
134 | */
|
135 | private createBlobService;
|
136 | }
|
137 | //# sourceMappingURL=azureBlobTranscriptStore.d.ts.map |
\ | No newline at end of file |