valtech-components 2.0.595 → 2.0.596
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/esm2022/lib/components/molecules/content-reaction/content-reaction.component.mjs +191 -0
- package/esm2022/lib/components/molecules/content-reaction/types.mjs +2 -0
- package/esm2022/lib/components/molecules/docs-section/docs-section.component.mjs +85 -0
- package/esm2022/lib/components/molecules/docs-section/types.mjs +2 -0
- package/esm2022/lib/components/molecules/feedback-form/feedback-form.component.mjs +354 -0
- package/esm2022/lib/components/molecules/feedback-form/types.mjs +2 -0
- package/esm2022/lib/components/templates/docs-page/docs-page.component.mjs +188 -0
- package/esm2022/lib/components/templates/docs-page/types.mjs +2 -0
- package/esm2022/lib/services/ads/types.mjs +1 -1
- package/esm2022/lib/services/feedback/config.mjs +49 -0
- package/esm2022/lib/services/feedback/feedback.service.mjs +228 -0
- package/esm2022/lib/services/feedback/index.mjs +44 -0
- package/esm2022/lib/services/feedback/types.mjs +30 -0
- package/esm2022/public-api.mjs +10 -5
- package/fesm2022/valtech-components.mjs +1135 -4
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/content-reaction/content-reaction.component.d.ts +57 -0
- package/lib/components/molecules/content-reaction/types.d.ts +61 -0
- package/lib/components/molecules/docs-section/docs-section.component.d.ts +29 -0
- package/lib/components/molecules/docs-section/types.d.ts +27 -0
- package/lib/components/molecules/feedback-form/feedback-form.component.d.ts +58 -0
- package/lib/components/molecules/feedback-form/types.d.ts +54 -0
- package/lib/components/templates/docs-page/docs-page.component.d.ts +54 -0
- package/lib/components/templates/docs-page/types.d.ts +69 -0
- package/lib/services/ads/types.d.ts +10 -0
- package/lib/services/feedback/config.d.ts +35 -0
- package/lib/services/feedback/feedback.service.d.ts +110 -0
- package/lib/services/feedback/index.d.ts +40 -0
- package/lib/services/feedback/types.d.ts +159 -0
- package/package.json +1 -1
- package/public-api.d.ts +9 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuración del servicio de Feedback.
|
|
3
|
+
*/
|
|
4
|
+
export interface ValtechFeedbackConfig {
|
|
5
|
+
/** URL base de la API */
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
/** ID de la aplicación (ej: 'my-valtech-app') */
|
|
8
|
+
appId: string;
|
|
9
|
+
/** Prefijo para endpoints (default: '/v1/feedback') */
|
|
10
|
+
feedbackPrefix?: string;
|
|
11
|
+
/** Número máximo de adjuntos (default: 5) */
|
|
12
|
+
maxAttachments?: number;
|
|
13
|
+
/** Tamaño máximo por archivo en bytes (default: 10MB) */
|
|
14
|
+
maxFileSize?: number;
|
|
15
|
+
/** Tipos de archivo permitidos (default: ['image/*', 'video/*', 'application/pdf']) */
|
|
16
|
+
allowedFileTypes?: string[];
|
|
17
|
+
/** Ruta en Firebase Storage para adjuntos (default: 'feedback') */
|
|
18
|
+
storagePath?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tipos de feedback disponibles.
|
|
22
|
+
*/
|
|
23
|
+
export type FeedbackType = 'issue' | 'poor-content' | 'feedback' | 'suggestion' | 'reaction';
|
|
24
|
+
/**
|
|
25
|
+
* Valor de reacción (para feedback tipo emoji).
|
|
26
|
+
*/
|
|
27
|
+
export type ReactionValue = 'negative' | 'neutral' | 'positive';
|
|
28
|
+
/**
|
|
29
|
+
* Estado de un feedback.
|
|
30
|
+
*/
|
|
31
|
+
export type FeedbackStatus = 'new' | 'reviewed' | 'resolved';
|
|
32
|
+
/**
|
|
33
|
+
* Tipos de contenido para referencia.
|
|
34
|
+
*/
|
|
35
|
+
export type ContentType = 'article' | 'faq' | 'news' | 'page' | 'product' | 'event' | 'other';
|
|
36
|
+
/**
|
|
37
|
+
* Referencia a contenido específico.
|
|
38
|
+
*/
|
|
39
|
+
export interface ContentRef {
|
|
40
|
+
contentId: string;
|
|
41
|
+
contentType: ContentType;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Referencia a entidad (para reactions y feedback de contenido).
|
|
45
|
+
*/
|
|
46
|
+
export interface EntityRef {
|
|
47
|
+
/** Tipo de entidad: 'article', 'docs', 'feature', 'bug', etc. */
|
|
48
|
+
entityType: string;
|
|
49
|
+
/** ID de la entidad */
|
|
50
|
+
entityId: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Contexto del dispositivo del usuario.
|
|
54
|
+
*/
|
|
55
|
+
export interface DeviceContext {
|
|
56
|
+
browser: string;
|
|
57
|
+
os: string;
|
|
58
|
+
viewport: string;
|
|
59
|
+
language: string;
|
|
60
|
+
userAgent: string;
|
|
61
|
+
pageUrl: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Entrada de feedback completa.
|
|
65
|
+
*/
|
|
66
|
+
export interface Feedback {
|
|
67
|
+
feedbackId: string;
|
|
68
|
+
appId: string;
|
|
69
|
+
userId: string;
|
|
70
|
+
type: FeedbackType;
|
|
71
|
+
title: string;
|
|
72
|
+
description: string;
|
|
73
|
+
attachments: string[];
|
|
74
|
+
contentRef?: ContentRef;
|
|
75
|
+
entityRef?: EntityRef;
|
|
76
|
+
reactionValue?: ReactionValue;
|
|
77
|
+
deviceContext: DeviceContext;
|
|
78
|
+
status: FeedbackStatus;
|
|
79
|
+
createdAt: string;
|
|
80
|
+
updatedAt: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Request para crear feedback.
|
|
84
|
+
*/
|
|
85
|
+
export interface CreateFeedbackRequest {
|
|
86
|
+
type: FeedbackType;
|
|
87
|
+
title?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
attachments?: string[];
|
|
90
|
+
contentRef?: ContentRef;
|
|
91
|
+
entityRef?: EntityRef;
|
|
92
|
+
reactionValue?: ReactionValue;
|
|
93
|
+
deviceContext: DeviceContext;
|
|
94
|
+
appId: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Response al crear feedback.
|
|
98
|
+
*/
|
|
99
|
+
export interface CreateFeedbackResponse {
|
|
100
|
+
operationId: string;
|
|
101
|
+
feedbackId: string;
|
|
102
|
+
status: FeedbackStatus;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Response al obtener feedback.
|
|
107
|
+
*/
|
|
108
|
+
export interface GetFeedbackResponse {
|
|
109
|
+
operationId: string;
|
|
110
|
+
feedback: Feedback;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Opciones de tipo de feedback para UI.
|
|
114
|
+
*/
|
|
115
|
+
export interface FeedbackTypeOption {
|
|
116
|
+
value: FeedbackType;
|
|
117
|
+
label: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
icon?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Configuración por defecto de tipos de feedback.
|
|
123
|
+
*/
|
|
124
|
+
export declare const DEFAULT_FEEDBACK_TYPE_OPTIONS: FeedbackTypeOption[];
|
|
125
|
+
/**
|
|
126
|
+
* Response al verificar si existe feedback para una entidad.
|
|
127
|
+
*/
|
|
128
|
+
export interface CheckFeedbackResponse {
|
|
129
|
+
operationId: string;
|
|
130
|
+
hasFeedback: boolean;
|
|
131
|
+
feedbackId?: string;
|
|
132
|
+
type?: FeedbackType;
|
|
133
|
+
reactionValue?: ReactionValue;
|
|
134
|
+
createdAt?: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Request para listar feedback (admin).
|
|
138
|
+
*/
|
|
139
|
+
export interface ListFeedbackRequest {
|
|
140
|
+
appId?: string;
|
|
141
|
+
type?: FeedbackType;
|
|
142
|
+
status?: FeedbackStatus;
|
|
143
|
+
entityType?: string;
|
|
144
|
+
entityId?: string;
|
|
145
|
+
userId?: string;
|
|
146
|
+
dateFrom?: string;
|
|
147
|
+
dateTo?: string;
|
|
148
|
+
limit?: number;
|
|
149
|
+
nextToken?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Response al listar feedback.
|
|
153
|
+
*/
|
|
154
|
+
export interface ListFeedbackResponse {
|
|
155
|
+
operationId: string;
|
|
156
|
+
feedbacks: Feedback[];
|
|
157
|
+
nextToken?: string;
|
|
158
|
+
count: number;
|
|
159
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -235,6 +235,11 @@ export * from './lib/services/skeleton';
|
|
|
235
235
|
export * from './lib/services/pagination';
|
|
236
236
|
export * from './lib/services/ads';
|
|
237
237
|
export * from './lib/components/molecules/ad-slot/ad-slot.component';
|
|
238
|
+
export * from './lib/services/feedback';
|
|
239
|
+
export * from './lib/components/molecules/feedback-form/feedback-form.component';
|
|
240
|
+
export * from './lib/components/molecules/feedback-form/types';
|
|
241
|
+
export * from './lib/components/molecules/content-reaction/content-reaction.component';
|
|
242
|
+
export * from './lib/components/molecules/content-reaction/types';
|
|
238
243
|
export * from './lib/components/templates/docs-layout/docs-layout.component';
|
|
239
244
|
export * from './lib/components/templates/docs-layout/types';
|
|
240
245
|
export * from './lib/components/organisms/docs-sidebar/docs-sidebar.component';
|
|
@@ -252,6 +257,10 @@ export * from './lib/components/molecules/docs-search/types';
|
|
|
252
257
|
export * from './lib/components/molecules/docs-breadcrumb/docs-breadcrumb.component';
|
|
253
258
|
export * from './lib/components/molecules/docs-breadcrumb/types';
|
|
254
259
|
export * from './lib/components/molecules/docs-callout/docs-callout.component';
|
|
260
|
+
export * from './lib/components/molecules/docs-section/docs-section.component';
|
|
261
|
+
export * from './lib/components/molecules/docs-section/types';
|
|
262
|
+
export * from './lib/components/templates/docs-page/docs-page.component';
|
|
263
|
+
export * from './lib/components/templates/docs-page/types';
|
|
255
264
|
export * from './lib/services/docs/docs-navigation.service';
|
|
256
265
|
export * from './lib/components/types';
|
|
257
266
|
export * from './lib/shared/pipes/process-links.pipe';
|