@cargolift-cdi/types 0.1.157 → 0.1.158

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.
@@ -22,24 +22,24 @@ let InboundRepositoryService = class InboundRepositoryService {
22
22
  .andWhere("integration_inbound.entity = :entity", { entity })
23
23
  .andWhere("integration_inbound.active = :active", { active: true })
24
24
  .andWhere(`(
25
- integration_inbound.method = 'all' OR
26
- integration_inbound.method = :method OR
27
- integration_inbound.method LIKE :methodListPrefix OR
28
- integration_inbound.method LIKE :methodListInfix OR
29
- integration_inbound.method LIKE :methodListSuffix
25
+ UPPER(integration_inbound.method) = 'ALL' OR
26
+ UPPER(integration_inbound.method) = :method OR
27
+ UPPER(integration_inbound.method) LIKE :methodListPrefix OR
28
+ UPPER(integration_inbound.method) LIKE :methodListInfix OR
29
+ UPPER(integration_inbound.method) LIKE :methodListSuffix
30
30
  )`, {
31
- method,
32
- methodListPrefix: `${method},%`,
33
- methodListInfix: `%,${method},%`,
34
- methodListSuffix: `%,${method}`,
31
+ method: method.toUpperCase(),
32
+ methodListPrefix: `${method.toUpperCase()},%`,
33
+ methodListInfix: `%,${method.toUpperCase()},%`,
34
+ methodListSuffix: `%,${method.toUpperCase()}`,
35
35
  });
36
36
  const rows = await qb
37
37
  .orderBy(`CASE
38
- WHEN integration_inbound.method = :method THEN 1
39
- WHEN integration_inbound.method LIKE :methodListPrefix OR
40
- integration_inbound.method LIKE :methodListInfix OR
41
- integration_inbound.method LIKE :methodListSuffix THEN 2
42
- WHEN integration_inbound.method = 'all' THEN 3
38
+ WHEN UPPER(integration_inbound.method) = :method THEN 1
39
+ WHEN UPPER(integration_inbound.method) LIKE :methodListPrefix OR
40
+ UPPER(integration_inbound.method) LIKE :methodListInfix OR
41
+ UPPER(integration_inbound.method) LIKE :methodListSuffix THEN 2
42
+ WHEN UPPER(integration_inbound.method) = 'ALL' THEN 3
43
43
  ELSE 4
44
44
  END`, "ASC")
45
45
  .addOrderBy("integration_inbound.agent", "ASC")
@@ -48,7 +48,7 @@ let InboundRepositoryService = class InboundRepositoryService {
48
48
  .getMany();
49
49
  const resultMap = new Map();
50
50
  for (const row of rows) {
51
- const key = `${row.agent}::${row.entity}::${row.method}`;
51
+ const key = `${row.agent}::${row.entity}::${row.method.toUpperCase()}`;
52
52
  if (!resultMap.has(key)) {
53
53
  resultMap.set(key, row);
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/types",
3
- "version": "0.1.157",
3
+ "version": "0.1.158",
4
4
  "description": "TypeScript types e interfaces comuns para projetos Cargolift CDI",
5
5
  "keywords": [
6
6
  "typescript",