@partium/js-sdk 14.4.1 → 14.5.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/catalog/index.js +1 -21
- package/catalog/models/catalog-image-info.js +1 -22
- package/catalog/models/catalog-image.js +1 -40
- package/catalog/models/upsert-catalog-images-dto.js +1 -3
- package/catalog/models/upsert-images-result.js +1 -3
- package/catalog/services/images.service.js +1 -62
- package/core/constants/constants.d.ts +1 -0
- package/core/constants/constants.js +1 -16
- package/core/decorators/injection-identifier.js +1 -19
- package/core/factories/paginated-request-service.factory.js +1 -33
- package/core/index.js +1 -63
- package/core/integration-defaults/http/fetch-api-http-error-helper.js +1 -129
- package/core/integration-defaults/http/file-transfer/axios-file-transfer.service.js +1 -138
- package/core/integration-defaults/http/file-transfer/fetch-api-file-transfer.service.js +1 -210
- package/core/integration-defaults/http/handle-axios-error-helper.js +1 -79
- package/core/integration-defaults/http/https-client/axios-https-client.service.js +1 -182
- package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +1 -198
- package/core/integration-defaults/http/js-oauth-keycloak-https.service.js +1 -32
- package/core/integration-defaults/js-p-file.js +1 -36
- package/core/integration-defaults/session/js-oauth-api-key-session.service.js +1 -206
- package/core/integration-defaults/session/js-oauth-keycloak-auth-config.js +1 -64
- package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +1 -257
- package/core/integration-defaults/web-device-status.service.js +1 -125
- package/core/integration-defaults/web-file.service.js +1 -135
- package/core/integration-defaults/web-indexeddb.service.js +1 -142
- package/core/integration-defaults/web-local-storage.service.js +1 -310
- package/core/models/api-object.js +1 -16
- package/core/models/auth-config.js +1 -72
- package/core/models/device-info.js +1 -34
- package/core/models/error.js +1 -107
- package/core/models/formatted-string.js +1 -14
- package/core/models/i18n-map.js +1 -61
- package/core/models/i18n-string.js +1 -35
- package/core/models/log.js +1 -137
- package/core/models/organization.js +1 -159
- package/core/models/p-file.js +1 -23
- package/core/models/paginated-list.js +1 -41
- package/core/models/partium-config.js +1 -43
- package/core/models/user-token.js +1 -11
- package/core/models/user.js +1 -89
- package/core/services/backend-status.service.js +1 -147
- package/core/services/base-login-init.service.js +1 -57
- package/core/services/base.service.js +1 -37
- package/core/services/device-status.service.interface.js +1 -117
- package/core/services/file.service.interface.js +1 -61
- package/core/services/http/file-transfer/file-transfer.service.interface.js +1 -125
- package/core/services/http/https-client/https-client.service.interface.js +1 -152
- package/core/services/http/https.service.interface.d.ts +3 -1
- package/core/services/http/https.service.interface.js +1 -294
- package/core/services/http/oauth-https.service.js +1 -218
- package/core/services/local-storage.service.interface.js +1 -378
- package/core/services/log.service.js +1 -139
- package/core/services/organization.service.js +1 -202
- package/core/services/paginated-request.service.js +1 -154
- package/core/services/recent-parts.service.js +1 -194
- package/core/services/service-provider.js +1 -114
- package/core/services/session/oauth-session.service.js +1 -104
- package/core/services/session/session.service.interface.js +1 -367
- package/core/utils/general-helper.js +1 -110
- package/data/index.js +1 -44
- package/data/models/announcement.js +1 -70
- package/data/models/assembly-hierarchy-node-breadcrumb.js +1 -51
- package/data/models/assembly-hierarchy-node.js +1 -46
- package/data/models/attribute.js +1 -106
- package/data/models/csa-request-search.js +1 -46
- package/data/models/csa-request-status.js +1 -51
- package/data/models/csa-request.js +1 -112
- package/data/models/document.js +1 -17
- package/data/models/filter-key.js +1 -36
- package/data/models/filter-option-value.js +1 -41
- package/data/models/image.js +1 -77
- package/data/models/inquiry.js +1 -71
- package/data/models/mounting-location.js +1 -58
- package/data/models/multiple-expert-searches.js +1 -40
- package/data/models/part-enrichment-data.js +1 -50
- package/data/models/part.d.ts +1 -1
- package/data/models/part.js +1 -168
- package/data/models/shopping-cart.js +1 -60
- package/data/services/announcement.service.js +1 -89
- package/data/services/assembly-hierarchy-nodes.service.js +1 -193
- package/data/services/csa-helper.service.js +1 -158
- package/data/services/customer-service-assistance.service.js +1 -276
- package/data/services/filter.service.js +1 -97
- package/data/services/inquiry.service.js +1 -68
- package/data/services/part-attribute.service.js +1 -118
- package/data/services/part-enrichment.service.js +1 -56
- package/data/services/part.service.js +1 -182
- package/data/services/related-parts.service.js +1 -83
- package/data/services/shopping-cart.service.js +1 -152
- package/datacuration/index.d.ts +4 -0
- package/datacuration/index.js +2 -0
- package/datacuration/models/image-submission-request.d.ts +55 -0
- package/datacuration/models/image-submission-request.js +2 -0
- package/datacuration/models/submitted-image-response.d.ts +27 -0
- package/datacuration/models/submitted-image-response.js +2 -0
- package/datacuration/services/image-submission.service.d.ts +26 -0
- package/datacuration/services/image-submission.service.js +2 -0
- package/find/index.js +1 -51
- package/find/models/assets/asset.js +1 -32
- package/find/models/search-filter.js +1 -205
- package/find/models/search-input.js +1 -3
- package/find/models/search-output.js +1 -3
- package/find/models/search-result-status.js +1 -40
- package/find/models/search-session-log-object.js +1 -22
- package/find/models/search-status/cv-search-status.js +1 -22
- package/find/models/search-status/search-filter-status.js +1 -36
- package/find/models/search-status/search-status.js +1 -56
- package/find/models/search-status/tag-search-status.js +1 -23
- package/find/models/search-status/text-search-status.js +1 -18
- package/find/models/search-tag.js +1 -16
- package/find/models/smart-filter.js +1 -49
- package/find/models/tagable/i18n-tagable.js +1 -37
- package/find/models/tagable/tagable-base.js +1 -22
- package/find/models/tagable/tagable.js +1 -37
- package/find/models/text-search-config.js +1 -70
- package/find/models/text-search-manipulator.js +1 -90
- package/find/models/text-search-result-item/text-search-error.js +1 -12
- package/find/models/text-search-result-item/text-search-result-item-document.js +1 -34
- package/find/models/text-search-result-item/text-search-result-item-part.js +1 -36
- package/find/models/text-search-result-item/text-search-result-item-recent-query.js +1 -35
- package/find/models/text-search-result-item/text-search-result-item-unknown.js +1 -38
- package/find/models/text-search-result-item/text-search-result-item.js +1 -22
- package/find/services/asset.service.js +1 -348
- package/find/services/filter-uploaders/filter-uploader.js +1 -3
- package/find/services/filter-uploaders/update-filters-uploader.js +1 -77
- package/find/services/filter-uploaders/update-filters.model.js +1 -7
- package/find/services/search/cv-search.service.js +1 -214
- package/find/services/search/recent-text-search-queries.service.js +1 -260
- package/find/services/search/search-result.service.js +1 -539
- package/find/services/search/search.service.js +1 -514
- package/find/services/search/tag-search.service.js +1 -124
- package/find/services/search/text-search.service.js +1 -316
- package/find/services/search-filter.service.js +1 -292
- package/find/utils/search-helper.js +1 -75
- package/gen/sdk-version.d.ts +1 -1
- package/gen/sdk-version.js +1 -5
- package/index.d.ts +2 -0
- package/index.js +1 -392
- package/management/index.js +1 -21
- package/management/models/api-key-list-response.js +1 -3
- package/management/models/api-key-type.js +1 -9
- package/management/models/api-key.js +1 -3
- package/management/services/api-key.service.js +1 -53
- package/ocr/index.js +1 -20
- package/ocr/models/detect-response.js +1 -3
- package/ocr/models/detected-text-entry.js +1 -3
- package/ocr/services/ocr.service.js +1 -59
- package/package.json +1 -1
- package/user-data/index.js +1 -21
- package/user-data/models/part-with-nullable.js +1 -3
- package/user-data/models/request-list/request-list.js +1 -63
- package/user-data/services/favorite/favorite.service.js +1 -108
- package/user-data/services/request-list/request-list.service.js +1 -133
|
@@ -1,52 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.AssemblyHierarchyNodeBreadcrumb = void 0;
|
|
20
|
-
var core_1 = require("../../core");
|
|
21
|
-
var AssemblyHierarchyNodeBreadcrumb = /** @class */ (function (_super) {
|
|
22
|
-
__extends(AssemblyHierarchyNodeBreadcrumb, _super);
|
|
23
|
-
function AssemblyHierarchyNodeBreadcrumb(init) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
Object.assign(_this, init);
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
AssemblyHierarchyNodeBreadcrumb.serialize = function (breadcrumb) {
|
|
29
|
-
var serializationObj = {};
|
|
30
|
-
serializationObj['partiumId'] = breadcrumb.partiumId;
|
|
31
|
-
if (breadcrumb.name) {
|
|
32
|
-
serializationObj['name'] = breadcrumb.name.getAsObject();
|
|
33
|
-
}
|
|
34
|
-
return JSON.stringify(serializationObj);
|
|
35
|
-
};
|
|
36
|
-
AssemblyHierarchyNodeBreadcrumb.deserialize = function (serialized) {
|
|
37
|
-
var breadcrumbData = {};
|
|
38
|
-
var deserialized = JSON.parse(serialized);
|
|
39
|
-
breadcrumbData['partiumId'] = deserialized['partiumId'];
|
|
40
|
-
breadcrumbData['name'] = new core_1.i18nString(deserialized['name']);
|
|
41
|
-
return new AssemblyHierarchyNodeBreadcrumb(breadcrumbData);
|
|
42
|
-
};
|
|
43
|
-
AssemblyHierarchyNodeBreadcrumb.fromAPIResponse = function (breadcrumbData) {
|
|
44
|
-
return new AssemblyHierarchyNodeBreadcrumb({
|
|
45
|
-
partiumId: breadcrumbData['uuid'],
|
|
46
|
-
name: new core_1.i18nString(breadcrumbData['name']),
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return AssemblyHierarchyNodeBreadcrumb;
|
|
50
|
-
}(core_1.APIObject));
|
|
51
|
-
exports.AssemblyHierarchyNodeBreadcrumb = AssemblyHierarchyNodeBreadcrumb;
|
|
52
|
-
//# sourceMappingURL=assembly-hierarchy-node-breadcrumb.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},e(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.AssemblyHierarchyNodeBreadcrumb=void 0;var core_1=require("../../core"),AssemblyHierarchyNodeBreadcrumb=function(e){function r(r){var t=e.call(this)||this;return Object.assign(t,r),t}return __extends(r,e),r.serialize=function(e){var r={};return r.partiumId=e.partiumId,e.name&&(r.name=e.name.getAsObject()),JSON.stringify(r)},r.deserialize=function(e){var t={},n=JSON.parse(e);return t.partiumId=n.partiumId,t.name=new core_1.i18nString(n.name),new r(t)},r.fromAPIResponse=function(e){return new r({partiumId:e.uuid,name:new core_1.i18nString(e.name)})},r}(core_1.APIObject);exports.AssemblyHierarchyNodeBreadcrumb=AssemblyHierarchyNodeBreadcrumb;
|
|
@@ -1,47 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.AssemblyHierarchyNode = void 0;
|
|
20
|
-
var core_1 = require("../../core");
|
|
21
|
-
var assembly_hierarchy_node_breadcrumb_1 = require("./assembly-hierarchy-node-breadcrumb");
|
|
22
|
-
var AssemblyHierarchyNode = /** @class */ (function (_super) {
|
|
23
|
-
__extends(AssemblyHierarchyNode, _super);
|
|
24
|
-
function AssemblyHierarchyNode(init) {
|
|
25
|
-
var _this = _super.call(this) || this;
|
|
26
|
-
Object.assign(_this, init);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
AssemblyHierarchyNode.prototype.updateNode = function (update) {
|
|
30
|
-
Object.assign(this, update);
|
|
31
|
-
};
|
|
32
|
-
AssemblyHierarchyNode.fromAPIResponse = function (nodeData) {
|
|
33
|
-
return new AssemblyHierarchyNode({
|
|
34
|
-
partiumId: nodeData['uuid'],
|
|
35
|
-
externalId: nodeData['external_id'],
|
|
36
|
-
externalPayload: nodeData['metadata'],
|
|
37
|
-
name: new core_1.i18nString(nodeData['name']),
|
|
38
|
-
partTypeCount: nodeData['part_type_count'],
|
|
39
|
-
parentId: nodeData['parent'] && nodeData['parent']['uuid'],
|
|
40
|
-
breadcrumbs: nodeData['tree'] ? nodeData['tree'].map(function (breadcrumb) { return assembly_hierarchy_node_breadcrumb_1.AssemblyHierarchyNodeBreadcrumb.fromAPIResponse(breadcrumb); }) : [],
|
|
41
|
-
childCount: nodeData['children'] ? nodeData['children'].length : 0, // TODO should be changed, as soon as Data provides this feature, to: childCount: nodeData[ 'child_count' ] ? && nodeData[ 'child_count' ] : 0,
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
return AssemblyHierarchyNode;
|
|
45
|
-
}(core_1.APIObject));
|
|
46
|
-
exports.AssemblyHierarchyNode = AssemblyHierarchyNode;
|
|
47
|
-
//# sourceMappingURL=assembly-hierarchy-node.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},e(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.AssemblyHierarchyNode=void 0;var core_1=require("../../core"),assembly_hierarchy_node_breadcrumb_1=require("./assembly-hierarchy-node-breadcrumb"),AssemblyHierarchyNode=function(e){function r(r){var t=e.call(this)||this;return Object.assign(t,r),t}return __extends(r,e),r.prototype.updateNode=function(e){Object.assign(this,e)},r.fromAPIResponse=function(e){return new r({partiumId:e.uuid,externalId:e.external_id,externalPayload:e.metadata,name:new core_1.i18nString(e.name),partTypeCount:e.part_type_count,parentId:e.parent&&e.parent.uuid,breadcrumbs:e.tree?e.tree.map((function(e){return assembly_hierarchy_node_breadcrumb_1.AssemblyHierarchyNodeBreadcrumb.fromAPIResponse(e)})):[],childCount:e.children?e.children.length:0})},r}(core_1.APIObject);exports.AssemblyHierarchyNode=AssemblyHierarchyNode;
|
package/data/models/attribute.js
CHANGED
|
@@ -1,107 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.Attribute = exports.AttributeType = void 0;
|
|
31
|
-
var core_1 = require("../../core");
|
|
32
|
-
var part_1 = require("./part");
|
|
33
|
-
var AttributeType;
|
|
34
|
-
(function (AttributeType) {
|
|
35
|
-
AttributeType["KVP"] = "kvp";
|
|
36
|
-
AttributeType["PER_ORG"] = "per_org";
|
|
37
|
-
})(AttributeType || (exports.AttributeType = AttributeType = {}));
|
|
38
|
-
var Attribute = /** @class */ (function (_super) {
|
|
39
|
-
__extends(Attribute, _super);
|
|
40
|
-
function Attribute(init) {
|
|
41
|
-
var _this = _super.call(this) || this;
|
|
42
|
-
Object.assign(_this, init);
|
|
43
|
-
return _this;
|
|
44
|
-
}
|
|
45
|
-
Attribute.prototype.updateAttribute = function (update) {
|
|
46
|
-
Object.assign(this, update);
|
|
47
|
-
};
|
|
48
|
-
Attribute.prototype.getAttributeWithValue = function (attributeValue) {
|
|
49
|
-
return __assign(__assign({}, this), { value: attributeValue });
|
|
50
|
-
};
|
|
51
|
-
Attribute.fromAPIResponse = function (attributeFromAPI, dataOrigin) {
|
|
52
|
-
var _a;
|
|
53
|
-
if (dataOrigin === void 0) { dataOrigin = part_1.DATA_ORIGIN.DATA_API; }
|
|
54
|
-
if (dataOrigin === part_1.DATA_ORIGIN.DATA_API) {
|
|
55
|
-
var data = attributeFromAPI;
|
|
56
|
-
var partiumId = data.uuid;
|
|
57
|
-
var metadata = data.metadata;
|
|
58
|
-
var value = data.value;
|
|
59
|
-
var externalId = data.external_id;
|
|
60
|
-
var organization = data.organization;
|
|
61
|
-
var type = data.type;
|
|
62
|
-
var options = data.options;
|
|
63
|
-
return new Attribute(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (partiumId && {
|
|
64
|
-
partiumId: partiumId,
|
|
65
|
-
})), (metadata && {
|
|
66
|
-
metadata: metadata,
|
|
67
|
-
})), { name: new core_1.i18nString(data.name) }), (externalId && {
|
|
68
|
-
externalId: externalId,
|
|
69
|
-
})), (value && {
|
|
70
|
-
value: value instanceof Object ? new core_1.i18nString(value) : value.toString(),
|
|
71
|
-
})), (organization && {
|
|
72
|
-
organization: new core_1.Organization({
|
|
73
|
-
partiumId: organization.uuid,
|
|
74
|
-
name: organization.name,
|
|
75
|
-
displayName: organization.name,
|
|
76
|
-
}),
|
|
77
|
-
})), (type && {
|
|
78
|
-
type: type,
|
|
79
|
-
})), { options: options
|
|
80
|
-
? options.map(function (option) { return ({
|
|
81
|
-
organization: new core_1.Organization({
|
|
82
|
-
partiumId: option['organization'] ? option['organization']['uuid'] : null,
|
|
83
|
-
name: option['organization'] ? option['organization']['name'] : null,
|
|
84
|
-
displayName: option['organization'] ? option['organization']['name'] : null,
|
|
85
|
-
}),
|
|
86
|
-
value: new core_1.i18nString(option['value']),
|
|
87
|
-
expansion: new core_1.i18nString(option['expansion']),
|
|
88
|
-
}); })
|
|
89
|
-
: [] }));
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
var data_1 = attributeFromAPI;
|
|
93
|
-
return new Attribute({
|
|
94
|
-
name: new core_1.i18nString((_a = {}, _a[data_1.language] = data_1.label, _a)),
|
|
95
|
-
options: data_1.values.map(function (value) {
|
|
96
|
-
var _a;
|
|
97
|
-
return ({
|
|
98
|
-
value: new core_1.i18nString((_a = {}, _a[data_1.language] = value, _a)),
|
|
99
|
-
});
|
|
100
|
-
}),
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
return Attribute;
|
|
105
|
-
}(core_1.APIObject));
|
|
106
|
-
exports.Attribute = Attribute;
|
|
107
|
-
//# sourceMappingURL=attribute.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Attribute=exports.AttributeType=void 0;var AttributeType,core_1=require("../../core"),part_1=require("./part");!function(t){t.KVP="kvp",t.PER_ORG="per_org"}(AttributeType||(exports.AttributeType=AttributeType={}));var Attribute=function(t){function n(n){var e=t.call(this)||this;return Object.assign(e,n),e}return __extends(n,t),n.prototype.updateAttribute=function(t){Object.assign(this,t)},n.prototype.getAttributeWithValue=function(t){return __assign(__assign({},this),{value:t})},n.fromAPIResponse=function(t,e){var r;if(void 0===e&&(e=part_1.DATA_ORIGIN.DATA_API),e===part_1.DATA_ORIGIN.DATA_API){var i=t,a=i.uuid,o=i.metadata,s=i.value,u=i.external_id,_=i.organization,p=i.type,c=i.options;return new n(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({},a&&{partiumId:a}),o&&{metadata:o}),{name:new core_1.i18nString(i.name)}),u&&{externalId:u}),s&&{value:s instanceof Object?new core_1.i18nString(s):s.toString()}),_&&{organization:new core_1.Organization({partiumId:_.uuid,name:_.name,displayName:_.name})}),p&&{type:p}),{options:c?c.map((function(t){return{organization:new core_1.Organization({partiumId:t.organization?t.organization.uuid:null,name:t.organization?t.organization.name:null,displayName:t.organization?t.organization.name:null}),value:new core_1.i18nString(t.value),expansion:new core_1.i18nString(t.expansion)}})):[]}))}var g=t;return new n({name:new core_1.i18nString((r={},r[g.language]=g.label,r)),options:g.values.map((function(t){var n;return{value:new core_1.i18nString((n={},n[g.language]=t,n))}}))})},n}(core_1.APIObject);exports.Attribute=Attribute;
|
|
@@ -1,47 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.CSARequestSearch = void 0;
|
|
31
|
-
var core_1 = require("../../core");
|
|
32
|
-
var general_helper_1 = require("../../core/utils/general-helper");
|
|
33
|
-
var CSARequestSearch = /** @class */ (function (_super) {
|
|
34
|
-
__extends(CSARequestSearch, _super);
|
|
35
|
-
function CSARequestSearch(init) {
|
|
36
|
-
var _this = _super.call(this) || this;
|
|
37
|
-
Object.assign(_this, init);
|
|
38
|
-
return _this;
|
|
39
|
-
}
|
|
40
|
-
CSARequestSearch.fromAPIResponse = function (requestData) {
|
|
41
|
-
var requestDataCamelCase = (0, general_helper_1.snakeToCamelCase)(requestData);
|
|
42
|
-
return new CSARequestSearch(__assign({}, requestDataCamelCase));
|
|
43
|
-
};
|
|
44
|
-
return CSARequestSearch;
|
|
45
|
-
}(core_1.APIObject));
|
|
46
|
-
exports.CSARequestSearch = CSARequestSearch;
|
|
47
|
-
//# sourceMappingURL=csa-request-search.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CSARequestSearch=void 0;var core_1=require("../../core"),general_helper_1=require("../../core/utils/general-helper"),CSARequestSearch=function(e){function t(t){var r=e.call(this)||this;return Object.assign(r,t),r}return __extends(t,e),t.fromAPIResponse=function(e){var r=(0,general_helper_1.snakeToCamelCase)(e);return new t(__assign({},r))},t}(core_1.APIObject);exports.CSARequestSearch=CSARequestSearch;
|
|
@@ -1,52 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.CSARequestStatus = exports.CSA_REQUEST_STATUS = void 0;
|
|
20
|
-
var core_1 = require("../../core");
|
|
21
|
-
var CSA_REQUEST_STATUS;
|
|
22
|
-
(function (CSA_REQUEST_STATUS) {
|
|
23
|
-
CSA_REQUEST_STATUS["NEW"] = "new";
|
|
24
|
-
CSA_REQUEST_STATUS["OPENED"] = "opened";
|
|
25
|
-
CSA_REQUEST_STATUS["RESOLVED"] = "resolved";
|
|
26
|
-
CSA_REQUEST_STATUS["NOT_RESOLVED"] = "not_resolved";
|
|
27
|
-
})(CSA_REQUEST_STATUS || (exports.CSA_REQUEST_STATUS = CSA_REQUEST_STATUS = {}));
|
|
28
|
-
var CSARequestStatus = /** @class */ (function (_super) {
|
|
29
|
-
__extends(CSARequestStatus, _super);
|
|
30
|
-
function CSARequestStatus(init) {
|
|
31
|
-
var _this = _super.call(this) || this;
|
|
32
|
-
Object.assign(_this, init);
|
|
33
|
-
return _this;
|
|
34
|
-
}
|
|
35
|
-
CSARequestStatus.serialize = function (request) {
|
|
36
|
-
var serializationObj = {};
|
|
37
|
-
serializationObj['timestamp'] = request.timestamp;
|
|
38
|
-
serializationObj['confirmedPart'] = request.confirmedPart;
|
|
39
|
-
serializationObj['status'] = request.status;
|
|
40
|
-
return JSON.stringify(serializationObj);
|
|
41
|
-
};
|
|
42
|
-
CSARequestStatus.fromAPIResponse = function (requestData) {
|
|
43
|
-
return new CSARequestStatus({
|
|
44
|
-
timestamp: requestData['timestamp'],
|
|
45
|
-
status: requestData['status'],
|
|
46
|
-
confirmedPart: requestData['confirmed_part'] ? requestData['confirmed_part'] : null,
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return CSARequestStatus;
|
|
50
|
-
}(core_1.APIObject));
|
|
51
|
-
exports.CSARequestStatus = CSARequestStatus;
|
|
52
|
-
//# sourceMappingURL=csa-request-status.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.CSARequestStatus=exports.CSA_REQUEST_STATUS=void 0;var CSA_REQUEST_STATUS,core_1=require("../../core");!function(t){t.NEW="new",t.OPENED="opened",t.RESOLVED="resolved",t.NOT_RESOLVED="not_resolved"}(CSA_REQUEST_STATUS||(exports.CSA_REQUEST_STATUS=CSA_REQUEST_STATUS={}));var CSARequestStatus=function(t){function e(e){var r=t.call(this)||this;return Object.assign(r,e),r}return __extends(e,t),e.serialize=function(t){var e={};return e.timestamp=t.timestamp,e.confirmedPart=t.confirmedPart,e.status=t.status,JSON.stringify(e)},e.fromAPIResponse=function(t){return new e({timestamp:t.timestamp,status:t.status,confirmedPart:t.confirmed_part?t.confirmed_part:null})},e}(core_1.APIObject);exports.CSARequestStatus=CSARequestStatus;
|
|
@@ -1,113 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.CSARequest = exports.RequestType = void 0;
|
|
31
|
-
var api_object_1 = require("../../core/models/api-object");
|
|
32
|
-
var i18n_string_1 = require("../../core/models/i18n-string");
|
|
33
|
-
var search_filter_1 = require("../../find/models/search-filter");
|
|
34
|
-
var text_search_service_1 = require("../../find/services/search/text-search.service");
|
|
35
|
-
var assembly_hierarchy_node_1 = require("./assembly-hierarchy-node");
|
|
36
|
-
var assembly_hierarchy_node_breadcrumb_1 = require("./assembly-hierarchy-node-breadcrumb");
|
|
37
|
-
var part_1 = require("./part");
|
|
38
|
-
var RequestType;
|
|
39
|
-
(function (RequestType) {
|
|
40
|
-
RequestType["CONFIRMATION"] = "confirmation";
|
|
41
|
-
RequestType["HELP"] = "help";
|
|
42
|
-
})(RequestType || (exports.RequestType = RequestType = {}));
|
|
43
|
-
var CSARequest = /** @class */ (function (_super) {
|
|
44
|
-
__extends(CSARequest, _super);
|
|
45
|
-
function CSARequest(init) {
|
|
46
|
-
var _this = _super.call(this) || this;
|
|
47
|
-
Object.assign(_this, init);
|
|
48
|
-
return _this;
|
|
49
|
-
}
|
|
50
|
-
CSARequest.fromAPIResponse = function (requestData) {
|
|
51
|
-
var _a, _b;
|
|
52
|
-
var _c, _d;
|
|
53
|
-
var textQueryValue = requestData['request_data'] && requestData['request_data']['text_query'];
|
|
54
|
-
if (!textQueryValue && ((_c = requestData['request_data']) === null || _c === void 0 ? void 0 : _c['text_search'])) {
|
|
55
|
-
//Fallback for legacy CSA-requests, when text_search-object was set instead of text_query
|
|
56
|
-
textQueryValue = "".concat(requestData['request_data']['text_search']['semantic_text'] || '', " ").concat(requestData['request_data']['text_search']['exact_text'] || '').trim();
|
|
57
|
-
}
|
|
58
|
-
return new CSARequest(__assign(__assign({ partiumId: requestData['request_id'], cartId: requestData['cart_uuid'], inquiryId: requestData['inquiry_id'], requestType: requestData['request_data']['part'] ? RequestType.CONFIRMATION : RequestType.HELP, organizationId: requestData['organization_id'], created: requestData['created'], contactEmail: requestData['contact_email'], language: requestData['language'], status: requestData['status'], statusTimestamp: requestData['status_timestamp'], confirmedPart: requestData['confirmed_part'], part: requestData['request_data'] &&
|
|
59
|
-
requestData['request_data']['part'] &&
|
|
60
|
-
requestData['request_data']['part']['part_id']
|
|
61
|
-
? new part_1.Part({
|
|
62
|
-
partiumId: requestData['request_data']['part']['part_id'],
|
|
63
|
-
externalId: requestData['request_data']['part']['part_external_id'],
|
|
64
|
-
name: new i18n_string_1.i18nString((_a = {}, _a[requestData['language']] = requestData['request_data']['part']['part_name'], _a)),
|
|
65
|
-
dataOrigin: part_1.DATA_ORIGIN.PARTIAL,
|
|
66
|
-
})
|
|
67
|
-
: null, message: requestData['request_data'] && requestData['request_data']['user_input'], quantity: requestData['quantity'], additionalAssetIds: requestData['request_data'] && requestData['request_data']['media_assets'], searchSessionId: requestData['session_id'], textQuery: textQueryValue }, (((_d = requestData['request_data']) === null || _d === void 0 ? void 0 : _d['text_search'])
|
|
68
|
-
? {
|
|
69
|
-
textQueries: (_b = {},
|
|
70
|
-
_b[text_search_service_1.TEXT_SEARCH_TYPE.SEMANTIC] = requestData['request_data']['text_search']['semantic_text'] || '',
|
|
71
|
-
_b[text_search_service_1.TEXT_SEARCH_TYPE.EXACT] = requestData['request_data']['text_search']['exact_text'] || '',
|
|
72
|
-
_b),
|
|
73
|
-
}
|
|
74
|
-
: {})), { queryImageAssetId: requestData['request_data'] && requestData['request_data']['query_image_asset'], resultParts: requestData['request_data'] && requestData['request_data']['result_list']
|
|
75
|
-
? requestData['request_data']['result_list'].map(function (partData) {
|
|
76
|
-
var _a;
|
|
77
|
-
return new part_1.Part({
|
|
78
|
-
partiumId: partData['part_id'],
|
|
79
|
-
externalId: partData['part_external_id'],
|
|
80
|
-
name: new i18n_string_1.i18nString((_a = {}, _a[requestData['language']] = partData['part_name'], _a)),
|
|
81
|
-
dataOrigin: part_1.DATA_ORIGIN.PARTIAL,
|
|
82
|
-
});
|
|
83
|
-
})
|
|
84
|
-
: null, assemblies: requestData['request_data'] && requestData['request_data']['assemblies']
|
|
85
|
-
? requestData['request_data']['assemblies'].map(function (assemblyData) {
|
|
86
|
-
var _a;
|
|
87
|
-
return new assembly_hierarchy_node_1.AssemblyHierarchyNode({
|
|
88
|
-
partiumId: assemblyData['assembly_id'],
|
|
89
|
-
externalId: assemblyData['assembly_external_id'],
|
|
90
|
-
name: new i18n_string_1.i18nString((_a = {}, _a[requestData['language']] = assemblyData['assembly_name'], _a)),
|
|
91
|
-
breadcrumbs: assemblyData['breadcrumbs'].map(function (breadcrumbName) {
|
|
92
|
-
var _a;
|
|
93
|
-
return new assembly_hierarchy_node_breadcrumb_1.AssemblyHierarchyNodeBreadcrumb({
|
|
94
|
-
partiumId: null,
|
|
95
|
-
name: new i18n_string_1.i18nString((_a = {}, _a[requestData['language']] = breadcrumbName, _a)),
|
|
96
|
-
});
|
|
97
|
-
}),
|
|
98
|
-
});
|
|
99
|
-
})
|
|
100
|
-
: null, confirmedBomContext: !!requestData['confirmed_part'] === true &&
|
|
101
|
-
requestData['request_data'] &&
|
|
102
|
-
requestData['request_data']['assemblies']
|
|
103
|
-
? requestData['request_data']['assemblies'].map(function (assemblyData) { return assemblyData['assembly_id']; })
|
|
104
|
-
: [], kvpHardFilters: requestData['request_data'] && requestData['request_data']['hard_filters']
|
|
105
|
-
? requestData['request_data']['hard_filters'].map(function (hardFilterData) {
|
|
106
|
-
return new search_filter_1.KvpHardFilter(hardFilterData['label'], hardFilterData['label'], hardFilterData['values']);
|
|
107
|
-
})
|
|
108
|
-
: null }));
|
|
109
|
-
};
|
|
110
|
-
return CSARequest;
|
|
111
|
-
}(api_object_1.APIObject));
|
|
112
|
-
exports.CSARequest = CSARequest;
|
|
113
|
-
//# sourceMappingURL=csa-request.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CSARequest=exports.RequestType=void 0;var RequestType,api_object_1=require("../../core/models/api-object"),i18n_string_1=require("../../core/models/i18n-string"),search_filter_1=require("../../find/models/search-filter"),text_search_service_1=require("../../find/services/search/text-search.service"),assembly_hierarchy_node_1=require("./assembly-hierarchy-node"),assembly_hierarchy_node_breadcrumb_1=require("./assembly-hierarchy-node-breadcrumb"),part_1=require("./part");!function(e){e.CONFIRMATION="confirmation",e.HELP="help"}(RequestType||(exports.RequestType=RequestType={}));var CSARequest=function(e){function t(t){var r=e.call(this)||this;return Object.assign(r,t),r}return __extends(t,e),t.fromAPIResponse=function(e){var r,a,s,n,i=e.request_data&&e.request_data.text_query;return!i&&(null===(s=e.request_data)||void 0===s?void 0:s.text_search)&&(i="".concat(e.request_data.text_search.semantic_text||""," ").concat(e.request_data.text_search.exact_text||"").trim()),new t(__assign(__assign({partiumId:e.request_id,cartId:e.cart_uuid,inquiryId:e.inquiry_id,requestType:e.request_data.part?RequestType.CONFIRMATION:RequestType.HELP,organizationId:e.organization_id,created:e.created,contactEmail:e.contact_email,language:e.language,status:e.status,statusTimestamp:e.status_timestamp,confirmedPart:e.confirmed_part,part:e.request_data&&e.request_data.part&&e.request_data.part.part_id?new part_1.Part({partiumId:e.request_data.part.part_id,externalId:e.request_data.part.part_external_id,name:new i18n_string_1.i18nString((r={},r[e.language]=e.request_data.part.part_name,r)),dataOrigin:part_1.DATA_ORIGIN.PARTIAL}):null,message:e.request_data&&e.request_data.user_input,quantity:e.quantity,additionalAssetIds:e.request_data&&e.request_data.media_assets,searchSessionId:e.session_id,textQuery:i},(null===(n=e.request_data)||void 0===n?void 0:n.text_search)?{textQueries:(a={},a[text_search_service_1.TEXT_SEARCH_TYPE.SEMANTIC]=e.request_data.text_search.semantic_text||"",a[text_search_service_1.TEXT_SEARCH_TYPE.EXACT]=e.request_data.text_search.exact_text||"",a)}:{}),{queryImageAssetId:e.request_data&&e.request_data.query_image_asset,resultParts:e.request_data&&e.request_data.result_list?e.request_data.result_list.map((function(t){var r;return new part_1.Part({partiumId:t.part_id,externalId:t.part_external_id,name:new i18n_string_1.i18nString((r={},r[e.language]=t.part_name,r)),dataOrigin:part_1.DATA_ORIGIN.PARTIAL})})):null,assemblies:e.request_data&&e.request_data.assemblies?e.request_data.assemblies.map((function(t){var r;return new assembly_hierarchy_node_1.AssemblyHierarchyNode({partiumId:t.assembly_id,externalId:t.assembly_external_id,name:new i18n_string_1.i18nString((r={},r[e.language]=t.assembly_name,r)),breadcrumbs:t.breadcrumbs.map((function(t){var r;return new assembly_hierarchy_node_breadcrumb_1.AssemblyHierarchyNodeBreadcrumb({partiumId:null,name:new i18n_string_1.i18nString((r={},r[e.language]=t,r))})}))})})):null,confirmedBomContext:!0==!!e.confirmed_part&&e.request_data&&e.request_data.assemblies?e.request_data.assemblies.map((function(e){return e.assembly_id})):[],kvpHardFilters:e.request_data&&e.request_data.hard_filters?e.request_data.hard_filters.map((function(e){return new search_filter_1.KvpHardFilter(e.label,e.label,e.values)})):null}))},t}(api_object_1.APIObject);exports.CSARequest=CSARequest;
|
package/data/models/document.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Document = void 0;
|
|
5
|
-
var Document = /** @class */ (function () {
|
|
6
|
-
function Document(init) {
|
|
7
|
-
Object.assign(this, init);
|
|
8
|
-
}
|
|
9
|
-
Document.prototype.updateDocument = function (update) {
|
|
10
|
-
Object.assign(this, update);
|
|
11
|
-
};
|
|
12
|
-
Document.prototype.updateName = function (name) {
|
|
13
|
-
this.name = name;
|
|
14
|
-
};
|
|
15
|
-
return Document;
|
|
16
|
-
}());
|
|
17
|
-
exports.Document = Document;
|
|
18
|
-
//# sourceMappingURL=document.js.map
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Document=void 0;var Document=function(){function t(t){Object.assign(this,t)}return t.prototype.updateDocument=function(t){Object.assign(this,t)},t.prototype.updateName=function(t){this.name=t},t}();exports.Document=Document;
|
|
@@ -1,37 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.FilterKey = void 0;
|
|
20
|
-
var core_1 = require("../../core");
|
|
21
|
-
var FilterKey = /** @class */ (function (_super) {
|
|
22
|
-
__extends(FilterKey, _super);
|
|
23
|
-
function FilterKey(init) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
Object.assign(_this, init);
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
FilterKey.fromAPIResponse = function (apiResponse) {
|
|
29
|
-
return new FilterKey({
|
|
30
|
-
partiumId: apiResponse['uuid'],
|
|
31
|
-
name: apiResponse['name'],
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
return FilterKey;
|
|
35
|
-
}(core_1.APIObject));
|
|
36
|
-
exports.FilterKey = FilterKey;
|
|
37
|
-
//# sourceMappingURL=filter-key.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilterKey=void 0;var core_1=require("../../core"),FilterKey=function(t){function e(e){var r=t.call(this)||this;return Object.assign(r,e),r}return __extends(e,t),e.fromAPIResponse=function(t){return new e({partiumId:t.uuid,name:t.name})},e}(core_1.APIObject);exports.FilterKey=FilterKey;
|
|
@@ -1,42 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.FilterOptionValue = void 0;
|
|
20
|
-
var core_1 = require("../../core");
|
|
21
|
-
/**
|
|
22
|
-
* FilterOption of type `Value`.
|
|
23
|
-
* This filter option contains an i18nString value.
|
|
24
|
-
*/
|
|
25
|
-
var FilterOptionValue = /** @class */ (function (_super) {
|
|
26
|
-
__extends(FilterOptionValue, _super);
|
|
27
|
-
function FilterOptionValue(init) {
|
|
28
|
-
var _this = _super.call(this) || this;
|
|
29
|
-
Object.assign(_this, init);
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
FilterOptionValue.fromAPIResponse = function (apiResponse) {
|
|
33
|
-
return new FilterOptionValue({
|
|
34
|
-
partiumId: apiResponse['uuid'],
|
|
35
|
-
value: apiResponse['value'],
|
|
36
|
-
partCount: apiResponse['part_count'],
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
return FilterOptionValue;
|
|
40
|
-
}(core_1.APIObject));
|
|
41
|
-
exports.FilterOptionValue = FilterOptionValue;
|
|
42
|
-
//# sourceMappingURL=filter-option-value.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilterOptionValue=void 0;var core_1=require("../../core"),FilterOptionValue=function(t){function e(e){var r=t.call(this)||this;return Object.assign(r,e),r}return __extends(e,t),e.fromAPIResponse=function(t){return new e({partiumId:t.uuid,value:t.value,partCount:t.part_count})},e}(core_1.APIObject);exports.FilterOptionValue=FilterOptionValue;
|
package/data/models/image.js
CHANGED
|
@@ -1,78 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Image = void 0;
|
|
20
|
-
var core_1 = require("../../core");
|
|
21
|
-
var Image = /** @class */ (function (_super) {
|
|
22
|
-
__extends(Image, _super);
|
|
23
|
-
function Image(init) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
Object.assign(_this, init);
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
Image.fromDataAPIResponse = function (imageData, origin) {
|
|
29
|
-
if (origin === void 0) { origin = core_1.BACKEND_SERVICE.DATA; }
|
|
30
|
-
var data = imageData;
|
|
31
|
-
return new Image({
|
|
32
|
-
assetId: data.uuid,
|
|
33
|
-
origin: origin,
|
|
34
|
-
availableSizes: Object.keys(data.urls),
|
|
35
|
-
downloadUrls: data.urls,
|
|
36
|
-
expireAt: data.expireAt || data['expire_at'],
|
|
37
|
-
name: data.name,
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
Image.fromFindAPIResponse = function (imageData, origin) {
|
|
41
|
-
if (origin === void 0) { origin = core_1.BACKEND_SERVICE.FIND; }
|
|
42
|
-
var data = imageData;
|
|
43
|
-
return new Image({
|
|
44
|
-
assetId: data.partiumId,
|
|
45
|
-
origin: origin,
|
|
46
|
-
availableSizes: Object.keys(data.urls),
|
|
47
|
-
downloadUrls: data.urls,
|
|
48
|
-
expireAt: data.expireAt || data['expire_at'],
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
/** @deprecated use fromDataAPIResponse or fromFindAPIResponse instead, because the origin of the data does not need to correlate with where the image can be downloaded from via assetId */
|
|
52
|
-
Image.fromAPIResponse = function (imageData, origin) {
|
|
53
|
-
if (origin === void 0) { origin = core_1.BACKEND_SERVICE.DATA; }
|
|
54
|
-
if (origin === core_1.BACKEND_SERVICE.FIND) {
|
|
55
|
-
var data = imageData;
|
|
56
|
-
return new Image({
|
|
57
|
-
assetId: data.partiumId,
|
|
58
|
-
origin: origin,
|
|
59
|
-
availableSizes: Object.keys(data.urls),
|
|
60
|
-
downloadUrls: data.urls,
|
|
61
|
-
expireAt: data.expireAt || data['expire_at'],
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
var data = imageData;
|
|
66
|
-
return new Image({
|
|
67
|
-
assetId: data.uuid,
|
|
68
|
-
origin: origin,
|
|
69
|
-
availableSizes: Object.keys(data.urls),
|
|
70
|
-
downloadUrls: data.urls,
|
|
71
|
-
expireAt: data.expireAt || data['expire_at'],
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
return Image;
|
|
76
|
-
}(core_1.APIObject));
|
|
77
|
-
exports.Image = Image;
|
|
78
|
-
//# sourceMappingURL=image.js.map
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},e(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.Image=void 0;var core_1=require("../../core"),Image=function(e){function r(r){var t=e.call(this)||this;return Object.assign(t,r),t}return __extends(r,e),r.fromDataAPIResponse=function(e,t){void 0===t&&(t=core_1.BACKEND_SERVICE.DATA);var o=e;return new r({assetId:o.uuid,origin:t,availableSizes:Object.keys(o.urls),downloadUrls:o.urls,expireAt:o.expireAt||o.expire_at,name:o.name})},r.fromFindAPIResponse=function(e,t){void 0===t&&(t=core_1.BACKEND_SERVICE.FIND);var o=e;return new r({assetId:o.partiumId,origin:t,availableSizes:Object.keys(o.urls),downloadUrls:o.urls,expireAt:o.expireAt||o.expire_at})},r.fromAPIResponse=function(e,t){var o;return void 0===t&&(t=core_1.BACKEND_SERVICE.DATA),t===core_1.BACKEND_SERVICE.FIND?new r({assetId:(o=e).partiumId,origin:t,availableSizes:Object.keys(o.urls),downloadUrls:o.urls,expireAt:o.expireAt||o.expire_at}):new r({assetId:(o=e).uuid,origin:t,availableSizes:Object.keys(o.urls),downloadUrls:o.urls,expireAt:o.expireAt||o.expire_at})},r}(core_1.APIObject);exports.Image=Image;
|