@alanszp/integrations-common 7.8.3

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/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ node_modules
2
+ *.log
3
+ dist
package/.npmignore ADDED
@@ -0,0 +1,3 @@
1
+ node_modules
2
+ src
3
+ *.log
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Alan Szpigiel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,27 @@
1
+ import { IntegrationResultStatus, CommunicationIntegrationStatus, IntegrationResultError } from "./types";
2
+ export interface ChangesStatus {
3
+ updated: string[];
4
+ created: string[];
5
+ errors: IntegrationResultError[];
6
+ }
7
+ export declare class IntegrationExecutionResult {
8
+ private totals;
9
+ private details;
10
+ private integrationId;
11
+ private organizationReference;
12
+ private status;
13
+ private executedBy;
14
+ private context?;
15
+ constructor(integrationId: string, organizationReference: string, executedBy?: string);
16
+ setResults(changes: ChangesStatus): void;
17
+ setContext(context: Record<string, unknown>): void;
18
+ getContext(): Record<string, unknown> | undefined;
19
+ getIntegrationId(): string;
20
+ getOrganizationReference(): string;
21
+ setStatus(status: CommunicationIntegrationStatus): void;
22
+ getStatus(): CommunicationIntegrationStatus;
23
+ getExecutedBy(): string | undefined;
24
+ getResults(): IntegrationResultStatus;
25
+ private setTotals;
26
+ private setDetails;
27
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegrationExecutionResult = void 0;
4
+ const lodash_1 = require("lodash");
5
+ class IntegrationExecutionResult {
6
+ constructor(integrationId, organizationReference, executedBy) {
7
+ this.totals = { added: 0, removed: 0, updated: 0, error: 0 };
8
+ this.details = {
9
+ added: [],
10
+ removed: [],
11
+ updated: [],
12
+ error: [],
13
+ };
14
+ this.integrationId = integrationId;
15
+ this.organizationReference = organizationReference;
16
+ this.executedBy = executedBy;
17
+ }
18
+ setResults(changes) {
19
+ this.setTotals({
20
+ updated: changes.updated.length,
21
+ added: changes.created.length,
22
+ error: changes.errors.length,
23
+ });
24
+ this.setDetails({
25
+ updated: changes.updated,
26
+ added: changes.created,
27
+ error: changes.errors,
28
+ });
29
+ }
30
+ setContext(context) {
31
+ this.context = context;
32
+ }
33
+ getContext() {
34
+ return this.context;
35
+ }
36
+ getIntegrationId() {
37
+ return this.integrationId;
38
+ }
39
+ getOrganizationReference() {
40
+ return this.organizationReference;
41
+ }
42
+ setStatus(status) {
43
+ this.status = status;
44
+ }
45
+ getStatus() {
46
+ return this.status;
47
+ }
48
+ getExecutedBy() {
49
+ return this.executedBy;
50
+ }
51
+ getResults() {
52
+ return {
53
+ totals: this.totals,
54
+ details: this.details,
55
+ };
56
+ }
57
+ setTotals(totals) {
58
+ this.totals = (0, lodash_1.merge)(this.totals, totals);
59
+ }
60
+ setDetails(details) {
61
+ this.details = (0, lodash_1.merge)(this.details, details);
62
+ }
63
+ }
64
+ exports.IntegrationExecutionResult = IntegrationExecutionResult;
65
+ //# sourceMappingURL=IntegrationExecutionResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationExecutionResult.js","sourceRoot":"","sources":["../src/IntegrationExecutionResult.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAgB/B,MAAa,0BAA0B;IAoBrC,YACE,aAAqB,EACrB,qBAA6B,EAC7B,UAAmB;QAtBb,WAAM,GAAiB,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAEtE,YAAO,GAAkB;YAC/B,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;SACV,CAAC;QAiBA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEM,UAAU,CAAC,OAAsB;QACtC,IAAI,CAAC,SAAS,CAAC;YACb,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;YAC/B,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;YAC7B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;SAC7B,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,CAAC;YACd,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,OAAO,CAAC,OAAO;YACtB,KAAK,EAAE,OAAO,CAAC,MAAM;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,UAAU,CAAC,OAAgC;QAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEM,gBAAgB;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAEM,wBAAwB;QAC7B,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;IAEM,SAAS,CAAC,MAAsC;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEM,aAAa;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAEM,UAAU;QACf,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;IAEO,SAAS,CAAC,MAA6B;QAC7C,IAAI,CAAC,MAAM,GAAG,IAAA,cAAK,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEO,UAAU,CAAC,OAA+B;QAChD,IAAI,CAAC,OAAO,GAAG,IAAA,cAAK,EAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF;AAtFD,gEAsFC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const types_1 = require("./types");
4
+ const IntegrationExecutionResult_1 = require("./IntegrationExecutionResult");
5
+ const MOCK_INTEGRATION_ID = "1";
6
+ const MOCK_ORGANIZATION_REFERENCE = "test";
7
+ const MOCK_EXECUTED_BY = "1";
8
+ describe("IntegrationHistory", () => {
9
+ describe("setResults", () => {
10
+ it("should return value with default values", () => {
11
+ const i = new IntegrationExecutionResult_1.IntegrationExecutionResult(MOCK_INTEGRATION_ID, MOCK_ORGANIZATION_REFERENCE, MOCK_EXECUTED_BY);
12
+ const pc = {
13
+ created: ["1"],
14
+ updated: ["1"],
15
+ errors: [
16
+ {
17
+ type: types_1.SyncError.MISSING_FIELDS,
18
+ userReference: "1",
19
+ metadata: ["missingFieldName"],
20
+ },
21
+ ],
22
+ };
23
+ i.setResults(pc);
24
+ expect(i.getResults()).toStrictEqual({
25
+ totals: { added: 1, removed: 0, updated: 1, error: 1 },
26
+ details: {
27
+ added: ["1"],
28
+ removed: [],
29
+ updated: ["1"],
30
+ error: [
31
+ {
32
+ type: types_1.SyncError.MISSING_FIELDS,
33
+ userReference: "1",
34
+ metadata: ["missingFieldName"],
35
+ },
36
+ ],
37
+ },
38
+ });
39
+ });
40
+ });
41
+ describe("getters", () => {
42
+ it("should return correct values", () => {
43
+ const i = new IntegrationExecutionResult_1.IntegrationExecutionResult(MOCK_INTEGRATION_ID, MOCK_ORGANIZATION_REFERENCE, MOCK_EXECUTED_BY);
44
+ expect(i.getExecutedBy()).toStrictEqual(MOCK_EXECUTED_BY);
45
+ expect(i.getOrganizationReference()).toStrictEqual(MOCK_ORGANIZATION_REFERENCE);
46
+ expect(i.getExecutedBy()).toStrictEqual(MOCK_EXECUTED_BY);
47
+ });
48
+ });
49
+ });
50
+ //# sourceMappingURL=IntegrationExecutionResult.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationExecutionResult.test.js","sourceRoot":"","sources":["../src/IntegrationExecutionResult.test.ts"],"names":[],"mappings":";;AAAA,mCAAoC;AACpC,6EAGsC;AAEtC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAC3C,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;YACjD,MAAM,CAAC,GAAG,IAAI,uDAA0B,CACtC,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,CACjB,CAAC;YACF,MAAM,EAAE,GAAkB;gBACxB,OAAO,EAAE,CAAC,GAAG,CAAC;gBACd,OAAO,EAAE,CAAC,GAAG,CAAC;gBACd,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,iBAAS,CAAC,cAAc;wBAC9B,aAAa,EAAE,GAAG;wBAClB,QAAQ,EAAE,CAAC,kBAAkB,CAAC;qBAC/B;iBACF;aACF,CAAC;YAEF,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAEjB,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC;gBACnC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;gBACtD,OAAO,EAAE;oBACP,KAAK,EAAE,CAAC,GAAG,CAAC;oBACZ,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,GAAG,CAAC;oBACd,KAAK,EAAE;wBACL;4BACE,IAAI,EAAE,iBAAS,CAAC,cAAc;4BAC9B,aAAa,EAAE,GAAG;4BAClB,QAAQ,EAAE,CAAC,kBAAkB,CAAC;yBAC/B;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,CAAC,GAAG,IAAI,uDAA0B,CACtC,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,CACjB,CAAC;YACF,MAAM,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;YAC1D,MAAM,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAC,CAAC,aAAa,CAChD,2BAA2B,CAC5B,CAAC;YACF,MAAM,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ export declare enum CommunicationIntegrationStatus {
2
+ SUCCESS = "success",
3
+ ERROR = "error"
4
+ }
5
+ export declare enum SyncError {
6
+ MISSING_FIELDS = "missing",
7
+ VALIDATION = "validation",
8
+ VALIDATION_SERVER = "validation_server"
9
+ }
10
+ export declare type IntegrationResultError = {
11
+ type: SyncError;
12
+ userReference: string;
13
+ metadata: string[];
14
+ };
15
+ export interface IntegrationResultStatus {
16
+ totals: {
17
+ added: number;
18
+ updated: number;
19
+ removed: number;
20
+ error: number;
21
+ };
22
+ details: {
23
+ added: string[];
24
+ updated: string[];
25
+ removed: string[];
26
+ error: IntegrationResultError[];
27
+ };
28
+ }
package/dist/types.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncError = exports.CommunicationIntegrationStatus = void 0;
4
+ var CommunicationIntegrationStatus;
5
+ (function (CommunicationIntegrationStatus) {
6
+ CommunicationIntegrationStatus["SUCCESS"] = "success";
7
+ CommunicationIntegrationStatus["ERROR"] = "error";
8
+ })(CommunicationIntegrationStatus = exports.CommunicationIntegrationStatus || (exports.CommunicationIntegrationStatus = {}));
9
+ var SyncError;
10
+ (function (SyncError) {
11
+ SyncError["MISSING_FIELDS"] = "missing";
12
+ SyncError["VALIDATION"] = "validation";
13
+ SyncError["VALIDATION_SERVER"] = "validation_server";
14
+ })(SyncError = exports.SyncError || (exports.SyncError = {}));
15
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,8BAGX;AAHD,WAAY,8BAA8B;IACxC,qDAAmB,CAAA;IACnB,iDAAe,CAAA;AACjB,CAAC,EAHW,8BAA8B,GAA9B,sCAA8B,KAA9B,sCAA8B,QAGzC;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,uCAA0B,CAAA;IAC1B,sCAAyB,CAAA;IACzB,oDAAuC,CAAA;AACzC,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@alanszp/integrations-common",
3
+ "version": "7.8.3",
4
+ "description": "Common logic shared between integrations.",
5
+ "main": "dist/index.js",
6
+ "typings": "dist/index.d.ts",
7
+ "license": "MIT",
8
+ "files": [
9
+ "**/*"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "scripts": {
15
+ "compile": "rm -rf ./dist && tsc --declaration",
16
+ "compile-watch": "tsc -w",
17
+ "build": "yarn run compile",
18
+ "prepack": "yarn run build",
19
+ "yalc-publish": "yarn run yalc publish"
20
+ },
21
+ "devDependencies": {
22
+ "@types/jest": "^29.2.3",
23
+ "@types/node": "^15.12.3",
24
+ "jest": "^29.3.1",
25
+ "ts-node": "^10.0.0",
26
+ "tslint": "^6.1.3",
27
+ "typescript": "^4.3.4"
28
+ },
29
+ "dependencies": {
30
+ "@alanszp/errors": "^7.0.0",
31
+ "lodash": "^4.17.21"
32
+ },
33
+ "gitHead": "8e8ec3adbd5590caec41913371e3eea8aa745024"
34
+ }
@@ -0,0 +1,64 @@
1
+ import { SyncError } from "./types";
2
+ import {
3
+ ChangesStatus,
4
+ IntegrationExecutionResult,
5
+ } from "./IntegrationExecutionResult";
6
+
7
+ const MOCK_INTEGRATION_ID = "1";
8
+ const MOCK_ORGANIZATION_REFERENCE = "test";
9
+ const MOCK_EXECUTED_BY = "1";
10
+
11
+ describe("IntegrationHistory", () => {
12
+ describe("setResults", () => {
13
+ it("should return value with default values", () => {
14
+ const i = new IntegrationExecutionResult(
15
+ MOCK_INTEGRATION_ID,
16
+ MOCK_ORGANIZATION_REFERENCE,
17
+ MOCK_EXECUTED_BY
18
+ );
19
+ const pc: ChangesStatus = {
20
+ created: ["1"],
21
+ updated: ["1"],
22
+ errors: [
23
+ {
24
+ type: SyncError.MISSING_FIELDS,
25
+ userReference: "1",
26
+ metadata: ["missingFieldName"],
27
+ },
28
+ ],
29
+ };
30
+
31
+ i.setResults(pc);
32
+
33
+ expect(i.getResults()).toStrictEqual({
34
+ totals: { added: 1, removed: 0, updated: 1, error: 1 },
35
+ details: {
36
+ added: ["1"],
37
+ removed: [],
38
+ updated: ["1"],
39
+ error: [
40
+ {
41
+ type: SyncError.MISSING_FIELDS,
42
+ userReference: "1",
43
+ metadata: ["missingFieldName"],
44
+ },
45
+ ],
46
+ },
47
+ });
48
+ });
49
+ });
50
+ describe("getters", () => {
51
+ it("should return correct values", () => {
52
+ const i = new IntegrationExecutionResult(
53
+ MOCK_INTEGRATION_ID,
54
+ MOCK_ORGANIZATION_REFERENCE,
55
+ MOCK_EXECUTED_BY
56
+ );
57
+ expect(i.getExecutedBy()).toStrictEqual(MOCK_EXECUTED_BY);
58
+ expect(i.getOrganizationReference()).toStrictEqual(
59
+ MOCK_ORGANIZATION_REFERENCE
60
+ );
61
+ expect(i.getExecutedBy()).toStrictEqual(MOCK_EXECUTED_BY);
62
+ });
63
+ });
64
+ });
@@ -0,0 +1,103 @@
1
+ import { merge } from "lodash";
2
+ import {
3
+ IntegrationResultStatus,
4
+ CommunicationIntegrationStatus,
5
+ IntegrationResultError,
6
+ } from "./types";
7
+
8
+ type ResultDetails = IntegrationResultStatus["details"];
9
+ type ResultTotals = IntegrationResultStatus["totals"];
10
+
11
+ export interface ChangesStatus {
12
+ updated: string[];
13
+ created: string[];
14
+ errors: IntegrationResultError[];
15
+ }
16
+
17
+ export class IntegrationExecutionResult {
18
+ private totals: ResultTotals = { added: 0, removed: 0, updated: 0, error: 0 };
19
+
20
+ private details: ResultDetails = {
21
+ added: [],
22
+ removed: [],
23
+ updated: [],
24
+ error: [],
25
+ };
26
+
27
+ private integrationId: string;
28
+
29
+ private organizationReference: string;
30
+
31
+ private status: CommunicationIntegrationStatus;
32
+
33
+ private executedBy: string | undefined;
34
+
35
+ private context?: Record<string, unknown>;
36
+
37
+ constructor(
38
+ integrationId: string,
39
+ organizationReference: string,
40
+ executedBy?: string
41
+ ) {
42
+ this.integrationId = integrationId;
43
+ this.organizationReference = organizationReference;
44
+ this.executedBy = executedBy;
45
+ }
46
+
47
+ public setResults(changes: ChangesStatus): void {
48
+ this.setTotals({
49
+ updated: changes.updated.length,
50
+ added: changes.created.length,
51
+ error: changes.errors.length,
52
+ });
53
+
54
+ this.setDetails({
55
+ updated: changes.updated,
56
+ added: changes.created,
57
+ error: changes.errors,
58
+ });
59
+ }
60
+
61
+ public setContext(context: Record<string, unknown>): void {
62
+ this.context = context;
63
+ }
64
+
65
+ public getContext(): Record<string, unknown> | undefined {
66
+ return this.context;
67
+ }
68
+
69
+ public getIntegrationId(): string {
70
+ return this.integrationId;
71
+ }
72
+
73
+ public getOrganizationReference(): string {
74
+ return this.organizationReference;
75
+ }
76
+
77
+ public setStatus(status: CommunicationIntegrationStatus): void {
78
+ this.status = status;
79
+ }
80
+
81
+ public getStatus(): CommunicationIntegrationStatus {
82
+ return this.status;
83
+ }
84
+
85
+ public getExecutedBy(): string | undefined {
86
+ return this.executedBy;
87
+ }
88
+
89
+ public getResults(): IntegrationResultStatus {
90
+ return {
91
+ totals: this.totals,
92
+ details: this.details,
93
+ };
94
+ }
95
+
96
+ private setTotals(totals: Partial<ResultTotals>): void {
97
+ this.totals = merge(this.totals, totals);
98
+ }
99
+
100
+ private setDetails(details: Partial<ResultDetails>): void {
101
+ this.details = merge(this.details, details);
102
+ }
103
+ }
package/src/types.ts ADDED
@@ -0,0 +1,31 @@
1
+ export enum CommunicationIntegrationStatus {
2
+ SUCCESS = "success",
3
+ ERROR = "error",
4
+ }
5
+
6
+ export enum SyncError {
7
+ MISSING_FIELDS = "missing",
8
+ VALIDATION = "validation",
9
+ VALIDATION_SERVER = "validation_server",
10
+ }
11
+
12
+ export type IntegrationResultError = {
13
+ type: SyncError;
14
+ userReference: string;
15
+ metadata: string[];
16
+ };
17
+
18
+ export interface IntegrationResultStatus {
19
+ totals: {
20
+ added: number;
21
+ updated: number;
22
+ removed: number;
23
+ error: number;
24
+ };
25
+ details: {
26
+ added: string[];
27
+ updated: string[];
28
+ removed: string[];
29
+ error: IntegrationResultError[];
30
+ };
31
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "rootDir": "src",
4
+ "outDir": "dist",
5
+ "module": "commonjs",
6
+ "target": "es6",
7
+ "types": ["node", "jest"],
8
+ "esModuleInterop": true,
9
+ "sourceMap": true,
10
+ "experimentalDecorators": true,
11
+
12
+ "alwaysStrict": true,
13
+ "strictNullChecks": true
14
+ },
15
+ "exclude": ["node_modules"]
16
+ }