@confidencesystemsinc/sdk 1.5.3 → 1.5.5

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.
Files changed (52) hide show
  1. package/dist/SelfShadowComponent.d.ts +5 -2
  2. package/dist/components/comments/CommentBoxRoot.d.ts +1 -0
  3. package/dist/components/comments/CommentContainer.d.ts +13 -0
  4. package/dist/components/comments/CommentContextMenu.d.ts +9 -0
  5. package/dist/components/comments/CommentEditor/CommentEditor.d.ts +18 -0
  6. package/dist/components/comments/CommentEditor/CommentFileThumbnail.d.ts +7 -0
  7. package/dist/components/comments/CommentEditor/CommentImageThumbnail.d.ts +5 -0
  8. package/dist/components/comments/CommentEditor/CommentToolbar.d.ts +9 -0
  9. package/dist/components/comments/CommentEditor/FloatingLinkEditorPlugin.d.ts +6 -0
  10. package/dist/components/comments/CommentEditor/theme.d.ts +15 -0
  11. package/dist/components/comments/CommentFilePreview.d.ts +4 -0
  12. package/dist/components/comments/CommentImagePreview.d.ts +6 -0
  13. package/dist/components/comments/ConfidenceCommentBox.d.ts +49 -0
  14. package/dist/components/playbook/{playbook-header.d.ts → PlaybookHeader.d.ts} +1 -1
  15. package/dist/components/task/CommentButton.d.ts +7 -0
  16. package/dist/components/task/{confidence-task.d.ts → ConfidenceTask.d.ts} +3 -2
  17. package/dist/components/task/{task-dropdown-badge.d.ts → TaskDropdownBadge.d.ts} +5 -2
  18. package/dist/components/ui/avatar.d.ts +5 -0
  19. package/dist/components/ui/context-menu.d.ts +10 -0
  20. package/dist/components/ui/input.d.ts +2 -1
  21. package/dist/components/ui/modal.d.ts +2 -2
  22. package/dist/context/comment-context.d.ts +18 -0
  23. package/dist/context/confidence-context.d.ts +5 -1
  24. package/dist/empty.png +0 -0
  25. package/dist/hooks/comments/useComments.d.ts +178 -0
  26. package/dist/hooks/comments/useManageComment.d.ts +408 -0
  27. package/dist/hooks/task/useTaskDetails.d.ts +6 -0
  28. package/dist/hooks/useTaskButtons.d.ts +1 -0
  29. package/dist/index.cjs +94 -66
  30. package/dist/index.css +1 -0
  31. package/dist/index.js +23081 -10845
  32. package/dist/profile-ghost.jpg +0 -0
  33. package/dist/services/get-comments.service.d.ts +4 -0
  34. package/dist/services/manage-comment.service.d.ts +19 -0
  35. package/dist/services/upload-attachment.service.d.ts +6 -0
  36. package/dist/stories/{confidence-task.stories.d.ts → ConfidenceTask.stories.d.ts} +3 -0
  37. package/dist/stories/modal.stories.d.ts +1 -1
  38. package/dist/theme.css +1 -1
  39. package/dist/types/comments.types.d.ts +38 -0
  40. package/dist/types/task.types.d.ts +5 -0
  41. package/dist/utils/asset.d.ts +23 -0
  42. package/dist/utils/editor.d.ts +1 -0
  43. package/dist/utils/encode.d.ts +2 -0
  44. package/dist/utils/url.d.ts +2 -0
  45. package/package.json +13 -2
  46. /package/dist/components/playbook/{confidence-playbook.d.ts → ConfidencePlaybook.d.ts} +0 -0
  47. /package/dist/components/task/{task-buttons.d.ts → TaskButtons.d.ts} +0 -0
  48. /package/dist/components/task/{task-expanded-content.d.ts → TaskExpandedContent.d.ts} +0 -0
  49. /package/dist/components/task/{task-left-panel.d.ts → TaskLeftPanel.d.ts} +0 -0
  50. /package/dist/components/task/{task-status-badge.d.ts → TaskStatusBadge.d.ts} +0 -0
  51. /package/dist/stories/{confidence-playbook-button.stories.d.ts → ConfidencePlaybookButton.stories.d.ts} +0 -0
  52. /package/dist/stories/{initiate-playbook-modal.stories.d.ts → InitiatePlaybookModal.stories.d.ts} +0 -0
@@ -0,0 +1,408 @@
1
+ import { Asset, CommentType } from '../../types/comments.types';
2
+ export declare const useManageComment: ({ playbookInstanceId, }: {
3
+ playbookInstanceId: string | number;
4
+ }) => {
5
+ data: undefined;
6
+ variables: undefined;
7
+ error: null;
8
+ isError: false;
9
+ isIdle: true;
10
+ isPending: false;
11
+ isSuccess: false;
12
+ status: "idle";
13
+ mutate: import('@tanstack/react-query').UseMutateFunction<{
14
+ commentId: number;
15
+ commentType: CommentType;
16
+ user: string;
17
+ comment: string;
18
+ hasAssets: boolean;
19
+ createdDate?: string;
20
+ }, Error, {
21
+ username: string;
22
+ taskVerified: boolean;
23
+ action?: "delete" | "add" | "edit";
24
+ taskInstanceId: number;
25
+ timezone?: string;
26
+ commentId?: number | string;
27
+ comment?: string;
28
+ commentType?: CommentType;
29
+ hasAssets?: boolean;
30
+ attachments?: Asset[];
31
+ }, {
32
+ previousComments: unknown;
33
+ taskInstanceId: number;
34
+ }>;
35
+ reset: () => void;
36
+ context: {
37
+ previousComments: unknown;
38
+ taskInstanceId: number;
39
+ } | undefined;
40
+ failureCount: number;
41
+ failureReason: Error | null;
42
+ isPaused: boolean;
43
+ submittedAt: number;
44
+ mutateAsync: import('@tanstack/react-query').UseMutateAsyncFunction<{
45
+ commentId: number;
46
+ commentType: CommentType;
47
+ user: string;
48
+ comment: string;
49
+ hasAssets: boolean;
50
+ createdDate?: string;
51
+ }, Error, {
52
+ username: string;
53
+ taskVerified: boolean;
54
+ action?: "delete" | "add" | "edit";
55
+ taskInstanceId: number;
56
+ timezone?: string;
57
+ commentId?: number | string;
58
+ comment?: string;
59
+ commentType?: CommentType;
60
+ hasAssets?: boolean;
61
+ attachments?: Asset[];
62
+ }, {
63
+ previousComments: unknown;
64
+ taskInstanceId: number;
65
+ }>;
66
+ manageComment: (payload: Parameters<import('@tanstack/react-query').UseMutateAsyncFunction<{
67
+ commentId: number;
68
+ commentType: CommentType;
69
+ user: string;
70
+ comment: string;
71
+ hasAssets: boolean;
72
+ createdDate?: string;
73
+ }, Error, {
74
+ username: string;
75
+ taskVerified: boolean;
76
+ action?: "delete" | "add" | "edit";
77
+ taskInstanceId: number;
78
+ timezone?: string;
79
+ commentId?: number | string;
80
+ comment?: string;
81
+ commentType?: CommentType;
82
+ hasAssets?: boolean;
83
+ attachments?: Asset[];
84
+ }, {
85
+ previousComments: unknown;
86
+ taskInstanceId: number;
87
+ }>>[0]) => Promise<{
88
+ commentId: number;
89
+ commentType: CommentType;
90
+ user: string;
91
+ comment: string;
92
+ hasAssets: boolean;
93
+ createdDate?: string;
94
+ }>;
95
+ } | {
96
+ data: undefined;
97
+ variables: {
98
+ username: string;
99
+ taskVerified: boolean;
100
+ action?: "delete" | "add" | "edit";
101
+ taskInstanceId: number;
102
+ timezone?: string;
103
+ commentId?: number | string;
104
+ comment?: string;
105
+ commentType?: CommentType;
106
+ hasAssets?: boolean;
107
+ attachments?: Asset[];
108
+ };
109
+ error: null;
110
+ isError: false;
111
+ isIdle: false;
112
+ isPending: true;
113
+ isSuccess: false;
114
+ status: "pending";
115
+ mutate: import('@tanstack/react-query').UseMutateFunction<{
116
+ commentId: number;
117
+ commentType: CommentType;
118
+ user: string;
119
+ comment: string;
120
+ hasAssets: boolean;
121
+ createdDate?: string;
122
+ }, Error, {
123
+ username: string;
124
+ taskVerified: boolean;
125
+ action?: "delete" | "add" | "edit";
126
+ taskInstanceId: number;
127
+ timezone?: string;
128
+ commentId?: number | string;
129
+ comment?: string;
130
+ commentType?: CommentType;
131
+ hasAssets?: boolean;
132
+ attachments?: Asset[];
133
+ }, {
134
+ previousComments: unknown;
135
+ taskInstanceId: number;
136
+ }>;
137
+ reset: () => void;
138
+ context: {
139
+ previousComments: unknown;
140
+ taskInstanceId: number;
141
+ } | undefined;
142
+ failureCount: number;
143
+ failureReason: Error | null;
144
+ isPaused: boolean;
145
+ submittedAt: number;
146
+ mutateAsync: import('@tanstack/react-query').UseMutateAsyncFunction<{
147
+ commentId: number;
148
+ commentType: CommentType;
149
+ user: string;
150
+ comment: string;
151
+ hasAssets: boolean;
152
+ createdDate?: string;
153
+ }, Error, {
154
+ username: string;
155
+ taskVerified: boolean;
156
+ action?: "delete" | "add" | "edit";
157
+ taskInstanceId: number;
158
+ timezone?: string;
159
+ commentId?: number | string;
160
+ comment?: string;
161
+ commentType?: CommentType;
162
+ hasAssets?: boolean;
163
+ attachments?: Asset[];
164
+ }, {
165
+ previousComments: unknown;
166
+ taskInstanceId: number;
167
+ }>;
168
+ manageComment: (payload: Parameters<import('@tanstack/react-query').UseMutateAsyncFunction<{
169
+ commentId: number;
170
+ commentType: CommentType;
171
+ user: string;
172
+ comment: string;
173
+ hasAssets: boolean;
174
+ createdDate?: string;
175
+ }, Error, {
176
+ username: string;
177
+ taskVerified: boolean;
178
+ action?: "delete" | "add" | "edit";
179
+ taskInstanceId: number;
180
+ timezone?: string;
181
+ commentId?: number | string;
182
+ comment?: string;
183
+ commentType?: CommentType;
184
+ hasAssets?: boolean;
185
+ attachments?: Asset[];
186
+ }, {
187
+ previousComments: unknown;
188
+ taskInstanceId: number;
189
+ }>>[0]) => Promise<{
190
+ commentId: number;
191
+ commentType: CommentType;
192
+ user: string;
193
+ comment: string;
194
+ hasAssets: boolean;
195
+ createdDate?: string;
196
+ }>;
197
+ } | {
198
+ data: undefined;
199
+ error: Error;
200
+ variables: {
201
+ username: string;
202
+ taskVerified: boolean;
203
+ action?: "delete" | "add" | "edit";
204
+ taskInstanceId: number;
205
+ timezone?: string;
206
+ commentId?: number | string;
207
+ comment?: string;
208
+ commentType?: CommentType;
209
+ hasAssets?: boolean;
210
+ attachments?: Asset[];
211
+ };
212
+ isError: true;
213
+ isIdle: false;
214
+ isPending: false;
215
+ isSuccess: false;
216
+ status: "error";
217
+ mutate: import('@tanstack/react-query').UseMutateFunction<{
218
+ commentId: number;
219
+ commentType: CommentType;
220
+ user: string;
221
+ comment: string;
222
+ hasAssets: boolean;
223
+ createdDate?: string;
224
+ }, Error, {
225
+ username: string;
226
+ taskVerified: boolean;
227
+ action?: "delete" | "add" | "edit";
228
+ taskInstanceId: number;
229
+ timezone?: string;
230
+ commentId?: number | string;
231
+ comment?: string;
232
+ commentType?: CommentType;
233
+ hasAssets?: boolean;
234
+ attachments?: Asset[];
235
+ }, {
236
+ previousComments: unknown;
237
+ taskInstanceId: number;
238
+ }>;
239
+ reset: () => void;
240
+ context: {
241
+ previousComments: unknown;
242
+ taskInstanceId: number;
243
+ } | undefined;
244
+ failureCount: number;
245
+ failureReason: Error | null;
246
+ isPaused: boolean;
247
+ submittedAt: number;
248
+ mutateAsync: import('@tanstack/react-query').UseMutateAsyncFunction<{
249
+ commentId: number;
250
+ commentType: CommentType;
251
+ user: string;
252
+ comment: string;
253
+ hasAssets: boolean;
254
+ createdDate?: string;
255
+ }, Error, {
256
+ username: string;
257
+ taskVerified: boolean;
258
+ action?: "delete" | "add" | "edit";
259
+ taskInstanceId: number;
260
+ timezone?: string;
261
+ commentId?: number | string;
262
+ comment?: string;
263
+ commentType?: CommentType;
264
+ hasAssets?: boolean;
265
+ attachments?: Asset[];
266
+ }, {
267
+ previousComments: unknown;
268
+ taskInstanceId: number;
269
+ }>;
270
+ manageComment: (payload: Parameters<import('@tanstack/react-query').UseMutateAsyncFunction<{
271
+ commentId: number;
272
+ commentType: CommentType;
273
+ user: string;
274
+ comment: string;
275
+ hasAssets: boolean;
276
+ createdDate?: string;
277
+ }, Error, {
278
+ username: string;
279
+ taskVerified: boolean;
280
+ action?: "delete" | "add" | "edit";
281
+ taskInstanceId: number;
282
+ timezone?: string;
283
+ commentId?: number | string;
284
+ comment?: string;
285
+ commentType?: CommentType;
286
+ hasAssets?: boolean;
287
+ attachments?: Asset[];
288
+ }, {
289
+ previousComments: unknown;
290
+ taskInstanceId: number;
291
+ }>>[0]) => Promise<{
292
+ commentId: number;
293
+ commentType: CommentType;
294
+ user: string;
295
+ comment: string;
296
+ hasAssets: boolean;
297
+ createdDate?: string;
298
+ }>;
299
+ } | {
300
+ data: {
301
+ commentId: number;
302
+ commentType: CommentType;
303
+ user: string;
304
+ comment: string;
305
+ hasAssets: boolean;
306
+ createdDate?: string;
307
+ };
308
+ error: null;
309
+ variables: {
310
+ username: string;
311
+ taskVerified: boolean;
312
+ action?: "delete" | "add" | "edit";
313
+ taskInstanceId: number;
314
+ timezone?: string;
315
+ commentId?: number | string;
316
+ comment?: string;
317
+ commentType?: CommentType;
318
+ hasAssets?: boolean;
319
+ attachments?: Asset[];
320
+ };
321
+ isError: false;
322
+ isIdle: false;
323
+ isPending: false;
324
+ isSuccess: true;
325
+ status: "success";
326
+ mutate: import('@tanstack/react-query').UseMutateFunction<{
327
+ commentId: number;
328
+ commentType: CommentType;
329
+ user: string;
330
+ comment: string;
331
+ hasAssets: boolean;
332
+ createdDate?: string;
333
+ }, Error, {
334
+ username: string;
335
+ taskVerified: boolean;
336
+ action?: "delete" | "add" | "edit";
337
+ taskInstanceId: number;
338
+ timezone?: string;
339
+ commentId?: number | string;
340
+ comment?: string;
341
+ commentType?: CommentType;
342
+ hasAssets?: boolean;
343
+ attachments?: Asset[];
344
+ }, {
345
+ previousComments: unknown;
346
+ taskInstanceId: number;
347
+ }>;
348
+ reset: () => void;
349
+ context: {
350
+ previousComments: unknown;
351
+ taskInstanceId: number;
352
+ } | undefined;
353
+ failureCount: number;
354
+ failureReason: Error | null;
355
+ isPaused: boolean;
356
+ submittedAt: number;
357
+ mutateAsync: import('@tanstack/react-query').UseMutateAsyncFunction<{
358
+ commentId: number;
359
+ commentType: CommentType;
360
+ user: string;
361
+ comment: string;
362
+ hasAssets: boolean;
363
+ createdDate?: string;
364
+ }, Error, {
365
+ username: string;
366
+ taskVerified: boolean;
367
+ action?: "delete" | "add" | "edit";
368
+ taskInstanceId: number;
369
+ timezone?: string;
370
+ commentId?: number | string;
371
+ comment?: string;
372
+ commentType?: CommentType;
373
+ hasAssets?: boolean;
374
+ attachments?: Asset[];
375
+ }, {
376
+ previousComments: unknown;
377
+ taskInstanceId: number;
378
+ }>;
379
+ manageComment: (payload: Parameters<import('@tanstack/react-query').UseMutateAsyncFunction<{
380
+ commentId: number;
381
+ commentType: CommentType;
382
+ user: string;
383
+ comment: string;
384
+ hasAssets: boolean;
385
+ createdDate?: string;
386
+ }, Error, {
387
+ username: string;
388
+ taskVerified: boolean;
389
+ action?: "delete" | "add" | "edit";
390
+ taskInstanceId: number;
391
+ timezone?: string;
392
+ commentId?: number | string;
393
+ comment?: string;
394
+ commentType?: CommentType;
395
+ hasAssets?: boolean;
396
+ attachments?: Asset[];
397
+ }, {
398
+ previousComments: unknown;
399
+ taskInstanceId: number;
400
+ }>>[0]) => Promise<{
401
+ commentId: number;
402
+ commentType: CommentType;
403
+ user: string;
404
+ comment: string;
405
+ hasAssets: boolean;
406
+ createdDate?: string;
407
+ }>;
408
+ };
@@ -25,6 +25,7 @@ export declare const useTaskDetails: ({ taskId, playbookId, enabled, }: {
25
25
  isPaused: boolean;
26
26
  isRefetching: boolean;
27
27
  isStale: boolean;
28
+ isEnabled: boolean;
28
29
  refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<any, Error>>;
29
30
  fetchStatus: import('@tanstack/react-query').FetchStatus;
30
31
  promise: Promise<any>;
@@ -53,6 +54,7 @@ export declare const useTaskDetails: ({ taskId, playbookId, enabled, }: {
53
54
  isPaused: boolean;
54
55
  isRefetching: boolean;
55
56
  isStale: boolean;
57
+ isEnabled: boolean;
56
58
  refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<any, Error>>;
57
59
  fetchStatus: import('@tanstack/react-query').FetchStatus;
58
60
  promise: Promise<any>;
@@ -81,6 +83,7 @@ export declare const useTaskDetails: ({ taskId, playbookId, enabled, }: {
81
83
  isPaused: boolean;
82
84
  isRefetching: boolean;
83
85
  isStale: boolean;
86
+ isEnabled: boolean;
84
87
  refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<any, Error>>;
85
88
  fetchStatus: import('@tanstack/react-query').FetchStatus;
86
89
  promise: Promise<any>;
@@ -109,6 +112,7 @@ export declare const useTaskDetails: ({ taskId, playbookId, enabled, }: {
109
112
  isPaused: boolean;
110
113
  isRefetching: boolean;
111
114
  isStale: boolean;
115
+ isEnabled: boolean;
112
116
  refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<any, Error>>;
113
117
  fetchStatus: import('@tanstack/react-query').FetchStatus;
114
118
  promise: Promise<any>;
@@ -137,6 +141,7 @@ export declare const useTaskDetails: ({ taskId, playbookId, enabled, }: {
137
141
  isPaused: boolean;
138
142
  isRefetching: boolean;
139
143
  isStale: boolean;
144
+ isEnabled: boolean;
140
145
  refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<any, Error>>;
141
146
  fetchStatus: import('@tanstack/react-query').FetchStatus;
142
147
  promise: Promise<any>;
@@ -165,6 +170,7 @@ export declare const useTaskDetails: ({ taskId, playbookId, enabled, }: {
165
170
  isPaused: boolean;
166
171
  isRefetching: boolean;
167
172
  isStale: boolean;
173
+ isEnabled: boolean;
168
174
  refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<any, Error>>;
169
175
  fetchStatus: import('@tanstack/react-query').FetchStatus;
170
176
  promise: Promise<any>;
@@ -5,6 +5,7 @@ export declare const TASK_BUTTONS: {
5
5
  readonly RESUME: "RESUME";
6
6
  readonly COMPLETE: "COMPLETE";
7
7
  readonly EXPAND: "EXPAND";
8
+ readonly ADD_COMMENT: "ADD_COMMENT";
8
9
  };
9
10
  export declare const TASK_BUTTONS_DISPLAY_TEXT: {
10
11
  [key in TaskButton]?: string;