@partium/js-sdk 14.4.1 → 14.5.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.
Files changed (153) hide show
  1. package/catalog/index.js +1 -21
  2. package/catalog/models/catalog-image-info.js +1 -22
  3. package/catalog/models/catalog-image.js +1 -40
  4. package/catalog/models/upsert-catalog-images-dto.js +1 -3
  5. package/catalog/models/upsert-images-result.js +1 -3
  6. package/catalog/services/images.service.js +1 -62
  7. package/core/constants/constants.d.ts +1 -0
  8. package/core/constants/constants.js +1 -16
  9. package/core/decorators/injection-identifier.js +1 -19
  10. package/core/factories/paginated-request-service.factory.js +1 -33
  11. package/core/index.js +1 -63
  12. package/core/integration-defaults/http/fetch-api-http-error-helper.js +1 -129
  13. package/core/integration-defaults/http/file-transfer/axios-file-transfer.service.js +1 -138
  14. package/core/integration-defaults/http/file-transfer/fetch-api-file-transfer.service.js +1 -210
  15. package/core/integration-defaults/http/handle-axios-error-helper.js +1 -79
  16. package/core/integration-defaults/http/https-client/axios-https-client.service.js +1 -182
  17. package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +1 -198
  18. package/core/integration-defaults/http/js-oauth-keycloak-https.service.js +1 -32
  19. package/core/integration-defaults/js-p-file.js +1 -36
  20. package/core/integration-defaults/session/js-oauth-api-key-session.service.js +1 -206
  21. package/core/integration-defaults/session/js-oauth-keycloak-auth-config.js +1 -64
  22. package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +1 -257
  23. package/core/integration-defaults/web-device-status.service.js +1 -125
  24. package/core/integration-defaults/web-file.service.js +1 -135
  25. package/core/integration-defaults/web-indexeddb.service.js +1 -142
  26. package/core/integration-defaults/web-local-storage.service.js +1 -310
  27. package/core/models/api-object.js +1 -16
  28. package/core/models/auth-config.js +1 -72
  29. package/core/models/device-info.js +1 -34
  30. package/core/models/error.js +1 -107
  31. package/core/models/formatted-string.js +1 -14
  32. package/core/models/i18n-map.js +1 -61
  33. package/core/models/i18n-string.js +1 -35
  34. package/core/models/log.js +1 -137
  35. package/core/models/organization.js +1 -159
  36. package/core/models/p-file.js +1 -23
  37. package/core/models/paginated-list.js +1 -41
  38. package/core/models/partium-config.js +1 -43
  39. package/core/models/user-token.js +1 -11
  40. package/core/models/user.js +1 -89
  41. package/core/services/backend-status.service.js +1 -147
  42. package/core/services/base-login-init.service.js +1 -57
  43. package/core/services/base.service.js +1 -37
  44. package/core/services/device-status.service.interface.js +1 -117
  45. package/core/services/file.service.interface.js +1 -61
  46. package/core/services/http/file-transfer/file-transfer.service.interface.js +1 -125
  47. package/core/services/http/https-client/https-client.service.interface.js +1 -152
  48. package/core/services/http/https.service.interface.d.ts +3 -1
  49. package/core/services/http/https.service.interface.js +1 -294
  50. package/core/services/http/oauth-https.service.js +1 -218
  51. package/core/services/local-storage.service.interface.js +1 -378
  52. package/core/services/log.service.js +1 -139
  53. package/core/services/organization.service.js +1 -202
  54. package/core/services/paginated-request.service.js +1 -154
  55. package/core/services/recent-parts.service.js +1 -194
  56. package/core/services/service-provider.js +1 -114
  57. package/core/services/session/oauth-session.service.js +1 -104
  58. package/core/services/session/session.service.interface.js +1 -367
  59. package/core/utils/general-helper.js +1 -110
  60. package/data/index.js +1 -44
  61. package/data/models/announcement.js +1 -70
  62. package/data/models/assembly-hierarchy-node-breadcrumb.js +1 -51
  63. package/data/models/assembly-hierarchy-node.js +1 -46
  64. package/data/models/attribute.js +1 -106
  65. package/data/models/csa-request-search.js +1 -46
  66. package/data/models/csa-request-status.js +1 -51
  67. package/data/models/csa-request.js +1 -112
  68. package/data/models/document.js +1 -17
  69. package/data/models/filter-key.js +1 -36
  70. package/data/models/filter-option-value.js +1 -41
  71. package/data/models/image.js +1 -77
  72. package/data/models/inquiry.js +1 -71
  73. package/data/models/mounting-location.js +1 -58
  74. package/data/models/multiple-expert-searches.js +1 -40
  75. package/data/models/part-enrichment-data.js +1 -50
  76. package/data/models/part.d.ts +1 -1
  77. package/data/models/part.js +1 -168
  78. package/data/models/shopping-cart.js +1 -60
  79. package/data/services/announcement.service.js +1 -89
  80. package/data/services/assembly-hierarchy-nodes.service.js +1 -193
  81. package/data/services/csa-helper.service.js +1 -158
  82. package/data/services/customer-service-assistance.service.js +1 -276
  83. package/data/services/filter.service.js +1 -97
  84. package/data/services/inquiry.service.js +1 -68
  85. package/data/services/part-attribute.service.js +1 -118
  86. package/data/services/part-enrichment.service.js +1 -56
  87. package/data/services/part.service.js +1 -182
  88. package/data/services/related-parts.service.js +1 -83
  89. package/data/services/shopping-cart.service.js +1 -152
  90. package/datacuration/index.d.ts +2 -0
  91. package/datacuration/index.js +2 -0
  92. package/datacuration/models/image-submission-request.d.ts +55 -0
  93. package/datacuration/models/image-submission-request.js +2 -0
  94. package/datacuration/models/submitted-image-response.d.ts +27 -0
  95. package/datacuration/models/submitted-image-response.js +2 -0
  96. package/datacuration/services/image-submission.service.d.ts +26 -0
  97. package/datacuration/services/image-submission.service.js +2 -0
  98. package/find/index.js +1 -51
  99. package/find/models/assets/asset.js +1 -32
  100. package/find/models/search-filter.js +1 -205
  101. package/find/models/search-input.js +1 -3
  102. package/find/models/search-output.js +1 -3
  103. package/find/models/search-result-status.js +1 -40
  104. package/find/models/search-session-log-object.js +1 -22
  105. package/find/models/search-status/cv-search-status.js +1 -22
  106. package/find/models/search-status/search-filter-status.js +1 -36
  107. package/find/models/search-status/search-status.js +1 -56
  108. package/find/models/search-status/tag-search-status.js +1 -23
  109. package/find/models/search-status/text-search-status.js +1 -18
  110. package/find/models/search-tag.js +1 -16
  111. package/find/models/smart-filter.js +1 -49
  112. package/find/models/tagable/i18n-tagable.js +1 -37
  113. package/find/models/tagable/tagable-base.js +1 -22
  114. package/find/models/tagable/tagable.js +1 -37
  115. package/find/models/text-search-config.js +1 -70
  116. package/find/models/text-search-manipulator.js +1 -90
  117. package/find/models/text-search-result-item/text-search-error.js +1 -12
  118. package/find/models/text-search-result-item/text-search-result-item-document.js +1 -34
  119. package/find/models/text-search-result-item/text-search-result-item-part.js +1 -36
  120. package/find/models/text-search-result-item/text-search-result-item-recent-query.js +1 -35
  121. package/find/models/text-search-result-item/text-search-result-item-unknown.js +1 -38
  122. package/find/models/text-search-result-item/text-search-result-item.js +1 -22
  123. package/find/services/asset.service.js +1 -348
  124. package/find/services/filter-uploaders/filter-uploader.js +1 -3
  125. package/find/services/filter-uploaders/update-filters-uploader.js +1 -77
  126. package/find/services/filter-uploaders/update-filters.model.js +1 -7
  127. package/find/services/search/cv-search.service.js +1 -214
  128. package/find/services/search/recent-text-search-queries.service.js +1 -260
  129. package/find/services/search/search-result.service.js +1 -539
  130. package/find/services/search/search.service.js +1 -514
  131. package/find/services/search/tag-search.service.js +1 -124
  132. package/find/services/search/text-search.service.js +1 -316
  133. package/find/services/search-filter.service.js +1 -292
  134. package/find/utils/search-helper.js +1 -75
  135. package/gen/sdk-version.d.ts +1 -1
  136. package/gen/sdk-version.js +1 -5
  137. package/index.d.ts +2 -0
  138. package/index.js +1 -392
  139. package/management/index.js +1 -21
  140. package/management/models/api-key-list-response.js +1 -3
  141. package/management/models/api-key-type.js +1 -9
  142. package/management/models/api-key.js +1 -3
  143. package/management/services/api-key.service.js +1 -53
  144. package/ocr/index.js +1 -20
  145. package/ocr/models/detect-response.js +1 -3
  146. package/ocr/models/detected-text-entry.js +1 -3
  147. package/ocr/services/ocr.service.js +1 -59
  148. package/package.json +1 -1
  149. package/user-data/index.js +1 -21
  150. package/user-data/models/part-with-nullable.js +1 -3
  151. package/user-data/models/request-list/request-list.js +1 -63
  152. package/user-data/services/favorite/favorite.service.js +1 -108
  153. package/user-data/services/request-list/request-list.service.js +1 -133
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2025 Partium, Inc. DBA Partium
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 o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageSubmissionServiceImpl=void 0;var core_1=require("../../core"),ImageSubmissionServiceImpl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.submitImages=function(e){var t=new FormData;if(!e.organization)throw new Error("Organization is required");if(!e.images.length)throw new Error("Images are required");if(!e.files.length)throw new Error("Files are required");return t.append("images",JSON.stringify({organization:e.organization,images:e.images})),e.files.forEach((function(e){t.append("files",e,e.name)})),this.httpsService.post("submissions/images/upload",t,void 0,core_1.BACKEND_SERVICE.DATACURATION,{"Content-Type":"multipart/form-data"})},t=__decorate([(0,core_1.InjectionIdentifier)("ImageSubmissionService")],t)}(core_1.BaseService);exports.ImageSubmissionServiceImpl=ImageSubmissionServiceImpl;
package/find/index.js CHANGED
@@ -1,52 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
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
2
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t);var a=Object.getOwnPropertyDescriptor(r,t);a&&!("get"in a?!r.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,a)}:function(e,r,t,s){void 0===s&&(s=t),e[s]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./models/tagable/i18n-tagable"),exports),__exportStar(require("./models/tagable/tagable-base"),exports),__exportStar(require("./models/tagable/tagable"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-unknown"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-part"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-document"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-recent-query"),exports),__exportStar(require("./models/text-search-result-item/text-search-error"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item"),exports),__exportStar(require("./models/smart-filter"),exports),__exportStar(require("./models/search-status/text-search-status"),exports),__exportStar(require("./models/search-status/cv-search-status"),exports),__exportStar(require("./models/search-status/search-filter-status"),exports),__exportStar(require("./models/search-status/search-status"),exports),__exportStar(require("./models/search-status/tag-search-status"),exports),__exportStar(require("./models/search-filter"),exports),__exportStar(require("./models/text-search-manipulator"),exports),__exportStar(require("./models/assets/asset"),exports),__exportStar(require("./models/text-search-config"),exports),__exportStar(require("./models/search-session-log-object"),exports),__exportStar(require("./models/search-tag"),exports),__exportStar(require("./models/search-result-status"),exports),__exportStar(require("./models/search-input"),exports),__exportStar(require("./models/search-output"),exports),__exportStar(require("./services/search-filter.service"),exports),__exportStar(require("./services/search/search.service"),exports),__exportStar(require("./services/search/search-result.service"),exports),__exportStar(require("./services/search/text-search.service"),exports),__exportStar(require("./services/search/cv-search.service"),exports),__exportStar(require("./services/filter-uploaders/filter-uploader"),exports),__exportStar(require("./services/filter-uploaders/update-filters-uploader"),exports),__exportStar(require("./services/asset.service"),exports),__exportStar(require("./services/search/tag-search.service"),exports),__exportStar(require("./services/search/recent-text-search-queries.service"),exports);
@@ -1,33 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
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
2
+ "use strict";var ASSET_STATUS;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Asset=exports.ASSET_STATUS=void 0,function(t){t[t.NEW=0]="NEW",t[t.PREPARING=1]="PREPARING",t[t.PREPARED=2]="PREPARED",t[t.UPLOADING=3]="UPLOADING",t[t.UPLOADED=4]="UPLOADED",t[t.VERIFYING=5]="VERIFYING",t[t.VERIFIED=6]="VERIFIED",t[t.ERROR=7]="ERROR"}(ASSET_STATUS||(exports.ASSET_STATUS=ASSET_STATUS={}));var Asset=function(){function t(t){this.file=t,this.status=ASSET_STATUS.NEW}return t.prototype.setStatus=function(t){this.status=t},t.prototype.getStatus=function(){return this.status},t}();exports.Asset=Asset;
@@ -1,206 +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.KvpHardFilter = exports.HierarchyPartiumIdFilter = exports.HierarchyFilter = exports.ExternalPayloadFilter = exports.IncludeExcludeFilter = exports.CategoryFilter = exports.SearchFilter = exports.SearchFilterType = void 0;
20
- /**
21
- * @deprecated not needed for new search, use search.performSearch and SearchInput.
22
- */
23
- var SearchFilterType;
24
- (function (SearchFilterType) {
25
- SearchFilterType["CategoryFilter"] = "category";
26
- SearchFilterType["IncludeExcludeFilter"] = "includeExclude";
27
- SearchFilterType["KvpHardFilter"] = "kvpHardFilter";
28
- })(SearchFilterType || (exports.SearchFilterType = SearchFilterType = {}));
29
- /**
30
- * Search-filters that can be applied to a search-session, in order to narrow down the search.
31
- *
32
- * @deprecated not needed for new search, use search.performSearch and SearchInput.
33
- */
34
- var SearchFilter = /** @class */ (function () {
35
- function SearchFilter(key, type) {
36
- this.key = key;
37
- this.type = type;
38
- }
39
- /**
40
- * checks equality between filters. Need to be overriden by sub types to correctly determine equality.
41
- * @param other
42
- * @returns true if they can be considered equal, false if not
43
- */
44
- SearchFilter.prototype.equals = function (other) {
45
- return this.key === other.key;
46
- };
47
- /**
48
- * checks if the filter has any value set.
49
- * @returns true if the filter has no value set
50
- */
51
- SearchFilter.prototype.isEmpty = function () {
52
- return true;
53
- };
54
- return SearchFilter;
55
- }());
56
- exports.SearchFilter = SearchFilter;
57
- /**
58
- * @deprecated this filter class is deprecated. Use the KvpHardFilter instead.
59
- */
60
- var CategoryFilter = /** @class */ (function (_super) {
61
- __extends(CategoryFilter, _super);
62
- function CategoryFilter(key, value, label) {
63
- var _this = _super.call(this, key, SearchFilterType.CategoryFilter) || this;
64
- _this.value = value;
65
- _this.label = label;
66
- return _this;
67
- }
68
- CategoryFilter.prototype.equals = function (other) {
69
- if (other instanceof CategoryFilter) {
70
- return this.key == other.key && this.value == other.value;
71
- }
72
- return false;
73
- };
74
- return CategoryFilter;
75
- }(SearchFilter));
76
- exports.CategoryFilter = CategoryFilter;
77
- /**
78
- * @deprecated not needed for new search, use search.performSearch and SearchInput.
79
- */
80
- var IncludeExcludeFilter = /** @class */ (function (_super) {
81
- __extends(IncludeExcludeFilter, _super);
82
- function IncludeExcludeFilter(key, include, exclude, label) {
83
- var _this = _super.call(this, key, SearchFilterType.IncludeExcludeFilter) || this;
84
- _this.include = include;
85
- _this.exclude = exclude;
86
- _this.label = label;
87
- return _this;
88
- }
89
- IncludeExcludeFilter.prototype.equals = function (other) {
90
- if (!(other instanceof IncludeExcludeFilter)) {
91
- return false;
92
- }
93
- if (this.key !== other.key) {
94
- return false;
95
- }
96
- // check included values
97
- if (this.include.length !== other.include.length) {
98
- return false;
99
- }
100
- for (var _i = 0, _a = this.include; _i < _a.length; _i++) {
101
- var value = _a[_i];
102
- if (!other.include.includes(value)) {
103
- return false;
104
- }
105
- }
106
- // check excluded values
107
- if (this.exclude.length !== other.exclude.length) {
108
- return false;
109
- }
110
- for (var _b = 0, _c = this.exclude; _b < _c.length; _b++) {
111
- var value = _c[_b];
112
- if (!other.exclude.includes(value)) {
113
- return false;
114
- }
115
- }
116
- return true;
117
- };
118
- IncludeExcludeFilter.prototype.isEmpty = function () {
119
- var _a;
120
- return !(((_a = this.include) === null || _a === void 0 ? void 0 : _a.length) > 0);
121
- };
122
- return IncludeExcludeFilter;
123
- }(SearchFilter));
124
- exports.IncludeExcludeFilter = IncludeExcludeFilter;
125
- /**
126
- * @deprecated not needed for new search, use search.performSearch and SearchInput.
127
- */
128
- var ExternalPayloadFilter = /** @class */ (function (_super) {
129
- __extends(ExternalPayloadFilter, _super);
130
- function ExternalPayloadFilter(field, value, label) {
131
- return _super.call(this, 'external_payload.' + field, value, label) || this;
132
- }
133
- return ExternalPayloadFilter;
134
- }(CategoryFilter));
135
- exports.ExternalPayloadFilter = ExternalPayloadFilter;
136
- /**
137
- * @deprecated this filter class is deprecated and will be removed in a future version of the SDK, use HierarchyPartiumIdFilter instead
138
- */
139
- var HierarchyFilter = /** @class */ (function (_super) {
140
- __extends(HierarchyFilter, _super);
141
- function HierarchyFilter(partiumId, label) {
142
- return _super.call(this, 'hierarchy-partium-id', partiumId, label) || this;
143
- }
144
- return HierarchyFilter;
145
- }(CategoryFilter));
146
- exports.HierarchyFilter = HierarchyFilter;
147
- /**
148
- * Hierarchy search filter that allows filtering for assembly hierarchy nodes by their partiumId.
149
- * This is an IncludeExcludeFilter, which means that nodes can be included, as well as excluded in the search.
150
- * For example it is possible to exclude nodes and search only in the nodes that are not excluded.
151
- * This is also combinable with the include, e.g. a parent node can be included, but some of its child nodes can be excluded from the search
152
- *
153
- * @deprecated not needed for new search, use search.performSearch and SearchInput.
154
- */
155
- var HierarchyPartiumIdFilter = /** @class */ (function (_super) {
156
- __extends(HierarchyPartiumIdFilter, _super);
157
- function HierarchyPartiumIdFilter(include, exclude, label) {
158
- if (exclude === void 0) { exclude = []; }
159
- return _super.call(this, HierarchyPartiumIdFilter.KEY, include, exclude, label) || this;
160
- }
161
- HierarchyPartiumIdFilter.KEY = 'hierarchy-partium-id';
162
- return HierarchyPartiumIdFilter;
163
- }(IncludeExcludeFilter));
164
- exports.HierarchyPartiumIdFilter = HierarchyPartiumIdFilter;
165
- /**
166
- * Key-value hard filters
167
- *
168
- * @deprecated not needed for new search, use search.performSearch and SearchInput.
169
- */
170
- var KvpHardFilter = /** @class */ (function (_super) {
171
- __extends(KvpHardFilter, _super);
172
- function KvpHardFilter(partiumId, label, values) {
173
- var _this = _super.call(this, partiumId, SearchFilterType.KvpHardFilter) || this;
174
- _this.values = values;
175
- _this.label = label;
176
- return _this;
177
- }
178
- KvpHardFilter.prototype.equals = function (other) {
179
- if (!(other instanceof KvpHardFilter)) {
180
- return false;
181
- }
182
- if (this.key !== other.key) {
183
- return false;
184
- }
185
- if (this.label !== other.label) {
186
- return false;
187
- }
188
- if (this.values.length !== other.values.length) {
189
- return false;
190
- }
191
- for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
192
- var value = _a[_i];
193
- if (!other.values.includes(value)) {
194
- return false;
195
- }
196
- }
197
- return true;
198
- };
199
- KvpHardFilter.prototype.isEmpty = function () {
200
- var _a;
201
- return !(((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) > 0);
202
- };
203
- return KvpHardFilter;
204
- }(SearchFilter));
205
- exports.KvpHardFilter = KvpHardFilter;
206
- //# sourceMappingURL=search-filter.js.map
2
+ "use strict";var SearchFilterType,__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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.KvpHardFilter=exports.HierarchyPartiumIdFilter=exports.HierarchyFilter=exports.ExternalPayloadFilter=exports.IncludeExcludeFilter=exports.CategoryFilter=exports.SearchFilter=exports.SearchFilterType=void 0,function(e){e.CategoryFilter="category",e.IncludeExcludeFilter="includeExclude",e.KvpHardFilter="kvpHardFilter"}(SearchFilterType||(exports.SearchFilterType=SearchFilterType={}));var SearchFilter=function(){function e(e,t){this.key=e,this.type=t}return e.prototype.equals=function(e){return this.key===e.key},e.prototype.isEmpty=function(){return!0},e}();exports.SearchFilter=SearchFilter;var CategoryFilter=function(e){function t(t,r,i){var n=e.call(this,t,SearchFilterType.CategoryFilter)||this;return n.value=r,n.label=i,n}return __extends(t,e),t.prototype.equals=function(e){return e instanceof t&&(this.key==e.key&&this.value==e.value)},t}(SearchFilter);exports.CategoryFilter=CategoryFilter;var IncludeExcludeFilter=function(e){function t(t,r,i,n){var l=e.call(this,t,SearchFilterType.IncludeExcludeFilter)||this;return l.include=r,l.exclude=i,l.label=n,l}return __extends(t,e),t.prototype.equals=function(e){if(!(e instanceof t))return!1;if(this.key!==e.key)return!1;if(this.include.length!==e.include.length)return!1;for(var r=0,i=this.include;r<i.length;r++){var n=i[r];if(!e.include.includes(n))return!1}if(this.exclude.length!==e.exclude.length)return!1;for(var l=0,u=this.exclude;l<u.length;l++){n=u[l];if(!e.exclude.includes(n))return!1}return!0},t.prototype.isEmpty=function(){var e;return!((null===(e=this.include)||void 0===e?void 0:e.length)>0)},t}(SearchFilter);exports.IncludeExcludeFilter=IncludeExcludeFilter;var ExternalPayloadFilter=function(e){function t(t,r,i){return e.call(this,"external_payload."+t,r,i)||this}return __extends(t,e),t}(CategoryFilter);exports.ExternalPayloadFilter=ExternalPayloadFilter;var HierarchyFilter=function(e){function t(t,r){return e.call(this,"hierarchy-partium-id",t,r)||this}return __extends(t,e),t}(CategoryFilter);exports.HierarchyFilter=HierarchyFilter;var HierarchyPartiumIdFilter=function(e){function t(r,i,n){return void 0===i&&(i=[]),e.call(this,t.KEY,r,i,n)||this}return __extends(t,e),t.KEY="hierarchy-partium-id",t}(IncludeExcludeFilter);exports.HierarchyPartiumIdFilter=HierarchyPartiumIdFilter;var KvpHardFilter=function(e){function t(t,r,i){var n=e.call(this,t,SearchFilterType.KvpHardFilter)||this;return n.values=i,n.label=r,n}return __extends(t,e),t.prototype.equals=function(e){if(!(e instanceof t))return!1;if(this.key!==e.key)return!1;if(this.label!==e.label)return!1;if(this.values.length!==e.values.length)return!1;for(var r=0,i=this.values;r<i.length;r++){var n=i[r];if(!e.values.includes(n))return!1}return!0},t.prototype.isEmpty=function(){var e;return!((null===(e=this.values)||void 0===e?void 0:e.length)>0)},t}(SearchFilter);exports.KvpHardFilter=KvpHardFilter;
@@ -1,4 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- //# sourceMappingURL=search-input.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,4 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- //# sourceMappingURL=search-output.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,41 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SearchResultStatus = exports.SMART_FILTERS_STATUS = exports.ASYNC_RESULT_STATUS = exports.ASYNC_TAG_STATUS = exports.SEARCH_RESULT_STATUS = void 0;
5
- var SEARCH_RESULT_STATUS;
6
- (function (SEARCH_RESULT_STATUS) {
7
- SEARCH_RESULT_STATUS["CREATED"] = "created";
8
- SEARCH_RESULT_STATUS["RUNNING"] = "running";
9
- SEARCH_RESULT_STATUS["FINISHED"] = "finished";
10
- })(SEARCH_RESULT_STATUS || (exports.SEARCH_RESULT_STATUS = SEARCH_RESULT_STATUS = {}));
11
- var ASYNC_TAG_STATUS;
12
- (function (ASYNC_TAG_STATUS) {
13
- ASYNC_TAG_STATUS["PENDING"] = "pending";
14
- ASYNC_TAG_STATUS["RECEIVED"] = "received";
15
- ASYNC_TAG_STATUS["WILL_NOT_RECEIVE"] = "will-not-receive";
16
- })(ASYNC_TAG_STATUS || (exports.ASYNC_TAG_STATUS = ASYNC_TAG_STATUS = {}));
17
- var ASYNC_RESULT_STATUS;
18
- (function (ASYNC_RESULT_STATUS) {
19
- ASYNC_RESULT_STATUS["PENDING"] = "pending";
20
- ASYNC_RESULT_STATUS["RECEIVED"] = "received";
21
- ASYNC_RESULT_STATUS["WILL_NOT_RECEIVE"] = "will-not-receive";
22
- })(ASYNC_RESULT_STATUS || (exports.ASYNC_RESULT_STATUS = ASYNC_RESULT_STATUS = {}));
23
- var SMART_FILTERS_STATUS;
24
- (function (SMART_FILTERS_STATUS) {
25
- SMART_FILTERS_STATUS["PENDING"] = "pending";
26
- SMART_FILTERS_STATUS["RECEIVED"] = "received";
27
- SMART_FILTERS_STATUS["WILL_NOT_RECEIVE"] = "will-not-receive";
28
- })(SMART_FILTERS_STATUS || (exports.SMART_FILTERS_STATUS = SMART_FILTERS_STATUS = {}));
29
- /**
30
- * Status of a search session.
31
- *
32
- * @deprecated with the new search, the SDK will not save the status of a search-session anymore. This has to be managed on the Application level.
33
- */
34
- var SearchResultStatus = /** @class */ (function () {
35
- function SearchResultStatus(init) {
36
- Object.assign(this, init);
37
- }
38
- return SearchResultStatus;
39
- }());
40
- exports.SearchResultStatus = SearchResultStatus;
41
- //# sourceMappingURL=search-result-status.js.map
2
+ "use strict";var SEARCH_RESULT_STATUS,ASYNC_TAG_STATUS,ASYNC_RESULT_STATUS,SMART_FILTERS_STATUS;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchResultStatus=exports.SMART_FILTERS_STATUS=exports.ASYNC_RESULT_STATUS=exports.ASYNC_TAG_STATUS=exports.SEARCH_RESULT_STATUS=void 0,function(S){S.CREATED="created",S.RUNNING="running",S.FINISHED="finished"}(SEARCH_RESULT_STATUS||(exports.SEARCH_RESULT_STATUS=SEARCH_RESULT_STATUS={})),function(S){S.PENDING="pending",S.RECEIVED="received",S.WILL_NOT_RECEIVE="will-not-receive"}(ASYNC_TAG_STATUS||(exports.ASYNC_TAG_STATUS=ASYNC_TAG_STATUS={})),function(S){S.PENDING="pending",S.RECEIVED="received",S.WILL_NOT_RECEIVE="will-not-receive"}(ASYNC_RESULT_STATUS||(exports.ASYNC_RESULT_STATUS=ASYNC_RESULT_STATUS={})),function(S){S.PENDING="pending",S.RECEIVED="received",S.WILL_NOT_RECEIVE="will-not-receive"}(SMART_FILTERS_STATUS||(exports.SMART_FILTERS_STATUS=SMART_FILTERS_STATUS={}));var SearchResultStatus=function(S){Object.assign(this,S)};exports.SearchResultStatus=SearchResultStatus;
@@ -1,23 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SearchSessionLogObject = exports.SEARCH_SESSION_LOG_OBJECT_TYPE = void 0;
5
- var SEARCH_SESSION_LOG_OBJECT_TYPE;
6
- (function (SEARCH_SESSION_LOG_OBJECT_TYPE) {
7
- SEARCH_SESSION_LOG_OBJECT_TYPE["QUESTION"] = "question";
8
- SEARCH_SESSION_LOG_OBJECT_TYPE["CODE"] = "code";
9
- SEARCH_SESSION_LOG_OBJECT_TYPE["FEEDBACK"] = "feedback";
10
- })(SEARCH_SESSION_LOG_OBJECT_TYPE || (exports.SEARCH_SESSION_LOG_OBJECT_TYPE = SEARCH_SESSION_LOG_OBJECT_TYPE = {}));
11
- /**
12
- * Object that is used for logging information to the search-session that does not directly
13
- * affect the search-results. It's purpose is to allow us to interpret previous search-sessions,
14
- * in order to retrain the system. An example for this is user-feedback to searches.
15
- */
16
- var SearchSessionLogObject = /** @class */ (function () {
17
- function SearchSessionLogObject(init) {
18
- Object.assign(this, init);
19
- }
20
- return SearchSessionLogObject;
21
- }());
22
- exports.SearchSessionLogObject = SearchSessionLogObject;
23
- //# sourceMappingURL=search-session-log-object.js.map
2
+ "use strict";var SEARCH_SESSION_LOG_OBJECT_TYPE;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchSessionLogObject=exports.SEARCH_SESSION_LOG_OBJECT_TYPE=void 0,function(e){e.QUESTION="question",e.CODE="code",e.FEEDBACK="feedback"}(SEARCH_SESSION_LOG_OBJECT_TYPE||(exports.SEARCH_SESSION_LOG_OBJECT_TYPE=SEARCH_SESSION_LOG_OBJECT_TYPE={}));var SearchSessionLogObject=function(e){Object.assign(this,e)};exports.SearchSessionLogObject=SearchSessionLogObject;
@@ -1,23 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.CVSearchStatus = void 0;
5
- /**
6
- * The CV-related parameters of a search session.
7
- *
8
- * @deprecated with the new search, the SDK will not save the status of a search-session anymore. This has to be managed on the Application level.
9
- */
10
- var CVSearchStatus = /** @class */ (function () {
11
- function CVSearchStatus() {
12
- }
13
- CVSearchStatus.prototype.wasStarted = function () {
14
- return !!this.assetId;
15
- };
16
- CVSearchStatus.prototype.setImage = function (newImage) {
17
- this.cvImage = newImage;
18
- this.assetId = newImage === null || newImage === void 0 ? void 0 : newImage.referenceId;
19
- };
20
- return CVSearchStatus;
21
- }());
22
- exports.CVSearchStatus = CVSearchStatus;
23
- //# sourceMappingURL=cv-search-status.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CVSearchStatus=void 0;var CVSearchStatus=function(){function t(){}return t.prototype.wasStarted=function(){return!!this.assetId},t.prototype.setImage=function(t){this.cvImage=t,this.assetId=null==t?void 0:t.referenceId},t}();exports.CVSearchStatus=CVSearchStatus;
@@ -1,37 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SearchFilterStatus = void 0;
5
- /**
6
- * The filter-related parameters of a search session.
7
- *
8
- * @deprecated with the new search, the SDK will not save the status of a search-session anymore. This has to be managed on the Application level.
9
- */
10
- var SearchFilterStatus = /** @class */ (function () {
11
- function SearchFilterStatus() {
12
- /**
13
- * search filters of the current search
14
- */
15
- this.filters = [];
16
- /**
17
- * search filters of the current search as a map
18
- */
19
- this.filtersMap = {};
20
- /**
21
- * hierarchy filter-nodes that were implicitly added by another filter, but should be explicitly excluded
22
- * @deprecated user instead an IncludeExcludeFilter
23
- */
24
- this.excludedHierarchyNodes = {};
25
- }
26
- /**
27
- * Determines if the filters are not empty.
28
- *
29
- * @returns boolean
30
- */
31
- SearchFilterStatus.prototype.wasStarted = function () {
32
- return !(Object.keys(this.excludedHierarchyNodes).length === 0 && this.filters.length === 0);
33
- };
34
- return SearchFilterStatus;
35
- }());
36
- exports.SearchFilterStatus = SearchFilterStatus;
37
- //# sourceMappingURL=search-filter-status.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchFilterStatus=void 0;var SearchFilterStatus=function(){function t(){this.filters=[],this.filtersMap={},this.excludedHierarchyNodes={}}return t.prototype.wasStarted=function(){return!(0===Object.keys(this.excludedHierarchyNodes).length&&0===this.filters.length)},t}();exports.SearchFilterStatus=SearchFilterStatus;
@@ -1,57 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SearchStatus = void 0;
5
- var text_search_status_1 = require("./text-search-status");
6
- var cv_search_status_1 = require("./cv-search-status");
7
- var search_filter_status_1 = require("./search-filter-status");
8
- var tag_search_status_1 = require("./tag-search-status");
9
- var search_result_status_1 = require("../search-result-status");
10
- /**
11
- * The current status of a search-session.
12
- *
13
- * @deprecated with the new search, the SDK will not save the status of a search-session anymore. This has to be managed on the Application level.
14
- */
15
- var SearchStatus = /** @class */ (function () {
16
- function SearchStatus(searchDomainId) {
17
- this.searchDomainId = searchDomainId;
18
- this.searchLanguage = null;
19
- this.textSearchStatus = new text_search_status_1.TextSearchStatus();
20
- this.cvSearchStatus = new cv_search_status_1.CVSearchStatus();
21
- this.filterStatus = new search_filter_status_1.SearchFilterStatus();
22
- this.tagSearchStatus = new tag_search_status_1.TagSearchStatus();
23
- this.curResultList = [];
24
- this.searchResultStatus = new search_result_status_1.SearchResultStatus({
25
- status: search_result_status_1.SEARCH_RESULT_STATUS.CREATED,
26
- });
27
- }
28
- /**
29
- * Determine if some search modality has started.
30
- * If provided an array of SearchModalities, only those would be checked.
31
- *
32
- *
33
- * @returns boolean
34
- */
35
- SearchStatus.prototype.wasStarted = function (modalities) {
36
- var _this = this;
37
- var mods = modalities || ['text', 'cv', 'filter', 'tag'];
38
- var wasStarted = function (mod) {
39
- switch (mod) {
40
- case 'text':
41
- return _this.textSearchStatus.wasStarted();
42
- case 'cv':
43
- return _this.cvSearchStatus.wasStarted();
44
- case 'filter':
45
- return _this.filterStatus.wasStarted();
46
- case 'tag':
47
- return _this.tagSearchStatus.wasStarted();
48
- }
49
- return false;
50
- };
51
- var someModWasStarted = mods.some(wasStarted);
52
- return someModWasStarted;
53
- };
54
- return SearchStatus;
55
- }());
56
- exports.SearchStatus = SearchStatus;
57
- //# sourceMappingURL=search-status.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchStatus=void 0;var text_search_status_1=require("./text-search-status"),cv_search_status_1=require("./cv-search-status"),search_filter_status_1=require("./search-filter-status"),tag_search_status_1=require("./tag-search-status"),search_result_status_1=require("../search-result-status"),SearchStatus=function(){function t(t){this.searchDomainId=t,this.searchLanguage=null,this.textSearchStatus=new text_search_status_1.TextSearchStatus,this.cvSearchStatus=new cv_search_status_1.CVSearchStatus,this.filterStatus=new search_filter_status_1.SearchFilterStatus,this.tagSearchStatus=new tag_search_status_1.TagSearchStatus,this.curResultList=[],this.searchResultStatus=new search_result_status_1.SearchResultStatus({status:search_result_status_1.SEARCH_RESULT_STATUS.CREATED})}return t.prototype.wasStarted=function(t){var s=this;return(t||["text","cv","filter","tag"]).some((function(t){switch(t){case"text":return s.textSearchStatus.wasStarted();case"cv":return s.cvSearchStatus.wasStarted();case"filter":return s.filterStatus.wasStarted();case"tag":return s.tagSearchStatus.wasStarted()}return!1}))},t}();exports.SearchStatus=SearchStatus;
@@ -1,24 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.TagSearchStatus = void 0;
5
- /**
6
- * The available and included Search-Tags of a search session.
7
- *
8
- * @deprecated with the new search, the SDK will not save the status of a search-session anymore. This has to be managed on the Application level.
9
- */
10
- var TagSearchStatus = /** @class */ (function () {
11
- function TagSearchStatus() {
12
- }
13
- /**
14
- * Determines if currently there is a tag in the search.
15
- *
16
- * @returns boolean
17
- */
18
- TagSearchStatus.prototype.wasStarted = function () {
19
- return this.proposedSearchTags && this.proposedSearchTags.length > 0;
20
- };
21
- return TagSearchStatus;
22
- }());
23
- exports.TagSearchStatus = TagSearchStatus;
24
- //# sourceMappingURL=tag-search-status.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagSearchStatus=void 0;var TagSearchStatus=function(){function t(){}return t.prototype.wasStarted=function(){return this.proposedSearchTags&&this.proposedSearchTags.length>0},t}();exports.TagSearchStatus=TagSearchStatus;
@@ -1,19 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.TextSearchStatus = void 0;
5
- /**
6
- * The Text-search-related parameters of a search session.
7
- *
8
- * @deprecated with the new search, the SDK will not save the status of a search-session anymore. This has to be managed on the Application level.
9
- */
10
- var TextSearchStatus = /** @class */ (function () {
11
- function TextSearchStatus() {
12
- }
13
- TextSearchStatus.prototype.wasStarted = function () {
14
- return !!this.searchQuery || Object.values(this.searchQueries).some(function (item) { return item; });
15
- };
16
- return TextSearchStatus;
17
- }());
18
- exports.TextSearchStatus = TextSearchStatus;
19
- //# sourceMappingURL=text-search-status.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextSearchStatus=void 0;var TextSearchStatus=function(){function t(){}return t.prototype.wasStarted=function(){return!!this.searchQuery||Object.values(this.searchQueries).some((function(t){return t}))},t}();exports.TextSearchStatus=TextSearchStatus;
@@ -1,17 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SearchTag = void 0;
5
- /**
6
- * Search-Tags, that can be applied to a search-session.
7
- * @deprecated will not be supported anymore in the future
8
- */
9
- var SearchTag = /** @class */ (function () {
10
- function SearchTag(init) {
11
- this.isAsync = false; // true when the tag arrived later from an async operation
12
- Object.assign(this, init);
13
- }
14
- return SearchTag;
15
- }());
16
- exports.SearchTag = SearchTag;
17
- //# sourceMappingURL=search-tag.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchTag=void 0;var SearchTag=function(e){this.isAsync=!1,Object.assign(this,e)};exports.SearchTag=SearchTag;
@@ -1,50 +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.SmartFilter = exports.SmartFilterValue = void 0;
20
- var core_1 = require("../../core");
21
- var SmartFilterValue = /** @class */ (function () {
22
- function SmartFilterValue(init) {
23
- Object.assign(this, init);
24
- }
25
- return SmartFilterValue;
26
- }());
27
- exports.SmartFilterValue = SmartFilterValue;
28
- /**
29
- * Smart Filters can be applied to search session.
30
- */
31
- var SmartFilter = /** @class */ (function (_super) {
32
- __extends(SmartFilter, _super);
33
- function SmartFilter(init) {
34
- var _this = _super.call(this) || this;
35
- Object.assign(_this, init);
36
- return _this;
37
- }
38
- SmartFilter.fromAPIResponse = function (apiResponse) {
39
- return new SmartFilter({
40
- filterName: apiResponse.label || apiResponse.name,
41
- filterValues: apiResponse.values.map(function (apiValue) { return (new SmartFilterValue({
42
- name: apiValue.value,
43
- partCount: apiValue.count,
44
- })); })
45
- });
46
- };
47
- return SmartFilter;
48
- }(core_1.APIObject));
49
- exports.SmartFilter = SmartFilter;
50
- //# sourceMappingURL=smart-filter.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.SmartFilter=exports.SmartFilterValue=void 0;var core_1=require("../../core"),SmartFilterValue=function(t){Object.assign(this,t)};exports.SmartFilterValue=SmartFilterValue;var SmartFilter=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({filterName:t.label||t.name,filterValues:t.values.map((function(t){return new SmartFilterValue({name:t.value,partCount:t.count})}))})},e}(core_1.APIObject);exports.SmartFilter=SmartFilter;