digicust_types 1.7.155 → 1.7.156

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.
@@ -1,7 +1,7 @@
1
1
  import { AddressModel } from "./address.model";
2
2
  import { PersonModel } from "./person.model";
3
3
  import { Meta } from "./meta";
4
- import { MatchingMetadataModel, StakeholderMatchingMethod } from "../digicust/masterdata";
4
+ import { MatchingMetadataModel, StakeholderMatchInput, StakeholderMatchResult } from "../digicust/masterdata";
5
5
  /**
6
6
  * Identifies a company
7
7
  */
@@ -18,5 +18,5 @@ export interface CompanyModel extends Meta<string> {
18
18
  securityNumber?: Meta<string>;
19
19
  externalIdentifier?: Meta<string>;
20
20
  stakeholderId?: string;
21
- matchingMetadata?: MatchingMetadataModel<StakeholderMatchingMethod>;
21
+ matchingMetadata?: MatchingMetadataModel<StakeholderMatchInput, StakeholderMatchResult>;
22
22
  }
@@ -4,4 +4,7 @@ export * from "./stakeholder-role.enum";
4
4
  export * from "./user-edited-properties.type";
5
5
  export * from "./matching-metadata.model";
6
6
  export * from "./string-scoring-algorithm-type.enum";
7
- export * from "./stakeholder-matching-method.enum";
7
+ export * from "./material-match-input";
8
+ export * from "./material-match-result";
9
+ export * from "./stakeholder-match-input";
10
+ export * from "./stakeholder-match-result";
@@ -16,4 +16,7 @@ __exportStar(require("./stakeholder-role.enum"), exports);
16
16
  __exportStar(require("./user-edited-properties.type"), exports);
17
17
  __exportStar(require("./matching-metadata.model"), exports);
18
18
  __exportStar(require("./string-scoring-algorithm-type.enum"), exports);
19
- __exportStar(require("./stakeholder-matching-method.enum"), exports);
19
+ __exportStar(require("./material-match-input"), exports);
20
+ __exportStar(require("./material-match-result"), exports);
21
+ __exportStar(require("./stakeholder-match-input"), exports);
22
+ __exportStar(require("./stakeholder-match-result"), exports);
@@ -1,12 +1,10 @@
1
1
  import { StringScoringAlgorithmType } from './string-scoring-algorithm-type.enum';
2
- export interface MatchingMetadataModel<T> {
3
- input: {
4
- [key: string]: string;
5
- };
6
- scoringAlgorithm: string;
2
+ export interface MatchingMetadataModel<T, S> {
3
+ input: T;
4
+ usedMatcher: string;
7
5
  matchScore: number;
8
- matchedMethodFlags: T;
9
- detailMatches?: {
6
+ matchResult: S;
7
+ stringScoring?: {
10
8
  [key: string]: {
11
9
  scoringAlgorithm: StringScoringAlgorithmType;
12
10
  matchScore: number;
@@ -0,0 +1,8 @@
1
+ export interface MaterialMatchInput {
2
+ materialNumber?: string;
3
+ code?: string;
4
+ buyerArticleNumber?: string;
5
+ buyerOrderNumber?: string;
6
+ reference?: string;
7
+ shipperId?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface MaterialMatchResult {
2
+ matchesCode: boolean;
3
+ matchesCodeUserEdited: boolean;
4
+ matchesMaterialNumber: boolean;
5
+ matchesMaterialNumberUserEdited: boolean;
6
+ matchesBuyerOrderNumberUserEdited: boolean;
7
+ matchesBuyerArticleNumber: boolean;
8
+ matchesBuyerArticleNumberUserEdited: boolean;
9
+ matchesShipper: boolean;
10
+ hasAnyUserEditedProperties: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface StakeholderMatchInput {
2
+ name?: string;
3
+ EORI?: string;
4
+ VAT?: string;
5
+ country?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface StakeholderMatchResult {
2
+ matchesEORI: boolean;
3
+ matchesVAT: boolean;
4
+ matchesName: boolean;
5
+ matchesCountry: boolean;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  export declare enum StringScoringAlgorithmType {
2
2
  Exact = "exact",
3
+ Normalized = "normalized",
3
4
  JaroWrinkler = "jaro-wrinkler",
4
5
  CosineSimilarity = "cosine-similarity"
5
6
  }
@@ -4,6 +4,7 @@ exports.StringScoringAlgorithmType = void 0;
4
4
  var StringScoringAlgorithmType;
5
5
  (function (StringScoringAlgorithmType) {
6
6
  StringScoringAlgorithmType["Exact"] = "exact";
7
+ StringScoringAlgorithmType["Normalized"] = "normalized";
7
8
  StringScoringAlgorithmType["JaroWrinkler"] = "jaro-wrinkler";
8
9
  StringScoringAlgorithmType["CosineSimilarity"] = "cosine-similarity";
9
10
  })(StringScoringAlgorithmType = exports.StringScoringAlgorithmType || (exports.StringScoringAlgorithmType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digicust_types",
3
- "version": "1.7.155",
3
+ "version": "1.7.156",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",