@wrcb/cb-common 1.0.893 → 1.0.895

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/build/server.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './errors/databaseConnectionError';
10
10
  export * from './errors/notAuthorizedError';
11
11
  export * from './errors/notFoundError';
12
12
  export * from './errors/requestValidationError';
13
+ export * from './errors/tooManyRequestsError';
13
14
  export * from './errors/wrongAppVersionError';
14
15
  export * from './middlewares/apiLimiter';
15
16
  export * from './middlewares/currentUser';
package/build/server.js CHANGED
@@ -26,6 +26,7 @@ __exportStar(require("./errors/databaseConnectionError"), exports);
26
26
  __exportStar(require("./errors/notAuthorizedError"), exports);
27
27
  __exportStar(require("./errors/notFoundError"), exports);
28
28
  __exportStar(require("./errors/requestValidationError"), exports);
29
+ __exportStar(require("./errors/tooManyRequestsError"), exports);
29
30
  __exportStar(require("./errors/wrongAppVersionError"), exports);
30
31
  __exportStar(require("./middlewares/apiLimiter"), exports);
31
32
  __exportStar(require("./middlewares/currentUser"), exports);
@@ -150,3 +150,28 @@ export interface ProfessionalSearchResultDTO {
150
150
  geo: SearchGeoContextDTO;
151
151
  appliedSort: ProfessionalSort;
152
152
  }
153
+ /** Qual campo está sendo melhorado — define tamanho e tom do texto. */
154
+ export declare enum MpAiTextField {
155
+ ProfileHeadline = "profileHeadline",
156
+ ProfileBio = "profileBio",
157
+ ServiceAdTitle = "serviceAdTitle",
158
+ ServiceAdDescription = "serviceAdDescription"
159
+ }
160
+ /** Corpo de POST /api/mercado-profissional/ai/improve-text. */
161
+ export interface MpAiImproveTextRequest {
162
+ field: MpAiTextField;
163
+ /** O que já está no campo. Vazio = a IA escreve a partir do contexto. */
164
+ text?: string;
165
+ /** Área (perfil) ou especialidade (anúncio), para a IA saber do que se trata. */
166
+ categorySlug?: string;
167
+ /**
168
+ * O outro campo do mesmo formulário: a chamada quando se melhora a
169
+ * descrição do perfil, o título quando se melhora o "o que está incluído",
170
+ * e vice-versa.
171
+ */
172
+ context?: string;
173
+ }
174
+ /** Resposta de POST /api/mercado-profissional/ai/improve-text. */
175
+ export interface MpAiImproveTextData {
176
+ text: string;
177
+ }
@@ -6,7 +6,7 @@
6
6
  // contrato entre o backend e o mercado-profissional-frontend.
7
7
  // ---------------------------------------------------------------------------
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.MP_MIN_PROFESSIONALS_PER_CITY_PAGE = exports.MP_TIMEZONE_BY_UF = exports.ProfessionalSort = exports.ServiceAdStatus = exports.ProfessionalStatus = exports.ProfessionalKind = void 0;
9
+ exports.MpAiTextField = exports.MP_MIN_PROFESSIONALS_PER_CITY_PAGE = exports.MP_TIMEZONE_BY_UF = exports.ProfessionalSort = exports.ServiceAdStatus = exports.ProfessionalStatus = exports.ProfessionalKind = void 0;
10
10
  /**
11
11
  * Como o profissional se apresenta ao público. Decide o schema.org do perfil:
12
12
  * `Individual` vira `Person`, `Business` vira `ProfessionalService`.
@@ -86,3 +86,18 @@ exports.MP_TIMEZONE_BY_UF = {
86
86
  * poderia entrar no sitemap e responder `noindex` ao mesmo tempo.
87
87
  */
88
88
  exports.MP_MIN_PROFESSIONALS_PER_CITY_PAGE = 3;
89
+ // ---------------------------------------------------------------------------
90
+ // Assistente de IA do painel — "Melhorar com IA" ao lado de cada campo de
91
+ // texto do perfil e do anúncio.
92
+ //
93
+ // A IA só sugere: nada é salvo pelo backend. O front troca o texto do campo e
94
+ // a pessoa revisa antes de salvar. Sai com poucos emojis, de propósito.
95
+ // ---------------------------------------------------------------------------
96
+ /** Qual campo está sendo melhorado — define tamanho e tom do texto. */
97
+ var MpAiTextField;
98
+ (function (MpAiTextField) {
99
+ MpAiTextField["ProfileHeadline"] = "profileHeadline";
100
+ MpAiTextField["ProfileBio"] = "profileBio";
101
+ MpAiTextField["ServiceAdTitle"] = "serviceAdTitle";
102
+ MpAiTextField["ServiceAdDescription"] = "serviceAdDescription";
103
+ })(MpAiTextField || (exports.MpAiTextField = MpAiTextField = {}));
@@ -206,3 +206,31 @@ export interface ThoAutopostNextData {
206
206
  imageUrl: string;
207
207
  jobUrl: string;
208
208
  }
209
+ export interface ThoAiProfileBioRequest {
210
+ categoryIds?: string[];
211
+ languages?: string[];
212
+ draft?: string;
213
+ }
214
+ export interface ThoAiProfileBioData {
215
+ bio: string;
216
+ }
217
+ export interface ThoAiServiceTextRequest {
218
+ categoryId: string;
219
+ subcategoryId?: string;
220
+ title?: string;
221
+ description?: string;
222
+ }
223
+ export interface ThoAiServiceTextData {
224
+ title: string;
225
+ description: string;
226
+ }
227
+ export interface ThoAiServiceAddonsRequest {
228
+ categoryId?: string;
229
+ subcategoryId?: string;
230
+ title: string;
231
+ description?: string;
232
+ existing?: string[];
233
+ }
234
+ export interface ThoAiServiceAddonsData {
235
+ addons: string[];
236
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.893",
3
+ "version": "1.0.895",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",