@pluno/product-agent-web 0.1.196 → 0.1.199
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/activityLoading.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/product-agent-sdk.js +2019 -1788
- package/dist/product-agent-widget.js +3222 -2910
- package/dist/sessionActivityRecovery.d.ts +28 -0
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ProductAgentSessionActivityPage<Item> = {
|
|
2
|
+
items: Item[];
|
|
3
|
+
nextCursor: string | null;
|
|
4
|
+
};
|
|
5
|
+
export type ProductAgentSessionActivityRecoveryResult<Page> = {
|
|
6
|
+
pages: Page[];
|
|
7
|
+
checkpoint: string | null;
|
|
8
|
+
continuationCursor: string | null;
|
|
9
|
+
};
|
|
10
|
+
type ProductAgentSessionActivityRecoveryOptions<Item, Page extends ProductAgentSessionActivityPage<Item>> = {
|
|
11
|
+
fetchPage: (sessionId: string, cursor: string | null) => Promise<Page>;
|
|
12
|
+
applyPage: (page: Page) => void | Promise<void>;
|
|
13
|
+
getItemId: (item: Item) => string | null;
|
|
14
|
+
maxPagesPerPoll: number;
|
|
15
|
+
};
|
|
16
|
+
export declare class ProductAgentSessionActivityRecovery<Item, Page extends ProductAgentSessionActivityPage<Item>> {
|
|
17
|
+
private readonly options;
|
|
18
|
+
private checkpoint;
|
|
19
|
+
private continuationCursor;
|
|
20
|
+
constructor(options: ProductAgentSessionActivityRecoveryOptions<Item, Page>);
|
|
21
|
+
reset(checkpoint?: string | null): void;
|
|
22
|
+
getCheckpoint(): string | null;
|
|
23
|
+
getContinuationCursor(): string | null;
|
|
24
|
+
poll(sessionId: string): Promise<ProductAgentSessionActivityRecoveryResult<Page>>;
|
|
25
|
+
apply(result: ProductAgentSessionActivityRecoveryResult<Page>): Promise<void>;
|
|
26
|
+
private pageContainsCheckpoint;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
package/package.json
CHANGED