@infrab4a/connect-nestjs 1.4.0-beta.6 → 1.5.0

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/index.cjs.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./src\\index";
1
+ export * from "./src/index";
package/index.cjs.js CHANGED
@@ -292,7 +292,6 @@ class ConnectFirestoreService {
292
292
 
293
293
  exports.DiscoveryEngineVertexAdapter = class DiscoveryEngineVertexAdapter {
294
294
  constructor(configuration) {
295
- console.log('CONFIG DiscoveryEngineVertexAdapter', configuration);
296
295
  this.config = configuration;
297
296
  this.parentEngine = `projects/${this.config.projectId}/locations/${this.config.location}/collections/default_collection/engines/${this.config.dataStoreId}`;
298
297
  this.parentDataStore = `projects/${this.config.projectId}/locations/${this.config.location}/collections/default_collection/dataStores/${this.config.dataStoreId}/branches/default_branch/documents`;
@@ -335,12 +334,10 @@ exports.DiscoveryEngineVertexAdapter = class DiscoveryEngineVertexAdapter {
335
334
  return response;
336
335
  }
337
336
  async query(term, total, gender) {
338
- console.log('DiscoveryEngineVertexAdapter Query', term, total, gender);
339
- const defaultFilter = gender ? `gender: ANY(${gender}, "unisex")` : '';
340
337
  const response = (await this.searchClient.search({
341
338
  pageSize: total,
342
339
  query: term,
343
- filter: defaultFilter,
340
+ filter: '',
344
341
  languageCode: 'pt-BR',
345
342
  servingConfig: this.servingConfig,
346
343
  relevanceThreshold: 'MEDIUM',
@@ -398,20 +395,11 @@ exports.DiscoveryEngineVertexAdapter = class DiscoveryEngineVertexAdapter {
398
395
  brand: (_c = result.document) === null || _c === void 0 ? void 0 : _c.structData.fields.brand.stringValue,
399
396
  stock: (_e = (_d = result.document) === null || _d === void 0 ? void 0 : _d.structData.fields.stock) === null || _e === void 0 ? void 0 : _e.numberValue,
400
397
  rating: (_g = (_f = result.document) === null || _f === void 0 ? void 0 : _f.structData.fields.rating) === null || _g === void 0 ? void 0 : _g.stringValue,
401
- // gender: result.document.structData.fields.gender.stringValue,
402
- // createdAt: result.document.structData.fields.createdAt.stringValue,
403
- // description: result.document.structData.fields.gender.stringValue,
404
- // ean: result.document.structData.fields.gender.stringValue,
405
- // fullPrice: result.document.structData.fields.gender.stringValue,
406
- // icon: result.document.structData.fields.gender.stringValue,
407
- // outlet: result.document.structData.fields.gender.stringValue,
408
- // slug: result.document.structData.fields.gender.stringValue,
409
- // price: result.document.structData.fields.gender.stringValue,
410
- // published: result.document.structData.fields.gender.stringValue,
411
- // shoppingCount: result.document.structData.fields.gender.stringValue,
412
- // sku: result.document.structData.fields.gender.stringValue,
413
- // subscriberPrice: result.document.structData.fields.gender.stringValue,
414
- // miniatures: result.document.structData.fields.gender.stringValue,
398
+ gender: result.document.structData.fields.gender.stringValue,
399
+ slug: result.document.structData.fields.slug.stringValue,
400
+ sku: result.document.structData.fields.sku.stringValue,
401
+ ean: result.document.structData.fields.ean.stringValue,
402
+ description: result.document.structData.fields.description.stringValue,
415
403
  };
416
404
  })
417
405
  : [];
package/index.esm.js CHANGED
@@ -288,7 +288,6 @@ class ConnectFirestoreService {
288
288
 
289
289
  let DiscoveryEngineVertexAdapter = class DiscoveryEngineVertexAdapter {
290
290
  constructor(configuration) {
291
- console.log('CONFIG DiscoveryEngineVertexAdapter', configuration);
292
291
  this.config = configuration;
293
292
  this.parentEngine = `projects/${this.config.projectId}/locations/${this.config.location}/collections/default_collection/engines/${this.config.dataStoreId}`;
294
293
  this.parentDataStore = `projects/${this.config.projectId}/locations/${this.config.location}/collections/default_collection/dataStores/${this.config.dataStoreId}/branches/default_branch/documents`;
@@ -331,12 +330,10 @@ let DiscoveryEngineVertexAdapter = class DiscoveryEngineVertexAdapter {
331
330
  return response;
332
331
  }
333
332
  async query(term, total, gender) {
334
- console.log('DiscoveryEngineVertexAdapter Query', term, total, gender);
335
- const defaultFilter = gender ? `gender: ANY(${gender}, "unisex")` : '';
336
333
  const response = (await this.searchClient.search({
337
334
  pageSize: total,
338
335
  query: term,
339
- filter: defaultFilter,
336
+ filter: '',
340
337
  languageCode: 'pt-BR',
341
338
  servingConfig: this.servingConfig,
342
339
  relevanceThreshold: 'MEDIUM',
@@ -394,20 +391,11 @@ let DiscoveryEngineVertexAdapter = class DiscoveryEngineVertexAdapter {
394
391
  brand: (_c = result.document) === null || _c === void 0 ? void 0 : _c.structData.fields.brand.stringValue,
395
392
  stock: (_e = (_d = result.document) === null || _d === void 0 ? void 0 : _d.structData.fields.stock) === null || _e === void 0 ? void 0 : _e.numberValue,
396
393
  rating: (_g = (_f = result.document) === null || _f === void 0 ? void 0 : _f.structData.fields.rating) === null || _g === void 0 ? void 0 : _g.stringValue,
397
- // gender: result.document.structData.fields.gender.stringValue,
398
- // createdAt: result.document.structData.fields.createdAt.stringValue,
399
- // description: result.document.structData.fields.gender.stringValue,
400
- // ean: result.document.structData.fields.gender.stringValue,
401
- // fullPrice: result.document.structData.fields.gender.stringValue,
402
- // icon: result.document.structData.fields.gender.stringValue,
403
- // outlet: result.document.structData.fields.gender.stringValue,
404
- // slug: result.document.structData.fields.gender.stringValue,
405
- // price: result.document.structData.fields.gender.stringValue,
406
- // published: result.document.structData.fields.gender.stringValue,
407
- // shoppingCount: result.document.structData.fields.gender.stringValue,
408
- // sku: result.document.structData.fields.gender.stringValue,
409
- // subscriberPrice: result.document.structData.fields.gender.stringValue,
410
- // miniatures: result.document.structData.fields.gender.stringValue,
394
+ gender: result.document.structData.fields.gender.stringValue,
395
+ slug: result.document.structData.fields.slug.stringValue,
396
+ sku: result.document.structData.fields.sku.stringValue,
397
+ ean: result.document.structData.fields.ean.stringValue,
398
+ description: result.document.structData.fields.description.stringValue,
411
399
  };
412
400
  })
413
401
  : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect-nestjs",
3
- "version": "1.4.0-beta.6",
3
+ "version": "1.5.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/B4AGroup/b4a-firebase-libs"
10
10
  },
11
11
  "peerDependencies": {
12
- "@infrab4a/connect": "4.14.0-beta.4",
12
+ "@infrab4a/connect": "4.15.0",
13
13
  "@nestjs/common": "^10.3.3",
14
14
  "@nestjs/core": "^10.3.3",
15
15
  "firebase-admin": "^12.0.0"