@partium/js-sdk 14.0.3 → 14.1.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.
- package/catalog/index.js +21 -1
- package/catalog/models/catalog-image-info.js +22 -1
- package/catalog/models/catalog-image.js +40 -1
- package/catalog/models/upsert-catalog-images-dto.js +3 -1
- package/catalog/models/upsert-images-result.js +3 -1
- package/catalog/services/images.service.js +62 -1
- package/core/constants/constants.js +16 -1
- package/core/decorators/injection-identifier.js +19 -1
- package/core/factories/paginated-request-service.factory.js +33 -1
- package/core/index.js +63 -1
- package/core/integration-defaults/http/fetch-api-http-error-helper.js +129 -1
- package/core/integration-defaults/http/file-transfer/axios-file-transfer.service.js +138 -1
- package/core/integration-defaults/http/file-transfer/fetch-api-file-transfer.service.js +210 -1
- package/core/integration-defaults/http/handle-axios-error-helper.js +79 -1
- package/core/integration-defaults/http/https-client/axios-https-client.service.js +182 -1
- package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +198 -1
- package/core/integration-defaults/http/js-oauth-keycloak-https.service.js +32 -1
- package/core/integration-defaults/js-p-file.js +36 -1
- package/core/integration-defaults/session/js-oauth-api-key-session.service.js +206 -1
- package/core/integration-defaults/session/js-oauth-keycloak-auth-config.js +64 -1
- package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +257 -1
- package/core/integration-defaults/web-device-status.service.js +125 -1
- package/core/integration-defaults/web-file.service.js +135 -1
- package/core/integration-defaults/web-indexeddb.service.js +142 -1
- package/core/integration-defaults/web-local-storage.service.js +310 -1
- package/core/models/api-object.js +16 -1
- package/core/models/auth-config.js +72 -1
- package/core/models/device-info.js +34 -1
- package/core/models/error.js +107 -1
- package/core/models/formatted-string.js +14 -1
- package/core/models/i18n-map.js +61 -1
- package/core/models/i18n-string.js +35 -1
- package/core/models/log.js +137 -1
- package/core/models/organization.js +159 -1
- package/core/models/p-file.js +23 -1
- package/core/models/paginated-list.js +41 -1
- package/core/models/partium-config.js +43 -1
- package/core/models/user-token.js +11 -1
- package/core/models/user.js +88 -1
- package/core/services/backend-status.service.js +147 -1
- package/core/services/base-login-init.service.js +57 -1
- package/core/services/base.service.js +37 -1
- package/core/services/device-status.service.interface.js +117 -1
- package/core/services/file.service.interface.js +61 -1
- package/core/services/http/file-transfer/file-transfer.service.interface.js +125 -1
- package/core/services/http/https-client/https-client.service.interface.js +152 -1
- package/core/services/http/https.service.interface.js +294 -1
- package/core/services/http/oauth-https.service.js +218 -1
- package/core/services/local-storage.service.interface.js +378 -1
- package/core/services/log.service.js +139 -1
- package/core/services/organization.service.js +202 -1
- package/core/services/paginated-request.service.js +160 -1
- package/core/services/recent-parts.service.js +194 -1
- package/core/services/service-provider.js +114 -1
- package/core/services/session/oauth-session.service.js +104 -1
- package/core/services/session/session.service.interface.js +367 -1
- package/core/utils/general-helper.js +110 -1
- package/data/index.js +44 -1
- package/data/models/announcement.js +70 -1
- package/data/models/assembly-hierarchy-node-breadcrumb.js +51 -1
- package/data/models/assembly-hierarchy-node.js +46 -1
- package/data/models/attribute.js +106 -1
- package/data/models/csa-request-search.js +46 -1
- package/data/models/csa-request-status.js +51 -1
- package/data/models/csa-request.js +112 -1
- package/data/models/document.js +17 -1
- package/data/models/filter-key.js +36 -1
- package/data/models/filter-option-value.js +41 -1
- package/data/models/image.d.ts +3 -1
- package/data/models/image.js +77 -1
- package/data/models/inquiry.js +71 -1
- package/data/models/mounting-location.js +58 -1
- package/data/models/multiple-expert-searches.js +40 -1
- package/data/models/part-enrichment-data.js +50 -1
- package/data/models/part.js +168 -1
- package/data/models/shopping-cart.js +60 -1
- package/data/services/announcement.service.js +89 -1
- package/data/services/assembly-hierarchy-nodes.service.js +193 -1
- package/data/services/csa-helper.service.js +158 -1
- package/data/services/customer-service-assistance.service.js +276 -1
- package/data/services/filter.service.js +97 -1
- package/data/services/inquiry.service.js +68 -1
- package/data/services/part-attribute.service.js +118 -1
- package/data/services/part-enrichment.service.js +56 -1
- package/data/services/part.service.js +182 -1
- package/data/services/related-parts.service.js +83 -1
- package/data/services/shopping-cart.service.js +152 -1
- package/find/index.js +51 -1
- package/find/models/assets/asset.js +32 -1
- package/find/models/search-filter.js +205 -1
- package/find/models/search-input.js +3 -1
- package/find/models/search-output.js +3 -1
- package/find/models/search-result-status.js +40 -1
- package/find/models/search-session-log-object.js +22 -1
- package/find/models/search-status/cv-search-status.js +22 -1
- package/find/models/search-status/search-filter-status.js +36 -1
- package/find/models/search-status/search-status.js +56 -1
- package/find/models/search-status/tag-search-status.js +23 -1
- package/find/models/search-status/text-search-status.js +18 -1
- package/find/models/search-tag.js +16 -1
- package/find/models/smart-filter.js +49 -1
- package/find/models/tagable/i18n-tagable.js +37 -1
- package/find/models/tagable/tagable-base.js +22 -1
- package/find/models/tagable/tagable.js +37 -1
- package/find/models/text-search-config.js +70 -1
- package/find/models/text-search-manipulator.js +90 -1
- package/find/models/text-search-result-item/text-search-error.js +12 -1
- package/find/models/text-search-result-item/text-search-result-item-document.js +34 -1
- package/find/models/text-search-result-item/text-search-result-item-part.js +36 -1
- package/find/models/text-search-result-item/text-search-result-item-recent-query.js +35 -1
- package/find/models/text-search-result-item/text-search-result-item-unknown.js +38 -1
- package/find/models/text-search-result-item/text-search-result-item.js +22 -1
- package/find/services/asset.service.js +348 -1
- package/find/services/filter-uploaders/filter-uploader.js +3 -1
- package/find/services/filter-uploaders/update-filters-uploader.js +77 -1
- package/find/services/filter-uploaders/update-filters.model.js +7 -1
- package/find/services/search/cv-search.service.js +214 -1
- package/find/services/search/recent-text-search-queries.service.js +260 -1
- package/find/services/search/search-result.service.js +539 -1
- package/find/services/search/search.service.js +514 -1
- package/find/services/search/tag-search.service.js +124 -1
- package/find/services/search/text-search.service.js +316 -1
- package/find/services/search-filter.service.js +292 -1
- package/find/utils/search-helper.js +75 -1
- package/gen/sdk-version.d.ts +1 -1
- package/gen/sdk-version.js +5 -1
- package/index.js +392 -1
- package/management/index.js +21 -1
- package/management/models/api-key-list-response.js +3 -1
- package/management/models/api-key-type.js +9 -1
- package/management/models/api-key.js +3 -1
- package/management/services/api-key.service.js +53 -1
- package/ocr/index.js +20 -1
- package/ocr/models/detect-response.js +3 -1
- package/ocr/models/detected-text-entry.js +3 -1
- package/ocr/services/ocr.service.js +59 -1
- package/package.json +1 -1
- package/user-data/index.js +21 -1
- package/user-data/models/part-with-nullable.js +3 -1
- package/user-data/models/request-list/request-list.js +63 -1
- package/user-data/services/favorite/favorite.service.js +108 -1
- package/user-data/services/request-list/request-list.service.js +133 -1
|
@@ -1,2 +1,57 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __extends = (this && this.__extends) || (function () {
|
|
4
|
+
var extendStatics = function (d, b) {
|
|
5
|
+
extendStatics = Object.setPrototypeOf ||
|
|
6
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
8
|
+
return extendStatics(d, b);
|
|
9
|
+
};
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
if (typeof b !== "function" && b !== null)
|
|
12
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
13
|
+
extendStatics(d, b);
|
|
14
|
+
function __() { this.constructor = d; }
|
|
15
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
+
};
|
|
17
|
+
})();
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.PartEnrichmentServiceImpl = void 0;
|
|
26
|
+
var rxjs_1 = require("rxjs");
|
|
27
|
+
var core_1 = require("../../core");
|
|
28
|
+
var part_enrichment_data_1 = require("../models/part-enrichment-data");
|
|
29
|
+
var PartEnrichmentServiceImpl = /** @class */ (function (_super) {
|
|
30
|
+
__extends(PartEnrichmentServiceImpl, _super);
|
|
31
|
+
function PartEnrichmentServiceImpl(serviceProvider) {
|
|
32
|
+
return _super.call(this, serviceProvider) || this;
|
|
33
|
+
}
|
|
34
|
+
PartEnrichmentServiceImpl.prototype.onCreate = function () {
|
|
35
|
+
this.httpsService = this.serviceProvider.getService(core_1.HttpsService);
|
|
36
|
+
};
|
|
37
|
+
PartEnrichmentServiceImpl.prototype.enrichPart = function (partiumPartId) {
|
|
38
|
+
return this.httpsService.post("part_types/".concat(partiumPartId, "/enrich"), {}, [], core_1.BACKEND_SERVICE.DATA).pipe((0, rxjs_1.catchError)(function (error) {
|
|
39
|
+
var _a;
|
|
40
|
+
if (((_a = error.detail) === null || _a === void 0 ? void 0 : _a['status']) === 404) {
|
|
41
|
+
throw new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_UPIS_FOUND, error.detail);
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
PartEnrichmentServiceImpl.prototype.getEnrichedData = function (partiumPartId) {
|
|
47
|
+
return this.httpsService
|
|
48
|
+
.get("part_types/".concat(partiumPartId, "/enrichment-status"), [], core_1.BACKEND_SERVICE.DATA)
|
|
49
|
+
.pipe((0, rxjs_1.map)(function (response) { return part_enrichment_data_1.PartEnrichmentData.fromAPIResponse(response); }));
|
|
50
|
+
};
|
|
51
|
+
PartEnrichmentServiceImpl = __decorate([
|
|
52
|
+
(0, core_1.InjectionIdentifier)('PartEnrichmentService')
|
|
53
|
+
], PartEnrichmentServiceImpl);
|
|
54
|
+
return PartEnrichmentServiceImpl;
|
|
55
|
+
}(core_1.BaseService));
|
|
56
|
+
exports.PartEnrichmentServiceImpl = PartEnrichmentServiceImpl;
|
|
57
|
+
//# sourceMappingURL=part-enrichment.service.js.map
|
|
@@ -1,2 +1,183 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __extends = (this && this.__extends) || (function () {
|
|
4
|
+
var extendStatics = function (d, b) {
|
|
5
|
+
extendStatics = Object.setPrototypeOf ||
|
|
6
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
8
|
+
return extendStatics(d, b);
|
|
9
|
+
};
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
if (typeof b !== "function" && b !== null)
|
|
12
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
13
|
+
extendStatics(d, b);
|
|
14
|
+
function __() { this.constructor = d; }
|
|
15
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
+
};
|
|
17
|
+
})();
|
|
18
|
+
var __assign = (this && this.__assign) || function () {
|
|
19
|
+
__assign = Object.assign || function(t) {
|
|
20
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
+
s = arguments[i];
|
|
22
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
23
|
+
t[p] = s[p];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
return __assign.apply(this, arguments);
|
|
28
|
+
};
|
|
29
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
30
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
32
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
33
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
34
|
+
};
|
|
35
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
36
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
37
|
+
if (ar || !(i in from)) {
|
|
38
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
39
|
+
ar[i] = from[i];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.PartServiceImpl = void 0;
|
|
46
|
+
var rxjs_1 = require("rxjs");
|
|
47
|
+
var operators_1 = require("rxjs/operators");
|
|
48
|
+
var core_1 = require("../../core");
|
|
49
|
+
var part_1 = require("../models/part");
|
|
50
|
+
var mounting_location_1 = require("../models/mounting-location");
|
|
51
|
+
var PartServiceImpl = /** @class */ (function (_super) {
|
|
52
|
+
__extends(PartServiceImpl, _super);
|
|
53
|
+
function PartServiceImpl(serviceProvider) {
|
|
54
|
+
var _this = _super.call(this, serviceProvider) || this;
|
|
55
|
+
_this.DOWNLOAD_PAGE_SIZE = 250;
|
|
56
|
+
_this.PAGINATION_PAGE_SIZE = 25; // size of page when retrieving page of items and user decides when to load next page
|
|
57
|
+
return _this;
|
|
58
|
+
}
|
|
59
|
+
PartServiceImpl.prototype.onCreate = function () {
|
|
60
|
+
this.httpsService = this.serviceProvider.getService(core_1.HttpsService);
|
|
61
|
+
};
|
|
62
|
+
PartServiceImpl.prototype.getPart = function (partiumPartId, options) {
|
|
63
|
+
return this.loadPartFromServer(partiumPartId, options).pipe((0, operators_1.catchError)(function (error) {
|
|
64
|
+
console.log('Error while loading part-information from server.', error);
|
|
65
|
+
return (0, rxjs_1.throwError)(error);
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
PartServiceImpl.prototype.getParts = function (partiumPartIds) {
|
|
69
|
+
var _this = this;
|
|
70
|
+
return this.loadPartsFromServer(partiumPartIds).pipe((0, operators_1.map)(function (parts) { return _this.orderParts(parts, partiumPartIds); }), (0, operators_1.mergeMap)(function (parts) {
|
|
71
|
+
console.log('Warning: nonexistent partium ids will be ignored');
|
|
72
|
+
return (0, rxjs_1.of)(parts.filter(function (part) { return !!part; }));
|
|
73
|
+
}), (0, operators_1.catchError)(function (error) {
|
|
74
|
+
console.log('Error while loading part-information from server.', error);
|
|
75
|
+
return (0, rxjs_1.throwError)(error);
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
PartServiceImpl.prototype.getPartsByAssemblyHierarchyNodeId = function (assemblyHierarchyNodeId) {
|
|
79
|
+
return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(part_1.Part.fromAPIResponse, this.httpsService, 'part_types', core_1.BACKEND_SERVICE.DATA, [{ assembly_uuid: assemblyHierarchyNodeId }], this.PAGINATION_PAGE_SIZE);
|
|
80
|
+
};
|
|
81
|
+
PartServiceImpl.prototype.getMountingLocationsForPart = function (partPartiumId, prioritizedLocationIds) {
|
|
82
|
+
return this.httpsService
|
|
83
|
+
.post("part_types/".concat(partPartiumId, "/mounting-locations"), __assign({}, (prioritizedLocationIds && { priority_locations: prioritizedLocationIds })), [], core_1.BACKEND_SERVICE.DATA)
|
|
84
|
+
.pipe((0, operators_1.map)(function (responseData) {
|
|
85
|
+
return mounting_location_1.PartMountingLocationInfo.fromAPIResponse(responseData);
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Load the requested part from the server.
|
|
90
|
+
*
|
|
91
|
+
* @param partiumPartId the partium-id of the parts to get
|
|
92
|
+
* @param options options for the request
|
|
93
|
+
*/
|
|
94
|
+
PartServiceImpl.prototype.loadPartFromServer = function (partiumPartId, options) {
|
|
95
|
+
var urlParams = [];
|
|
96
|
+
if (options === null || options === void 0 ? void 0 : options.includeMountingLocations) {
|
|
97
|
+
urlParams.push({ include_mounting_locations: options.includeMountingLocations });
|
|
98
|
+
}
|
|
99
|
+
if (options === null || options === void 0 ? void 0 : options.includeSummary) {
|
|
100
|
+
urlParams.push({ include_summary: options.includeSummary });
|
|
101
|
+
}
|
|
102
|
+
if (options === null || options === void 0 ? void 0 : options.includeEnrichment) {
|
|
103
|
+
urlParams.push({ include_enrichment: options.includeEnrichment });
|
|
104
|
+
}
|
|
105
|
+
return this.httpsService
|
|
106
|
+
.get("part_types/".concat(partiumPartId), urlParams, core_1.BACKEND_SERVICE.DATA)
|
|
107
|
+
.pipe((0, operators_1.map)(function (partiumPartData) { return part_1.Part.fromAPIResponse(partiumPartData); }));
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Load all requested parts from the server.
|
|
111
|
+
* Since the response is paginated, it is necessary to do as many request as needed until
|
|
112
|
+
* all nodes are loaded.
|
|
113
|
+
*
|
|
114
|
+
* @param partiumPartIds the partium-ids of the parts to get
|
|
115
|
+
*/
|
|
116
|
+
PartServiceImpl.prototype.loadPartsFromServer = function (partiumPartIds) {
|
|
117
|
+
var _this = this;
|
|
118
|
+
var i = 1;
|
|
119
|
+
var repeat$ = new rxjs_1.Subject();
|
|
120
|
+
// do as many requests (1 per page) until all nodes are loaded
|
|
121
|
+
// we use "defer" here instead of using requestPaginatedParts directly, because this allows us to increase the page-number, which is passed to the function. Otherwise it would always be called with the same value.
|
|
122
|
+
return (0, rxjs_1.defer)(function () { return _this.requestPaginatedParts(partiumPartIds, i); }).pipe((0, operators_1.map)(function (res) {
|
|
123
|
+
var pageSize = res['pagination']['page_size'];
|
|
124
|
+
var itemsCnt = res['pagination']['items_count'];
|
|
125
|
+
var pageCnt = Math.ceil(itemsCnt / pageSize);
|
|
126
|
+
if (i >= pageCnt) {
|
|
127
|
+
repeat$.complete(); // final page reached
|
|
128
|
+
}
|
|
129
|
+
else if (i++ < pageCnt) {
|
|
130
|
+
setTimeout(function () {
|
|
131
|
+
repeat$.next(); // more pages to load
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return res['results'];
|
|
135
|
+
}), (0, operators_1.repeatWhen)(function () { return repeat$.asObservable(); }), (0, operators_1.reduce)(function (cum, newItems) {
|
|
136
|
+
return __spreadArray(__spreadArray([], cum, true), newItems, true);
|
|
137
|
+
}), (0, operators_1.map)(function (partsData) {
|
|
138
|
+
return partsData.map(function (partData) { return part_1.Part.fromAPIResponse(partData, part_1.DATA_ORIGIN.DATA_API); });
|
|
139
|
+
}));
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Sent request for one page of nodes
|
|
143
|
+
*
|
|
144
|
+
* @param page the current page of the pagination (1-indexed)
|
|
145
|
+
*/
|
|
146
|
+
PartServiceImpl.prototype.requestPaginatedParts = function (partiumPartIds, page) {
|
|
147
|
+
return this.httpsService.post("part_types/many", {
|
|
148
|
+
uuids: partiumPartIds,
|
|
149
|
+
}, [
|
|
150
|
+
{
|
|
151
|
+
page: page,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
page_size: this.DOWNLOAD_PAGE_SIZE,
|
|
155
|
+
},
|
|
156
|
+
], core_1.BACKEND_SERVICE.DATA);
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Order the given parts by the part-ids given in the part-id-array.
|
|
160
|
+
* If any part is not found in unorderedParts, the array contains null instead.
|
|
161
|
+
*
|
|
162
|
+
* @param unorderedParts the parts to order
|
|
163
|
+
* @param partiumPartIds the order in which to sort
|
|
164
|
+
* @returns array of given parts, ordered by partiumPartIds (contains null for parts not found)
|
|
165
|
+
*/
|
|
166
|
+
PartServiceImpl.prototype.orderParts = function (unorderedParts, partiumPartIds) {
|
|
167
|
+
var orderedParts = [];
|
|
168
|
+
var _loop_1 = function (id) {
|
|
169
|
+
orderedParts.push(unorderedParts.find(function (part) { return part && part.partiumId === id; }));
|
|
170
|
+
};
|
|
171
|
+
for (var _i = 0, partiumPartIds_1 = partiumPartIds; _i < partiumPartIds_1.length; _i++) {
|
|
172
|
+
var id = partiumPartIds_1[_i];
|
|
173
|
+
_loop_1(id);
|
|
174
|
+
}
|
|
175
|
+
return orderedParts;
|
|
176
|
+
};
|
|
177
|
+
PartServiceImpl = __decorate([
|
|
178
|
+
(0, core_1.InjectionIdentifier)('PartService')
|
|
179
|
+
], PartServiceImpl);
|
|
180
|
+
return PartServiceImpl;
|
|
181
|
+
}(core_1.BaseService));
|
|
182
|
+
exports.PartServiceImpl = PartServiceImpl;
|
|
183
|
+
//# sourceMappingURL=part.service.js.map
|
|
@@ -1,2 +1,84 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __extends = (this && this.__extends) || (function () {
|
|
4
|
+
var extendStatics = function (d, b) {
|
|
5
|
+
extendStatics = Object.setPrototypeOf ||
|
|
6
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
8
|
+
return extendStatics(d, b);
|
|
9
|
+
};
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
if (typeof b !== "function" && b !== null)
|
|
12
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
13
|
+
extendStatics(d, b);
|
|
14
|
+
function __() { this.constructor = d; }
|
|
15
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
+
};
|
|
17
|
+
})();
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.RelatedPartsServiceImpl = void 0;
|
|
26
|
+
var rxjs_1 = require("rxjs");
|
|
27
|
+
var core_1 = require("../../core");
|
|
28
|
+
var part_1 = require("../models/part");
|
|
29
|
+
var RelatedPartsServiceImpl = /** @class */ (function (_super) {
|
|
30
|
+
__extends(RelatedPartsServiceImpl, _super);
|
|
31
|
+
function RelatedPartsServiceImpl(serviceProvider) {
|
|
32
|
+
var _this = _super.call(this, serviceProvider) || this;
|
|
33
|
+
_this.PAGINATION_PAGE_SIZE = 25; // size of page when retrieving page of items and user decides when to load next page
|
|
34
|
+
return _this;
|
|
35
|
+
}
|
|
36
|
+
RelatedPartsServiceImpl.prototype.onCreate = function () {
|
|
37
|
+
this.httpsService = this.serviceProvider.getService(core_1.HttpsService);
|
|
38
|
+
};
|
|
39
|
+
RelatedPartsServiceImpl.prototype.getSummary = function (partiumPartId) {
|
|
40
|
+
return this.httpsService.get("part_types/".concat(partiumPartId, "/relations-summary"), [], core_1.BACKEND_SERVICE.DATA).pipe((0, rxjs_1.map)(function (response) { return ({
|
|
41
|
+
duplicatesCount: response.duplicates,
|
|
42
|
+
substitutesCount: response.substitutes,
|
|
43
|
+
equivalentsCount: response.equivalents,
|
|
44
|
+
notRelatedCount: response.not_related,
|
|
45
|
+
}); }));
|
|
46
|
+
};
|
|
47
|
+
RelatedPartsServiceImpl.prototype.getRelatedParts = function (partiumPartId, relationTypes, options) {
|
|
48
|
+
var _a;
|
|
49
|
+
var relationTypesArray = Array.isArray(relationTypes) ? relationTypes : [relationTypes];
|
|
50
|
+
var typeMapper = (_a = {},
|
|
51
|
+
_a[part_1.RELATION_TYPE.DUPLICATE] = 'duplicates',
|
|
52
|
+
_a[part_1.RELATION_TYPE.SUBSTITUTE] = 'substitutes',
|
|
53
|
+
_a[part_1.RELATION_TYPE.EQUIVALENT] = 'equivalents',
|
|
54
|
+
_a[part_1.RELATION_TYPE.NOT_RELATED] = 'not_related',
|
|
55
|
+
_a);
|
|
56
|
+
var urlParams = [];
|
|
57
|
+
var mappedRelationTypesArray = relationTypesArray.map(function (relationType) { return typeMapper[relationType]; });
|
|
58
|
+
mappedRelationTypesArray.map(function (relationType) { return urlParams.push({
|
|
59
|
+
relation_types: relationType,
|
|
60
|
+
}); });
|
|
61
|
+
if (options === null || options === void 0 ? void 0 : options.includeAttributes) {
|
|
62
|
+
urlParams.push({ include_attributes: options.includeAttributes });
|
|
63
|
+
}
|
|
64
|
+
return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(function (data) {
|
|
65
|
+
var relatedPart = part_1.Part.fromRelatedPartsAPIResponse(data);
|
|
66
|
+
return relatedPart;
|
|
67
|
+
}, this.httpsService, "part_types/".concat(partiumPartId, "/relations"), core_1.BACKEND_SERVICE.DATA, urlParams, this.PAGINATION_PAGE_SIZE, true);
|
|
68
|
+
};
|
|
69
|
+
RelatedPartsServiceImpl.prototype.createPartRelation = function (anchorPartId, relatedPartId, relationType) {
|
|
70
|
+
return this.httpsService.post("part_types/relations", [
|
|
71
|
+
{
|
|
72
|
+
anchor_part_uuid: anchorPartId,
|
|
73
|
+
related_part_uuid: relatedPartId,
|
|
74
|
+
type: relationType,
|
|
75
|
+
},
|
|
76
|
+
], [], core_1.BACKEND_SERVICE.DATA);
|
|
77
|
+
};
|
|
78
|
+
RelatedPartsServiceImpl = __decorate([
|
|
79
|
+
(0, core_1.InjectionIdentifier)('RelatedPartsService')
|
|
80
|
+
], RelatedPartsServiceImpl);
|
|
81
|
+
return RelatedPartsServiceImpl;
|
|
82
|
+
}(core_1.BaseService));
|
|
83
|
+
exports.RelatedPartsServiceImpl = RelatedPartsServiceImpl;
|
|
84
|
+
//# sourceMappingURL=related-parts.service.js.map
|
|
@@ -1,2 +1,153 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __extends = (this && this.__extends) || (function () {
|
|
4
|
+
var extendStatics = function (d, b) {
|
|
5
|
+
extendStatics = Object.setPrototypeOf ||
|
|
6
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
8
|
+
return extendStatics(d, b);
|
|
9
|
+
};
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
if (typeof b !== "function" && b !== null)
|
|
12
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
13
|
+
extendStatics(d, b);
|
|
14
|
+
function __() { this.constructor = d; }
|
|
15
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
+
};
|
|
17
|
+
})();
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ShoppingCartServiceImpl = void 0;
|
|
26
|
+
var rxjs_1 = require("rxjs");
|
|
27
|
+
var operators_1 = require("rxjs/operators");
|
|
28
|
+
var log_1 = require("../../core/models/log");
|
|
29
|
+
var injection_identifier_1 = require("../../core/decorators/injection-identifier");
|
|
30
|
+
var https_service_interface_1 = require("../../core/services/http/https.service.interface");
|
|
31
|
+
var base_service_1 = require("../../core/services/base.service");
|
|
32
|
+
var log_service_1 = require("../../core/services/log.service");
|
|
33
|
+
var shopping_cart_1 = require("../models/shopping-cart");
|
|
34
|
+
var core_1 = require("../../core");
|
|
35
|
+
var csa_request_1 = require("../models/csa-request");
|
|
36
|
+
var ShoppingCartServiceImpl = /** @class */ (function (_super) {
|
|
37
|
+
__extends(ShoppingCartServiceImpl, _super);
|
|
38
|
+
function ShoppingCartServiceImpl(serviceProvider) {
|
|
39
|
+
return _super.call(this, serviceProvider) || this;
|
|
40
|
+
}
|
|
41
|
+
ShoppingCartServiceImpl.prototype.onCreate = function () {
|
|
42
|
+
this.httpsService = this.serviceProvider.getService(https_service_interface_1.HttpsService);
|
|
43
|
+
this.logService = this.serviceProvider.getService(log_service_1.LogServiceImpl);
|
|
44
|
+
};
|
|
45
|
+
ShoppingCartServiceImpl.prototype.getShoppingCarts = function (urlParams) {
|
|
46
|
+
if (urlParams === void 0) { urlParams = []; }
|
|
47
|
+
return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(shopping_cart_1.ShoppingCart.fromAPIResponse, this.httpsService, "carts", https_service_interface_1.BACKEND_SERVICE.CSA, urlParams);
|
|
48
|
+
};
|
|
49
|
+
ShoppingCartServiceImpl.prototype.createEmptyShoppingCart = function (dto) {
|
|
50
|
+
return this.httpsService.post('carts', dto, [], https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0, operators_1.map)(function (cart) {
|
|
51
|
+
var shoppingCart = shopping_cart_1.ShoppingCart.fromAPIResponse(cart);
|
|
52
|
+
return shoppingCart;
|
|
53
|
+
}));
|
|
54
|
+
};
|
|
55
|
+
ShoppingCartServiceImpl.prototype.getShoppingCart = function (cartId) {
|
|
56
|
+
return this.httpsService.get("carts/".concat(cartId), [], https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0, operators_1.map)(function (cart) {
|
|
57
|
+
var shoppingCart = shopping_cart_1.ShoppingCart.fromAPIResponse(cart);
|
|
58
|
+
return shoppingCart;
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
ShoppingCartServiceImpl.prototype.getShoppingCartParts = function (cartId, urlParams) {
|
|
62
|
+
if (urlParams === void 0) { urlParams = []; }
|
|
63
|
+
return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(shopping_cart_1.ShoppingCart.fromPartAPIResponse, this.httpsService, "carts/".concat(cartId, "/parts"), https_service_interface_1.BACKEND_SERVICE.CSA, urlParams);
|
|
64
|
+
};
|
|
65
|
+
ShoppingCartServiceImpl.prototype.updateShoppingCartPart = function (cartId, updatedPart, shoppingCartEventContext) {
|
|
66
|
+
var _this = this;
|
|
67
|
+
return this.httpsService
|
|
68
|
+
.put("carts/".concat(cartId, "/parts/").concat(updatedPart.item_id), updatedPart, [], https_service_interface_1.BACKEND_SERVICE.CSA)
|
|
69
|
+
.pipe((0, operators_1.tap)(function () {
|
|
70
|
+
_this.dispatchLogService(log_1.EVENT.SHOPPING_CART_ADD_PART, {
|
|
71
|
+
partium_id: updatedPart.item_id,
|
|
72
|
+
quantity: updatedPart.quantity,
|
|
73
|
+
shopping_cart_id: cartId,
|
|
74
|
+
searchSessionId: shoppingCartEventContext === null || shoppingCartEventContext === void 0 ? void 0 : shoppingCartEventContext.searchSessionId,
|
|
75
|
+
}, shoppingCartEventContext);
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
ShoppingCartServiceImpl.prototype.requestShoppingCartOffer = function (cartId, languageUi) {
|
|
79
|
+
return this.httpsService.post("carts/".concat(cartId, "/actions/request-offer"), { language_ui: languageUi }, [], https_service_interface_1.BACKEND_SERVICE.CSA);
|
|
80
|
+
};
|
|
81
|
+
ShoppingCartServiceImpl.prototype.saveShoppingCartEcrs = function (updatedItems, shoppingCartEventContext) {
|
|
82
|
+
var _this = this;
|
|
83
|
+
var ecrs$ = [];
|
|
84
|
+
updatedItems.forEach(function (item) {
|
|
85
|
+
ecrs$.push(_this.httpsService
|
|
86
|
+
.put("requests/".concat(item.item_id, "/quantity/"), { quantity: item.quantity }, [], https_service_interface_1.BACKEND_SERVICE.CSA)
|
|
87
|
+
.pipe((0, operators_1.map)(function (csaRequestData) { return csa_request_1.CSARequest.fromAPIResponse(csaRequestData); })));
|
|
88
|
+
});
|
|
89
|
+
return (0, rxjs_1.forkJoin)(ecrs$);
|
|
90
|
+
};
|
|
91
|
+
ShoppingCartServiceImpl.prototype.saveShoppingCartParts = function (cartId, updatedParts, shoppingCartEventContext) {
|
|
92
|
+
var updatedItems = updatedParts.map(function (updatedPart) { return ({
|
|
93
|
+
item_id: updatedPart.item_id,
|
|
94
|
+
quantity: updatedPart.quantity,
|
|
95
|
+
bom_context: updatedPart.bom_context,
|
|
96
|
+
}); });
|
|
97
|
+
return this.httpsService.put("carts/".concat(cartId, "/parts"), updatedItems, [], https_service_interface_1.BACKEND_SERVICE.CSA);
|
|
98
|
+
};
|
|
99
|
+
ShoppingCartServiceImpl.prototype.addPart = function (cartId, addedPart, shoppingCartEventContext) {
|
|
100
|
+
var _this = this;
|
|
101
|
+
var addedItem = { item_id: addedPart.item_id, quantity: addedPart.quantity, bom_context: addedPart === null || addedPart === void 0 ? void 0 : addedPart.bom_context };
|
|
102
|
+
return this.httpsService.post("carts/".concat(cartId, "/parts"), addedItem, [], https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0, operators_1.tap)(function () {
|
|
103
|
+
return _this.dispatchLogService(log_1.EVENT.SHOPPING_CART_ADD_PART, {
|
|
104
|
+
partiumId: addedPart.item_id,
|
|
105
|
+
quantity: addedPart.quantity,
|
|
106
|
+
searchSessionId: shoppingCartEventContext === null || shoppingCartEventContext === void 0 ? void 0 : shoppingCartEventContext.searchSessionId,
|
|
107
|
+
shopping_cart_id: cartId,
|
|
108
|
+
}, shoppingCartEventContext);
|
|
109
|
+
}));
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Resets the requests list to an empty array of parts.
|
|
113
|
+
*/
|
|
114
|
+
ShoppingCartServiceImpl.prototype.resetShoppingCart = function (cartId, shoppingCartEventContext) {
|
|
115
|
+
var _this = this;
|
|
116
|
+
return this.httpsService.put("carts/".concat(cartId, "/parts"), [], [], https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0, operators_1.tap)(function () {
|
|
117
|
+
_this.dispatchLogService(log_1.EVENT.SHOPPING_CART_REMOVE_ALL_PARTS, { shopping_cart_id: cartId }, shoppingCartEventContext);
|
|
118
|
+
}), (0, operators_1.catchError)(function (error) {
|
|
119
|
+
return;
|
|
120
|
+
}));
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* DELETE a part from request-list without send entire list to update
|
|
124
|
+
*/
|
|
125
|
+
ShoppingCartServiceImpl.prototype.deletePart = function (cartId, partiumId, shoppingCartEventContext) {
|
|
126
|
+
var _this = this;
|
|
127
|
+
return this.httpsService.delete("carts/".concat(cartId, "/parts/").concat(partiumId), {}, [], https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0, operators_1.tap)(function () {
|
|
128
|
+
return _this.dispatchLogService(log_1.EVENT.SHOPPING_CART_REMOVE_PART, { partiumId: partiumId, shopping_cart_id: cartId }, shoppingCartEventContext);
|
|
129
|
+
}), (0, operators_1.map)(function () { return true; }));
|
|
130
|
+
};
|
|
131
|
+
ShoppingCartServiceImpl.prototype.exportShoppingCartAsEmail = function (cartId, recipients, subject, message) {
|
|
132
|
+
return this.httpsService.post("carts/".concat(cartId, "/actions/email"), { recipients: recipients, subject: subject, message: message }, [], https_service_interface_1.BACKEND_SERVICE.CSA);
|
|
133
|
+
};
|
|
134
|
+
ShoppingCartServiceImpl.prototype.dispatchLogService = function (event, data, shoppingCartEventContext) {
|
|
135
|
+
this.logService
|
|
136
|
+
.logEvent(new log_1.EventLog({
|
|
137
|
+
version: log_1.EVENTLOG_VERSIONS.V_2_0_0,
|
|
138
|
+
organizationId: shoppingCartEventContext === null || shoppingCartEventContext === void 0 ? void 0 : shoppingCartEventContext.organizationId,
|
|
139
|
+
interface: (shoppingCartEventContext === null || shoppingCartEventContext === void 0 ? void 0 : shoppingCartEventContext.eventInterface) || log_1.INTERFACE.API_ACCESS,
|
|
140
|
+
event: event,
|
|
141
|
+
data: data,
|
|
142
|
+
}))
|
|
143
|
+
.subscribe(function () { }, function (error) {
|
|
144
|
+
console.log('Error while sending log event: ', error);
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
ShoppingCartServiceImpl = __decorate([
|
|
148
|
+
(0, injection_identifier_1.InjectionIdentifier)('ShoppingCartService')
|
|
149
|
+
], ShoppingCartServiceImpl);
|
|
150
|
+
return ShoppingCartServiceImpl;
|
|
151
|
+
}(base_service_1.BaseService));
|
|
152
|
+
exports.ShoppingCartServiceImpl = ShoppingCartServiceImpl;
|
|
153
|
+
//# sourceMappingURL=shopping-cart.service.js.map
|
package/find/index.js
CHANGED
|
@@ -1,2 +1,52 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./models/tagable/i18n-tagable"), exports);
|
|
19
|
+
__exportStar(require("./models/tagable/tagable-base"), exports);
|
|
20
|
+
__exportStar(require("./models/tagable/tagable"), exports);
|
|
21
|
+
__exportStar(require("./models/text-search-result-item/text-search-result-item-unknown"), exports);
|
|
22
|
+
__exportStar(require("./models/text-search-result-item/text-search-result-item-part"), exports);
|
|
23
|
+
__exportStar(require("./models/text-search-result-item/text-search-result-item-document"), exports);
|
|
24
|
+
__exportStar(require("./models/text-search-result-item/text-search-result-item-recent-query"), exports);
|
|
25
|
+
__exportStar(require("./models/text-search-result-item/text-search-error"), exports);
|
|
26
|
+
__exportStar(require("./models/text-search-result-item/text-search-result-item"), exports);
|
|
27
|
+
__exportStar(require("./models/smart-filter"), exports);
|
|
28
|
+
__exportStar(require("./models/search-status/text-search-status"), exports);
|
|
29
|
+
__exportStar(require("./models/search-status/cv-search-status"), exports);
|
|
30
|
+
__exportStar(require("./models/search-status/search-filter-status"), exports);
|
|
31
|
+
__exportStar(require("./models/search-status/search-status"), exports);
|
|
32
|
+
__exportStar(require("./models/search-status/tag-search-status"), exports);
|
|
33
|
+
__exportStar(require("./models/search-filter"), exports);
|
|
34
|
+
__exportStar(require("./models/text-search-manipulator"), exports);
|
|
35
|
+
__exportStar(require("./models/assets/asset"), exports);
|
|
36
|
+
__exportStar(require("./models/text-search-config"), exports);
|
|
37
|
+
__exportStar(require("./models/search-session-log-object"), exports);
|
|
38
|
+
__exportStar(require("./models/search-tag"), exports);
|
|
39
|
+
__exportStar(require("./models/search-result-status"), exports);
|
|
40
|
+
__exportStar(require("./models/search-input"), exports);
|
|
41
|
+
__exportStar(require("./models/search-output"), exports);
|
|
42
|
+
__exportStar(require("./services/search-filter.service"), exports);
|
|
43
|
+
__exportStar(require("./services/search/search.service"), exports);
|
|
44
|
+
__exportStar(require("./services/search/search-result.service"), exports);
|
|
45
|
+
__exportStar(require("./services/search/text-search.service"), exports);
|
|
46
|
+
__exportStar(require("./services/search/cv-search.service"), exports);
|
|
47
|
+
__exportStar(require("./services/filter-uploaders/filter-uploader"), exports);
|
|
48
|
+
__exportStar(require("./services/filter-uploaders/update-filters-uploader"), exports);
|
|
49
|
+
__exportStar(require("./services/asset.service"), exports);
|
|
50
|
+
__exportStar(require("./services/search/tag-search.service"), exports);
|
|
51
|
+
__exportStar(require("./services/search/recent-text-search-queries.service"), exports);
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,33 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Asset = exports.ASSET_STATUS = void 0;
|
|
5
|
+
var ASSET_STATUS;
|
|
6
|
+
(function (ASSET_STATUS) {
|
|
7
|
+
ASSET_STATUS[ASSET_STATUS["NEW"] = 0] = "NEW";
|
|
8
|
+
ASSET_STATUS[ASSET_STATUS["PREPARING"] = 1] = "PREPARING";
|
|
9
|
+
ASSET_STATUS[ASSET_STATUS["PREPARED"] = 2] = "PREPARED";
|
|
10
|
+
ASSET_STATUS[ASSET_STATUS["UPLOADING"] = 3] = "UPLOADING";
|
|
11
|
+
ASSET_STATUS[ASSET_STATUS["UPLOADED"] = 4] = "UPLOADED";
|
|
12
|
+
ASSET_STATUS[ASSET_STATUS["VERIFYING"] = 5] = "VERIFYING";
|
|
13
|
+
ASSET_STATUS[ASSET_STATUS["VERIFIED"] = 6] = "VERIFIED";
|
|
14
|
+
ASSET_STATUS[ASSET_STATUS["ERROR"] = 7] = "ERROR"; // an error occurred
|
|
15
|
+
})(ASSET_STATUS || (exports.ASSET_STATUS = ASSET_STATUS = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Asset of any type that exists in the Partium ecosystem.
|
|
18
|
+
*/
|
|
19
|
+
var Asset = /** @class */ (function () {
|
|
20
|
+
function Asset(file) {
|
|
21
|
+
this.file = file;
|
|
22
|
+
this.status = ASSET_STATUS.NEW;
|
|
23
|
+
}
|
|
24
|
+
Asset.prototype.setStatus = function (newStatus) {
|
|
25
|
+
this.status = newStatus;
|
|
26
|
+
};
|
|
27
|
+
Asset.prototype.getStatus = function () {
|
|
28
|
+
return this.status;
|
|
29
|
+
};
|
|
30
|
+
return Asset;
|
|
31
|
+
}());
|
|
32
|
+
exports.Asset = Asset;
|
|
33
|
+
//# sourceMappingURL=asset.js.map
|