@veltdev/sdk-dev 5.0.2-beta.43 → 5.0.2-beta.45
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/app/models/data/rewriter-events.data.model.d.ts +40 -0
- package/app/utils/enums.d.ts +4 -0
- package/models.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +76 -76
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TargetTextRange } from './target-text-range.data.model';
|
|
2
|
+
import { RewriterEventTypes } from '../../utils/enums';
|
|
3
|
+
export interface TextSelectedEvent {
|
|
4
|
+
selectionId: string;
|
|
5
|
+
text: string;
|
|
6
|
+
targetTextRange: TargetTextRange;
|
|
7
|
+
}
|
|
8
|
+
export interface RewriterAskAiRequest {
|
|
9
|
+
model: string;
|
|
10
|
+
prompt: string;
|
|
11
|
+
selectedText: string;
|
|
12
|
+
}
|
|
13
|
+
export interface RewriterReplaceTextRequest {
|
|
14
|
+
text: string;
|
|
15
|
+
event: TextSelectedEvent;
|
|
16
|
+
}
|
|
17
|
+
export interface RewriterAddCommentRequest {
|
|
18
|
+
text: string;
|
|
19
|
+
event: TextSelectedEvent;
|
|
20
|
+
}
|
|
21
|
+
export interface RewriterAskAiResponse {
|
|
22
|
+
text: string;
|
|
23
|
+
success: boolean;
|
|
24
|
+
error?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface RewriterReplaceTextResponse {
|
|
27
|
+
success: boolean;
|
|
28
|
+
originalText: string;
|
|
29
|
+
replacedText: string;
|
|
30
|
+
error?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface RewriterAddCommentResponse {
|
|
33
|
+
success: boolean;
|
|
34
|
+
annotationId?: string;
|
|
35
|
+
commentText?: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
export type RewriterEventTypesMap = {
|
|
39
|
+
[RewriterEventTypes.TEXT_SELECTED]: TextSelectedEvent;
|
|
40
|
+
};
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -88,6 +88,9 @@ export declare const RecorderEventTypes: {
|
|
|
88
88
|
readonly RECORDING_STOPPED: "recordingStopped";
|
|
89
89
|
readonly RECORDING_DONE_LOCAL: "recordingDoneLocal";
|
|
90
90
|
};
|
|
91
|
+
export declare const RewriterEventTypes: {
|
|
92
|
+
readonly TEXT_SELECTED: "textSelected";
|
|
93
|
+
};
|
|
91
94
|
export declare const CoreEventTypes: {
|
|
92
95
|
readonly PERMISSION_PROVIDER: "permissionProvider";
|
|
93
96
|
readonly USER_RESOLVER: "userResolver";
|
|
@@ -128,6 +131,7 @@ export type CoreEventType = typeof CoreEventTypes[keyof typeof CoreEventTypes];
|
|
|
128
131
|
export type LiveStateSyncEventType = typeof LiveStateSyncEventTypes[keyof typeof LiveStateSyncEventTypes];
|
|
129
132
|
export type PresenceEventType = typeof PresenceEventTypes[keyof typeof PresenceEventTypes];
|
|
130
133
|
export type NotificationEventType = typeof NotificationEventTypes[keyof typeof NotificationEventTypes];
|
|
134
|
+
export type RewriterEventType = typeof RewriterEventTypes[keyof typeof RewriterEventTypes];
|
|
131
135
|
export type CrdtEventType = typeof CrdtEventTypes[keyof typeof CrdtEventTypes];
|
|
132
136
|
export declare enum TagStatus {
|
|
133
137
|
ADDED = "added",
|
package/models.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export * from './app/models/data/recorder.model';
|
|
|
49
49
|
export * from './app/models/data/recorder-annotation.data.model';
|
|
50
50
|
export * from './app/models/data/recorder-events.data.model';
|
|
51
51
|
export * from './app/models/data/rewriter-annotation.data.model';
|
|
52
|
+
export * from './app/models/data/rewriter-events.data.model';
|
|
52
53
|
export * from './app/models/data/screen-size.data.model';
|
|
53
54
|
export * from './app/models/data/screenshot.data.model';
|
|
54
55
|
export * from './app/models/data/selection.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk-dev",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.45",
|
|
4
4
|
"description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
|
|
5
5
|
"homepage": "https://velt.dev",
|
|
6
6
|
"keywords": [
|