@veltdev/sdk-staging 5.0.2-beta.37 → 5.0.2-beta.38
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
|
@@ -86,6 +86,9 @@ export declare const RecorderEventTypes: {
|
|
|
86
86
|
readonly RECORDING_STOPPED: "recordingStopped";
|
|
87
87
|
readonly RECORDING_DONE_LOCAL: "recordingDoneLocal";
|
|
88
88
|
};
|
|
89
|
+
export declare const RewriterEventTypes: {
|
|
90
|
+
readonly TEXT_SELECTED: "textSelected";
|
|
91
|
+
};
|
|
89
92
|
export declare const CoreEventTypes: {
|
|
90
93
|
readonly PERMISSION_PROVIDER: "permissionProvider";
|
|
91
94
|
readonly USER_RESOLVER: "userResolver";
|
|
@@ -126,6 +129,7 @@ export type CoreEventType = typeof CoreEventTypes[keyof typeof CoreEventTypes];
|
|
|
126
129
|
export type LiveStateSyncEventType = typeof LiveStateSyncEventTypes[keyof typeof LiveStateSyncEventTypes];
|
|
127
130
|
export type PresenceEventType = typeof PresenceEventTypes[keyof typeof PresenceEventTypes];
|
|
128
131
|
export type NotificationEventType = typeof NotificationEventTypes[keyof typeof NotificationEventTypes];
|
|
132
|
+
export type RewriterEventType = typeof RewriterEventTypes[keyof typeof RewriterEventTypes];
|
|
129
133
|
export type CrdtEventType = typeof CrdtEventTypes[keyof typeof CrdtEventTypes];
|
|
130
134
|
export declare enum TagStatus {
|
|
131
135
|
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-staging",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.38",
|
|
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": [
|