node-hp-scan-to 1.0.1 → 1.2.1
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/README.md +92 -11
- package/dist/Destination.d.ts +8 -7
- package/dist/Destination.js +115 -84
- package/dist/Destination.js.map +1 -1
- package/dist/Event.d.ts +21 -17
- package/dist/Event.js +46 -30
- package/dist/Event.js.map +1 -1
- package/dist/EventTable.d.ts +11 -11
- package/dist/EventTable.js +26 -26
- package/dist/EventTable.js.map +1 -1
- package/dist/HPApi.d.ts +42 -29
- package/dist/HPApi.js +528 -333
- package/dist/HPApi.js.map +1 -1
- package/dist/Job.d.ts +36 -24
- package/dist/Job.js +94 -62
- package/dist/Job.js.map +1 -1
- package/dist/JpegUtil.d.ts +26 -0
- package/dist/JpegUtil.js +238 -0
- package/dist/JpegUtil.js.map +1 -0
- package/dist/PathHelper.d.ts +5 -0
- package/dist/PathHelper.js +79 -0
- package/dist/PathHelper.js.map +1 -0
- package/dist/ScanContent.d.ts +12 -0
- package/dist/ScanContent.js +82 -0
- package/dist/ScanContent.js.map +1 -0
- package/dist/ScanJobSettings.d.ts +6 -6
- package/dist/ScanJobSettings.js +95 -94
- package/dist/ScanJobSettings.js.map +1 -1
- package/dist/ScanStatus.d.ts +18 -18
- package/dist/ScanStatus.js +35 -29
- package/dist/ScanStatus.js.map +1 -1
- package/dist/WalkupScanDestination.d.ts +24 -24
- package/dist/WalkupScanDestination.js +40 -40
- package/dist/WalkupScanDestination.js.map +1 -1
- package/dist/WalkupScanDestinations.d.ts +11 -11
- package/dist/WalkupScanDestinations.js +26 -26
- package/dist/WalkupScanDestinations.js.map +1 -1
- package/dist/WalkupScanToCompDestination.d.ts +26 -0
- package/dist/WalkupScanToCompDestination.js +44 -0
- package/dist/WalkupScanToCompDestination.js.map +1 -0
- package/dist/WalkupScanToCompDestinations.d.ts +11 -0
- package/dist/WalkupScanToCompDestinations.js +27 -0
- package/dist/WalkupScanToCompDestinations.js.map +1 -0
- package/dist/WalkupScanToCompEvent.d.ts +10 -0
- package/dist/WalkupScanToCompEvent.js +17 -0
- package/dist/WalkupScanToCompEvent.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +630 -292
- package/dist/index.js.map +1 -1
- package/nodemon.json +5 -5
- package/package.json +72 -57
- package/src/Destination.ts +63 -45
- package/src/Event.ts +45 -31
- package/src/EventTable.ts +25 -25
- package/src/HPApi.ts +365 -222
- package/src/Job.ts +100 -62
- package/src/JpegUtil.ts +319 -0
- package/src/PathHelper.ts +44 -0
- package/src/ScanContent.ts +34 -0
- package/src/ScanJobSettings.ts +55 -55
- package/src/ScanStatus.ts +36 -31
- package/src/WalkupScanDestination.ts +46 -44
- package/src/WalkupScanDestinations.ts +29 -27
- package/src/WalkupScanToCompDestination.ts +55 -0
- package/src/WalkupScanToCompDestinations.ts +34 -0
- package/src/WalkupScanToCompEvent.ts +18 -0
- package/src/index.ts +555 -205
- package/tsconfig.json +34 -0
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var WalkupScanDestination = /** @class */ (function () {
|
|
4
|
-
function WalkupScanDestination(data) {
|
|
5
|
-
this.data = data;
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(WalkupScanDestination.prototype, "name", {
|
|
8
|
-
get: function () {
|
|
9
|
-
return this.data["dd:Name"][0];
|
|
10
|
-
},
|
|
11
|
-
enumerable:
|
|
12
|
-
configurable: true
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(WalkupScanDestination.prototype, "hostname", {
|
|
15
|
-
get: function () {
|
|
16
|
-
return this.data["dd:ResourceURI"][0];
|
|
17
|
-
},
|
|
18
|
-
enumerable:
|
|
19
|
-
configurable: true
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(WalkupScanDestination.prototype, "resourceURI", {
|
|
22
|
-
get: function () {
|
|
23
|
-
return this.data["dd:ResourceURI"][0];
|
|
24
|
-
},
|
|
25
|
-
enumerable:
|
|
26
|
-
configurable: true
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(WalkupScanDestination.prototype, "shortcut", {
|
|
29
|
-
get: function () {
|
|
30
|
-
return this.data["wus:WalkupScanDestinations"]["wus:WalkupScanDestination"]["0"]["wus:WalkupScanSettings"]["0"]["wus:Shortcut"][0];
|
|
31
|
-
},
|
|
32
|
-
enumerable:
|
|
33
|
-
configurable: true
|
|
34
|
-
});
|
|
35
|
-
WalkupScanDestination.prototype.getContentType = function () {
|
|
36
|
-
return this.shortcut === "SavePDF" ? "Document" : "Photo";
|
|
37
|
-
};
|
|
38
|
-
return WalkupScanDestination;
|
|
39
|
-
}());
|
|
40
|
-
exports.default = WalkupScanDestination;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var WalkupScanDestination = /** @class */ (function () {
|
|
4
|
+
function WalkupScanDestination(data) {
|
|
5
|
+
this.data = data;
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(WalkupScanDestination.prototype, "name", {
|
|
8
|
+
get: function () {
|
|
9
|
+
return this.data["dd:Name"][0];
|
|
10
|
+
},
|
|
11
|
+
enumerable: false,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(WalkupScanDestination.prototype, "hostname", {
|
|
15
|
+
get: function () {
|
|
16
|
+
return this.data["dd:ResourceURI"][0];
|
|
17
|
+
},
|
|
18
|
+
enumerable: false,
|
|
19
|
+
configurable: true
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(WalkupScanDestination.prototype, "resourceURI", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return this.data["dd:ResourceURI"][0];
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(WalkupScanDestination.prototype, "shortcut", {
|
|
29
|
+
get: function () {
|
|
30
|
+
return this.data["wus:WalkupScanDestinations"]["wus:WalkupScanDestination"]["0"]["wus:WalkupScanSettings"]["0"]["wus:Shortcut"][0];
|
|
31
|
+
},
|
|
32
|
+
enumerable: false,
|
|
33
|
+
configurable: true
|
|
34
|
+
});
|
|
35
|
+
WalkupScanDestination.prototype.getContentType = function () {
|
|
36
|
+
return this.shortcut === "SavePDF" ? "Document" : "Photo";
|
|
37
|
+
};
|
|
38
|
+
return WalkupScanDestination;
|
|
39
|
+
}());
|
|
40
|
+
exports.default = WalkupScanDestination;
|
|
41
41
|
//# sourceMappingURL=WalkupScanDestination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalkupScanDestination.js","sourceRoot":"","sources":["../src/WalkupScanDestination.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"WalkupScanDestination.js","sourceRoot":"","sources":["../src/WalkupScanDestination.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAkBb;IAEE,+BAAY,IAA+B;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,uCAAI;aAAR;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC;;;OAAA;IAED,sBAAI,2CAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;;;OAAA;IAED,sBAAI,8CAAW;aAAf;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;;;OAAA;IAED,sBAAI,2CAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,2BAA2B,CAAC,CACzE,GAAG,CACJ,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,CAAC;;;OAAA;IAED,8CAAc,GAAd;QACE,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,CAAC;IACH,4BAAC;AAAD,CAAC,AA3BD,IA2BC","sourcesContent":["\"use strict\";\n\nexport interface WalkupScanDestinationData {\n \"dd:Name\": string[];\n \"dd:ResourceURI\": string[];\n \"wus:WalkupScanDestinations\": {\n \"wus:WalkupScanDestination\": {\n \"0\": {\n \"wus:WalkupScanSettings\": {\n \"0\": {\n \"wus:Shortcut\": string[];\n };\n };\n };\n };\n };\n}\n\nexport default class WalkupScanDestination {\n private readonly data: WalkupScanDestinationData;\n constructor(data: WalkupScanDestinationData) {\n this.data = data;\n }\n\n get name(): string {\n return this.data[\"dd:Name\"][0];\n }\n\n get hostname(): string {\n return this.data[\"dd:ResourceURI\"][0];\n }\n\n get resourceURI(): string {\n return this.data[\"dd:ResourceURI\"][0];\n }\n\n get shortcut(): string {\n return this.data[\"wus:WalkupScanDestinations\"][\"wus:WalkupScanDestination\"][\n \"0\"\n ][\"wus:WalkupScanSettings\"][\"0\"][\"wus:Shortcut\"][0];\n }\n\n getContentType(): string {\n return this.shortcut === \"SavePDF\" ? \"Document\" : \"Photo\";\n }\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import WalkupScanDestination, { WalkupScanDestinationData } from "./WalkupScanDestination";
|
|
2
|
-
export interface WalkupScanDestinationsData {
|
|
3
|
-
"wus:WalkupScanDestinations": {
|
|
4
|
-
"wus:WalkupScanDestination": WalkupScanDestinationData[];
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export default class WalkupScanDestinations {
|
|
8
|
-
private readonly data;
|
|
9
|
-
constructor(data: WalkupScanDestinationsData);
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
import WalkupScanDestination, { WalkupScanDestinationData } from "./WalkupScanDestination";
|
|
2
|
+
export interface WalkupScanDestinationsData {
|
|
3
|
+
"wus:WalkupScanDestinations": {
|
|
4
|
+
"wus:WalkupScanDestination": WalkupScanDestinationData[];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export default class WalkupScanDestinations {
|
|
8
|
+
private readonly data;
|
|
9
|
+
constructor(data: WalkupScanDestinationsData);
|
|
10
|
+
get destinations(): WalkupScanDestination[];
|
|
11
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var WalkupScanDestination_1 = __importDefault(require("./WalkupScanDestination"));
|
|
7
|
-
var WalkupScanDestinations = /** @class */ (function () {
|
|
8
|
-
function WalkupScanDestinations(data) {
|
|
9
|
-
this.data = data;
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(WalkupScanDestinations.prototype, "destinations", {
|
|
12
|
-
get: function () {
|
|
13
|
-
var walkupScanDestinations = this.data["wus:WalkupScanDestinations"];
|
|
14
|
-
if (walkupScanDestinations.hasOwnProperty("wus:WalkupScanDestination")) {
|
|
15
|
-
return walkupScanDestinations["wus:WalkupScanDestination"].map(function (x) { return new WalkupScanDestination_1.default(x); });
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
enumerable:
|
|
22
|
-
configurable: true
|
|
23
|
-
});
|
|
24
|
-
return WalkupScanDestinations;
|
|
25
|
-
}());
|
|
26
|
-
exports.default = WalkupScanDestinations;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var WalkupScanDestination_1 = __importDefault(require("./WalkupScanDestination"));
|
|
7
|
+
var WalkupScanDestinations = /** @class */ (function () {
|
|
8
|
+
function WalkupScanDestinations(data) {
|
|
9
|
+
this.data = data;
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(WalkupScanDestinations.prototype, "destinations", {
|
|
12
|
+
get: function () {
|
|
13
|
+
var walkupScanDestinations = this.data["wus:WalkupScanDestinations"];
|
|
14
|
+
if (walkupScanDestinations.hasOwnProperty("wus:WalkupScanDestination")) {
|
|
15
|
+
return walkupScanDestinations["wus:WalkupScanDestination"].map(function (x) { return new WalkupScanDestination_1.default(x); });
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
enumerable: false,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
24
|
+
return WalkupScanDestinations;
|
|
25
|
+
}());
|
|
26
|
+
exports.default = WalkupScanDestinations;
|
|
27
27
|
//# sourceMappingURL=WalkupScanDestinations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalkupScanDestinations.js","sourceRoot":"","sources":["../src/WalkupScanDestinations.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAEb,
|
|
1
|
+
{"version":3,"file":"WalkupScanDestinations.js","sourceRoot":"","sources":["../src/WalkupScanDestinations.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAEb,kFAEiC;AAQjC;IAEE,gCAAY,IAAgC;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,gDAAY;aAAhB;YACE,IAAI,sBAAsB,GAAG,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YACrE,IAAI,sBAAsB,CAAC,cAAc,CAAC,2BAA2B,CAAC,EAAE;gBACtE,OAAO,sBAAsB,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAC5D,UAAC,CAAC,IAAK,OAAA,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAA5B,CAA4B,CACpC,CAAC;aACH;iBAAM;gBACL,OAAO,EAAE,CAAC;aACX;QACH,CAAC;;;OAAA;IACH,6BAAC;AAAD,CAAC,AAhBD,IAgBC","sourcesContent":["\"use strict\";\n\nimport WalkupScanDestination, {\n WalkupScanDestinationData,\n} from \"./WalkupScanDestination\";\n\nexport interface WalkupScanDestinationsData {\n \"wus:WalkupScanDestinations\": {\n \"wus:WalkupScanDestination\": WalkupScanDestinationData[];\n };\n}\n\nexport default class WalkupScanDestinations {\n private readonly data: WalkupScanDestinationsData;\n constructor(data: WalkupScanDestinationsData) {\n this.data = data;\n }\n\n get destinations(): WalkupScanDestination[] {\n let walkupScanDestinations = this.data[\"wus:WalkupScanDestinations\"];\n if (walkupScanDestinations.hasOwnProperty(\"wus:WalkupScanDestination\")) {\n return walkupScanDestinations[\"wus:WalkupScanDestination\"].map(\n (x) => new WalkupScanDestination(x)\n );\n } else {\n return [];\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface WalkupScanToCompDestinationData {
|
|
2
|
+
"dd:Name": string[];
|
|
3
|
+
"dd:ResourceURI": string[];
|
|
4
|
+
"dd3:Hostname": string[];
|
|
5
|
+
"wus:WalkupScanToCompDestination": {
|
|
6
|
+
"wus:WalkupScanToCompSettings": {
|
|
7
|
+
"0": {
|
|
8
|
+
"scantype:Scansettings": {
|
|
9
|
+
"0": {
|
|
10
|
+
"dd:ScanPlexMode": string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
"wus:Shortcut": string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export default class WalkupScanToCompDestination {
|
|
19
|
+
private readonly data;
|
|
20
|
+
constructor(data: WalkupScanToCompDestinationData);
|
|
21
|
+
get name(): string;
|
|
22
|
+
get hostname(): string;
|
|
23
|
+
get resourceURI(): string;
|
|
24
|
+
get shortcut(): string;
|
|
25
|
+
getContentType(): string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var WalkupScanToCompDestination = /** @class */ (function () {
|
|
4
|
+
function WalkupScanToCompDestination(data) {
|
|
5
|
+
this.data = data;
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(WalkupScanToCompDestination.prototype, "name", {
|
|
8
|
+
get: function () {
|
|
9
|
+
return this.data["dd:Name"][0];
|
|
10
|
+
},
|
|
11
|
+
enumerable: false,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(WalkupScanToCompDestination.prototype, "hostname", {
|
|
15
|
+
get: function () {
|
|
16
|
+
return this.data["dd3:Hostname"][0];
|
|
17
|
+
},
|
|
18
|
+
enumerable: false,
|
|
19
|
+
configurable: true
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(WalkupScanToCompDestination.prototype, "resourceURI", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return this.data["dd:ResourceURI"][0];
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(WalkupScanToCompDestination.prototype, "shortcut", {
|
|
29
|
+
get: function () {
|
|
30
|
+
if (this.data["wus:WalkupScanToCompDestination"].hasOwnProperty("wus:WalkupScanToCompSettings")) {
|
|
31
|
+
return this.data["wus:WalkupScanToCompDestination"]["wus:WalkupScanToCompSettings"]["0"]["wus:Shortcut"][0];
|
|
32
|
+
}
|
|
33
|
+
return "";
|
|
34
|
+
},
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
WalkupScanToCompDestination.prototype.getContentType = function () {
|
|
39
|
+
return this.shortcut === "SaveDocument1" ? "Document" : "Photo";
|
|
40
|
+
};
|
|
41
|
+
return WalkupScanToCompDestination;
|
|
42
|
+
}());
|
|
43
|
+
exports.default = WalkupScanToCompDestination;
|
|
44
|
+
//# sourceMappingURL=WalkupScanToCompDestination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompDestination.js","sourceRoot":"","sources":["../src/WalkupScanToCompDestination.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAoBb;IAEE,qCAAY,IAAqC;QAC/C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,6CAAI;aAAR;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC;;;OAAA;IAED,sBAAI,iDAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;;;OAAA;IAED,sBAAI,oDAAW;aAAf;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;;;OAAA;IAED,sBAAI,iDAAQ;aAAZ;YACE,IACE,IAAI,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,cAAc,CACzD,8BAA8B,CAC/B,EACD;gBACA,OAAO,IAAI,CAAC,IAAI,CAAC,iCAAiC,CAAC,CACjD,8BAA8B,CAC/B,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;aAC3B;YACD,OAAO,EAAE,CAAC;QACZ,CAAC;;;OAAA;IAED,oDAAc,GAAd;QACE,OAAO,IAAI,CAAC,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC;IAClE,CAAC;IACH,kCAAC;AAAD,CAAC,AAlCD,IAkCC","sourcesContent":["\"use strict\";\n\nexport interface WalkupScanToCompDestinationData {\n \"dd:Name\": string[];\n \"dd:ResourceURI\": string[];\n \"dd3:Hostname\": string[];\n \"wus:WalkupScanToCompDestination\": {\n \"wus:WalkupScanToCompSettings\": {\n \"0\": {\n \"scantype:Scansettings\": {\n \"0\": {\n \"dd:ScanPlexMode\": string[];\n };\n };\n \"wus:Shortcut\": string[]; //can be 'SaveDocument1' or 'SavePhoto1'\n };\n };\n };\n}\n\nexport default class WalkupScanToCompDestination {\n private readonly data: WalkupScanToCompDestinationData;\n constructor(data: WalkupScanToCompDestinationData) {\n this.data = data;\n }\n\n get name(): string {\n return this.data[\"dd:Name\"][0];\n }\n\n get hostname(): string {\n return this.data[\"dd3:Hostname\"][0];\n }\n\n get resourceURI(): string {\n return this.data[\"dd:ResourceURI\"][0];\n }\n\n get shortcut(): string {\n if (\n this.data[\"wus:WalkupScanToCompDestination\"].hasOwnProperty(\n \"wus:WalkupScanToCompSettings\"\n )\n ) {\n return this.data[\"wus:WalkupScanToCompDestination\"][\n \"wus:WalkupScanToCompSettings\"\n ][\"0\"][\"wus:Shortcut\"][0];\n }\n return \"\";\n }\n\n getContentType(): string {\n return this.shortcut === \"SaveDocument1\" ? \"Document\" : \"Photo\";\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import WalkupScanToCompDestination, { WalkupScanToCompDestinationData } from "./WalkupScanToCompDestination";
|
|
2
|
+
export interface WalkupScanToCompDestinationsData {
|
|
3
|
+
"wus:WalkupScanToCompDestinations": {
|
|
4
|
+
"wus:WalkupScanToCompDestination": WalkupScanToCompDestinationData[];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export default class WalkupScanToCompDestinations {
|
|
8
|
+
private readonly data;
|
|
9
|
+
constructor(data: WalkupScanToCompDestinationsData);
|
|
10
|
+
get destinations(): WalkupScanToCompDestination[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var WalkupScanToCompDestination_1 = __importDefault(require("./WalkupScanToCompDestination"));
|
|
7
|
+
var WalkupScanToCompDestinations = /** @class */ (function () {
|
|
8
|
+
function WalkupScanToCompDestinations(data) {
|
|
9
|
+
this.data = data;
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(WalkupScanToCompDestinations.prototype, "destinations", {
|
|
12
|
+
get: function () {
|
|
13
|
+
var walkupScanToCompDestinations = this.data["wus:WalkupScanToCompDestinations"];
|
|
14
|
+
if (walkupScanToCompDestinations.hasOwnProperty("wus:WalkupScanToCompDestination")) {
|
|
15
|
+
return walkupScanToCompDestinations["wus:WalkupScanToCompDestination"].map(function (x) { return new WalkupScanToCompDestination_1.default(x); });
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
enumerable: false,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
24
|
+
return WalkupScanToCompDestinations;
|
|
25
|
+
}());
|
|
26
|
+
exports.default = WalkupScanToCompDestinations;
|
|
27
|
+
//# sourceMappingURL=WalkupScanToCompDestinations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompDestinations.js","sourceRoot":"","sources":["../src/WalkupScanToCompDestinations.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAEb,8FAEuC;AAQvC;IAEE,sCAAY,IAAsC;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,sDAAY;aAAhB;YACE,IAAI,4BAA4B,GAC9B,IAAI,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;YAChD,IACE,4BAA4B,CAAC,cAAc,CACzC,iCAAiC,CAClC,EACD;gBACA,OAAO,4BAA4B,CACjC,iCAAiC,CAClC,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,IAAI,qCAA2B,CAAC,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;aAClD;iBAAM;gBACL,OAAO,EAAE,CAAC;aACX;QACH,CAAC;;;OAAA;IACH,mCAAC;AAAD,CAAC,AArBD,IAqBC","sourcesContent":["\"use strict\";\n\nimport WalkupScanToCompDestination, {\n WalkupScanToCompDestinationData,\n} from \"./WalkupScanToCompDestination\";\n\nexport interface WalkupScanToCompDestinationsData {\n \"wus:WalkupScanToCompDestinations\": {\n \"wus:WalkupScanToCompDestination\": WalkupScanToCompDestinationData[];\n };\n}\n\nexport default class WalkupScanToCompDestinations {\n private readonly data: WalkupScanToCompDestinationsData;\n constructor(data: WalkupScanToCompDestinationsData) {\n this.data = data;\n }\n\n get destinations(): WalkupScanToCompDestination[] {\n let walkupScanToCompDestinations =\n this.data[\"wus:WalkupScanToCompDestinations\"];\n if (\n walkupScanToCompDestinations.hasOwnProperty(\n \"wus:WalkupScanToCompDestination\"\n )\n ) {\n return walkupScanToCompDestinations[\n \"wus:WalkupScanToCompDestination\"\n ].map((x) => new WalkupScanToCompDestination(x));\n } else {\n return [];\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface WalkupScanToCompEventData {
|
|
2
|
+
"wus:WalkupScanToCompEvent": {
|
|
3
|
+
'wus:WalkupScanToCompEventType': string[];
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
export default class WalkupScanToCompEvent {
|
|
7
|
+
private readonly data;
|
|
8
|
+
constructor(data: WalkupScanToCompEventData);
|
|
9
|
+
get eventType(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var WalkupScanToCompEvent = /** @class */ (function () {
|
|
4
|
+
function WalkupScanToCompEvent(data) {
|
|
5
|
+
this.data = data;
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(WalkupScanToCompEvent.prototype, "eventType", {
|
|
8
|
+
get: function () {
|
|
9
|
+
return this.data["wus:WalkupScanToCompEvent"]["wus:WalkupScanToCompEventType"][0];
|
|
10
|
+
},
|
|
11
|
+
enumerable: false,
|
|
12
|
+
configurable: true
|
|
13
|
+
});
|
|
14
|
+
return WalkupScanToCompEvent;
|
|
15
|
+
}());
|
|
16
|
+
exports.default = WalkupScanToCompEvent;
|
|
17
|
+
//# sourceMappingURL=WalkupScanToCompEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompEvent.js","sourceRoot":"","sources":["../src/WalkupScanToCompEvent.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAQb;IAEE,+BAAY,IAA+B;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,4CAAS;aAAb;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;QACpF,CAAC;;;OAAA;IACH,4BAAC;AAAD,CAAC,AATD,IASC","sourcesContent":["\"use strict\";\n\nexport interface WalkupScanToCompEventData {\n \"wus:WalkupScanToCompEvent\": {\n 'wus:WalkupScanToCompEventType': string[]\n }\n}\n\nexport default class WalkupScanToCompEvent {\n private readonly data: WalkupScanToCompEventData;\n constructor(data: WalkupScanToCompEventData) {\n this.data = data;\n }\n\n get eventType(): string {\n return this.data[\"wus:WalkupScanToCompEvent\"][\"wus:WalkupScanToCompEventType\"][0];\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export {};
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export {};
|