@attlaz/client 1.133.0 → 1.134.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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Which rule accepted a match without a person: an exact `barcode`, the same `manufacturer_number` under
3
+ * the same brand, or a `score` above the auto-accept threshold. Null on a person's decision and on
4
+ * anything not accepted, so filtering on one value finds every accept that rule made.
5
+ */
6
+ export type MatchDecisionRule = 'barcode' | 'manufacturer_number' | 'score';
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { ApiRecord } from '../../Model/ApiRecord.js';
2
+ import { MatchDecisionRule } from './MatchDecisionRule.js';
2
3
  import { MatchDecisionSource } from './MatchDecisionSource.js';
3
4
  import { ProductMatchStatus } from './ProductMatch.js';
4
5
  /** One side of a match, reduced to what a reviewer needs to judge it. */
@@ -44,6 +45,8 @@ export declare class ReviewMatch {
44
45
  /** Who made the current decision; null only on rows that predate recording it. */
45
46
  decisionSource: MatchDecisionSource | null;
46
47
  decidedAt: Date | null;
48
+ /** Which rule accepted it without a person; null on a person's decision or when not accepted. */
49
+ decisionRule: MatchDecisionRule | null;
47
50
  own: ReviewProduct;
48
51
  competitor: ReviewCompetitorProduct;
49
52
  constructor(matchId: string, own: ReviewProduct, competitor: ReviewCompetitorProduct);
@@ -13,6 +13,8 @@ export class ReviewMatch {
13
13
  /** Who made the current decision; null only on rows that predate recording it. */
14
14
  decisionSource = null;
15
15
  decidedAt = null;
16
+ /** Which rule accepted it without a person; null on a person's decision or when not accepted. */
17
+ decisionRule = null;
16
18
  own;
17
19
  competitor;
18
20
  constructor(matchId, own, competitor) {
@@ -42,6 +44,7 @@ export class ReviewMatch {
42
44
  match.createdAt = raw.created_at ? new Date(raw.created_at) : null;
43
45
  match.decisionSource = raw.decision_source ?? null;
44
46
  match.decidedAt = raw.decided_at ? new Date(raw.decided_at) : null;
47
+ match.decisionRule = raw.decision_rule ?? null;
45
48
  return match;
46
49
  }
47
50
  static parseProduct(raw) {
@@ -1,3 +1,4 @@
1
+ import { MatchDecisionRule } from './MatchDecisionRule.js';
1
2
  import { MatchDecisionSource } from './MatchDecisionSource.js';
2
3
  /** Unknown confidence sorts last in both confidence orders. */
3
4
  export type ReviewMatchOrder = 'newest' | 'confidence_desc' | 'confidence_asc';
@@ -8,6 +9,7 @@ export type ReviewMatchOrder = 'newest' | 'confidence_desc' | 'confidence_asc';
8
9
  export type ReviewMatchFilters = {
9
10
  statuses?: string[];
10
11
  decisionSources?: MatchDecisionSource[];
12
+ decisionRules?: MatchDecisionRule[];
11
13
  competitor?: string;
12
14
  gtin?: string;
13
15
  search?: string;
@@ -27,6 +27,9 @@ export class ProductMatchEndpoint extends Endpoint {
27
27
  if (filters.decisionSources && filters.decisionSources.length > 0) {
28
28
  queryString.set('decision_source', filters.decisionSources.join(','));
29
29
  }
30
+ if (filters.decisionRules && filters.decisionRules.length > 0) {
31
+ queryString.set('decision_rule', filters.decisionRules.join(','));
32
+ }
30
33
  if (filters.order) {
31
34
  queryString.set('order', filters.order);
32
35
  }
package/dist/index.d.ts CHANGED
@@ -116,6 +116,7 @@ export { MatchHistoryBucket } from './MarketPulse/Model/MatchHistoryBucket.js';
116
116
  export { MatchHistoryInterval } from './MarketPulse/Model/MatchHistoryInterval.js';
117
117
  export { ReviewMatchFilters, ReviewMatchOrder } from './MarketPulse/Model/ReviewMatchFilters.js';
118
118
  export { MatchDecisionSource } from './MarketPulse/Model/MatchDecisionSource.js';
119
+ export { MatchDecisionRule } from './MarketPulse/Model/MatchDecisionRule.js';
119
120
  export { ProductMatchEndpoint } from './MarketPulse/Service/ProductMatchEndpoint.js';
120
121
  export { PulseCatalogProductFilterOptions } from './MarketPulse/Model/PulseCatalogProductFilterOptions.js';
121
122
  export { PulseCatalogProductFilters } from './MarketPulse/Model/PulseCatalogProductFilters.js';
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.132.0";
1
+ export declare const VERSION = "1.133.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.132.0";
1
+ export const VERSION = "1.133.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attlaz/client",
3
- "version": "1.133.0",
3
+ "version": "1.134.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",