@partium/js-sdk 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +100 -0
- package/README.md +18 -0
- package/core/constants/constants.d.ts +12 -0
- package/core/constants/constants.js +2 -0
- package/core/decorators/injection-identifier.d.ts +10 -0
- package/core/decorators/injection-identifier.js +2 -0
- package/core/factories/paginated-request-service.factory.d.ts +22 -0
- package/core/factories/paginated-request-service.factory.js +2 -0
- package/core/index.d.ts +47 -0
- package/core/index.js +2 -0
- package/core/integration-defaults/http/fetch-api-http-error-helper.d.ts +16 -0
- package/core/integration-defaults/http/fetch-api-http-error-helper.js +2 -0
- package/core/integration-defaults/http/file-transfer/axios-file-transfer.service.d.ts +35 -0
- package/core/integration-defaults/http/file-transfer/axios-file-transfer.service.js +2 -0
- package/core/integration-defaults/http/file-transfer/fetch-api-file-transfer.service.d.ts +47 -0
- package/core/integration-defaults/http/file-transfer/fetch-api-file-transfer.service.js +2 -0
- package/core/integration-defaults/http/handle-axios-error-helper.d.ts +17 -0
- package/core/integration-defaults/http/handle-axios-error-helper.js +2 -0
- package/core/integration-defaults/http/https-client/axios-https-client.service.d.ts +83 -0
- package/core/integration-defaults/http/https-client/axios-https-client.service.js +2 -0
- package/core/integration-defaults/http/https-client/fetch-api-https-client.service.d.ts +85 -0
- package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +2 -0
- package/core/integration-defaults/http/js-oauth-keycloak-https.service.d.ts +8 -0
- package/core/integration-defaults/http/js-oauth-keycloak-https.service.js +2 -0
- package/core/integration-defaults/js-p-file.d.ts +8 -0
- package/core/integration-defaults/js-p-file.js +2 -0
- package/core/integration-defaults/session/js-oauth-api-key-session.service.d.ts +76 -0
- package/core/integration-defaults/session/js-oauth-api-key-session.service.js +2 -0
- package/core/integration-defaults/session/js-oauth-keycloak-auth-config.d.ts +28 -0
- package/core/integration-defaults/session/js-oauth-keycloak-auth-config.js +2 -0
- package/core/integration-defaults/session/js-oauth-keycloak-session.service.d.ts +82 -0
- package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +2 -0
- package/core/integration-defaults/web-device-status.service.d.ts +24 -0
- package/core/integration-defaults/web-device-status.service.js +2 -0
- package/core/integration-defaults/web-file.service.d.ts +9 -0
- package/core/integration-defaults/web-file.service.js +2 -0
- package/core/integration-defaults/web-indexeddb.service.d.ts +19 -0
- package/core/integration-defaults/web-indexeddb.service.js +2 -0
- package/core/integration-defaults/web-local-storage.service.d.ts +157 -0
- package/core/integration-defaults/web-local-storage.service.js +2 -0
- package/core/models/api-object.d.ts +7 -0
- package/core/models/api-object.js +2 -0
- package/core/models/auth-config.d.ts +38 -0
- package/core/models/auth-config.js +2 -0
- package/core/models/device-info.d.ts +62 -0
- package/core/models/device-info.js +2 -0
- package/core/models/error.d.ts +70 -0
- package/core/models/error.js +2 -0
- package/core/models/formatted-string.d.ts +9 -0
- package/core/models/formatted-string.js +2 -0
- package/core/models/i18n-map.d.ts +34 -0
- package/core/models/i18n-map.js +2 -0
- package/core/models/i18n-string.d.ts +8 -0
- package/core/models/i18n-string.js +2 -0
- package/core/models/log.d.ts +130 -0
- package/core/models/log.js +2 -0
- package/core/models/organization.d.ts +121 -0
- package/core/models/organization.js +2 -0
- package/core/models/p-file.d.ts +17 -0
- package/core/models/p-file.js +2 -0
- package/core/models/paginated-list.d.ts +23 -0
- package/core/models/paginated-list.js +2 -0
- package/core/models/partium-config.d.ts +31 -0
- package/core/models/partium-config.js +2 -0
- package/core/models/user-token.d.ts +16 -0
- package/core/models/user-token.js +2 -0
- package/core/models/user.d.ts +48 -0
- package/core/models/user.js +2 -0
- package/core/services/backend-status.service.d.ts +46 -0
- package/core/services/backend-status.service.js +2 -0
- package/core/services/base-login-init.service.d.ts +32 -0
- package/core/services/base-login-init.service.js +2 -0
- package/core/services/base.service.d.ts +31 -0
- package/core/services/base.service.js +2 -0
- package/core/services/device-status.service.interface.d.ts +36 -0
- package/core/services/device-status.service.interface.js +2 -0
- package/core/services/file.service.interface.d.ts +24 -0
- package/core/services/file.service.interface.js +2 -0
- package/core/services/http/file-transfer/file-transfer.service.interface.d.ts +57 -0
- package/core/services/http/file-transfer/file-transfer.service.interface.js +2 -0
- package/core/services/http/https-client/https-client.service.interface.d.ts +96 -0
- package/core/services/http/https-client/https-client.service.interface.js +2 -0
- package/core/services/http/https.service.interface.d.ts +164 -0
- package/core/services/http/https.service.interface.js +2 -0
- package/core/services/http/oauth-https.service.d.ts +120 -0
- package/core/services/http/oauth-https.service.js +2 -0
- package/core/services/local-storage.service.interface.d.ts +221 -0
- package/core/services/local-storage.service.interface.js +2 -0
- package/core/services/log.service.d.ts +48 -0
- package/core/services/log.service.js +2 -0
- package/core/services/organization.service.d.ts +48 -0
- package/core/services/organization.service.js +2 -0
- package/core/services/paginated-request.service.d.ts +104 -0
- package/core/services/paginated-request.service.js +2 -0
- package/core/services/recent-parts.service.d.ts +59 -0
- package/core/services/recent-parts.service.js +2 -0
- package/core/services/service-provider.d.ts +58 -0
- package/core/services/service-provider.js +2 -0
- package/core/services/session/oauth-session.service.d.ts +76 -0
- package/core/services/session/oauth-session.service.js +2 -0
- package/core/services/session/session.service.interface.d.ts +138 -0
- package/core/services/session/session.service.interface.js +2 -0
- package/core/utils/general-helper.d.ts +35 -0
- package/core/utils/general-helper.js +2 -0
- package/data/index.d.ts +28 -0
- package/data/index.js +2 -0
- package/data/models/announcement.d.ts +30 -0
- package/data/models/announcement.js +2 -0
- package/data/models/assembly-hierarchy-node-breadcrumb.d.ts +10 -0
- package/data/models/assembly-hierarchy-node-breadcrumb.js +2 -0
- package/data/models/assembly-hierarchy-node.d.ts +16 -0
- package/data/models/assembly-hierarchy-node.js +2 -0
- package/data/models/attribute.d.ts +46 -0
- package/data/models/attribute.js +2 -0
- package/data/models/csa-request-search.d.ts +18 -0
- package/data/models/csa-request-search.js +2 -0
- package/data/models/csa-request-status.d.ts +16 -0
- package/data/models/csa-request-status.js +2 -0
- package/data/models/csa-request.d.ts +41 -0
- package/data/models/csa-request.js +2 -0
- package/data/models/document.d.ts +12 -0
- package/data/models/document.js +2 -0
- package/data/models/filter-key.d.ts +12 -0
- package/data/models/filter-key.js +2 -0
- package/data/models/filter-option-value.d.ts +18 -0
- package/data/models/filter-option-value.js +2 -0
- package/data/models/image.d.ts +36 -0
- package/data/models/image.js +2 -0
- package/data/models/inquiry.d.ts +32 -0
- package/data/models/inquiry.js +2 -0
- package/data/models/mounting-location.d.ts +32 -0
- package/data/models/mounting-location.js +2 -0
- package/data/models/multiple-expert-searches.d.ts +9 -0
- package/data/models/multiple-expert-searches.js +2 -0
- package/data/models/part-enrichment-data.d.ts +24 -0
- package/data/models/part-enrichment-data.js +2 -0
- package/data/models/part.d.ts +168 -0
- package/data/models/part.js +2 -0
- package/data/models/shopping-cart.d.ts +43 -0
- package/data/models/shopping-cart.js +2 -0
- package/data/services/announcement.service.d.ts +68 -0
- package/data/services/announcement.service.js +2 -0
- package/data/services/assembly-hierarchy-nodes.service.d.ts +113 -0
- package/data/services/assembly-hierarchy-nodes.service.js +2 -0
- package/data/services/csa-helper.service.d.ts +32 -0
- package/data/services/csa-helper.service.js +2 -0
- package/data/services/customer-service-assistance.service.d.ts +181 -0
- package/data/services/customer-service-assistance.service.js +2 -0
- package/data/services/filter.service.d.ts +97 -0
- package/data/services/filter.service.js +2 -0
- package/data/services/inquiry.service.d.ts +54 -0
- package/data/services/inquiry.service.js +2 -0
- package/data/services/part-attribute.service.d.ts +42 -0
- package/data/services/part-attribute.service.js +2 -0
- package/data/services/part-enrichment.service.d.ts +32 -0
- package/data/services/part-enrichment.service.js +2 -0
- package/data/services/part.service.d.ts +121 -0
- package/data/services/part.service.js +2 -0
- package/data/services/related-parts.service.d.ts +75 -0
- package/data/services/related-parts.service.js +2 -0
- package/data/services/shopping-cart.service.d.ts +150 -0
- package/data/services/shopping-cart.service.js +2 -0
- package/find/index.d.ts +35 -0
- package/find/index.js +2 -0
- package/find/models/assets/asset.d.ts +24 -0
- package/find/models/assets/asset.js +2 -0
- package/find/models/search-filter.d.ts +87 -0
- package/find/models/search-filter.js +2 -0
- package/find/models/search-input.d.ts +39 -0
- package/find/models/search-input.js +2 -0
- package/find/models/search-output.d.ts +10 -0
- package/find/models/search-output.js +2 -0
- package/find/models/search-result-status.d.ts +33 -0
- package/find/models/search-result-status.js +2 -0
- package/find/models/search-session-log-object.d.ts +16 -0
- package/find/models/search-session-log-object.js +2 -0
- package/find/models/search-status/cv-search-status.d.ts +20 -0
- package/find/models/search-status/cv-search-status.js +2 -0
- package/find/models/search-status/search-filter-status.d.ts +33 -0
- package/find/models/search-status/search-filter-status.js +2 -0
- package/find/models/search-status/search-status.d.ts +34 -0
- package/find/models/search-status/search-status.js +2 -0
- package/find/models/search-status/tag-search-status.d.ts +16 -0
- package/find/models/search-status/tag-search-status.js +2 -0
- package/find/models/search-status/text-search-status.d.ts +15 -0
- package/find/models/search-status/text-search-status.js +2 -0
- package/find/models/search-tag.d.ts +12 -0
- package/find/models/search-tag.js +2 -0
- package/find/models/smart-filter.d.ts +25 -0
- package/find/models/smart-filter.js +2 -0
- package/find/models/tagable/i18n-tagable.d.ts +10 -0
- package/find/models/tagable/i18n-tagable.js +2 -0
- package/find/models/tagable/tagable-base.d.ts +11 -0
- package/find/models/tagable/tagable-base.js +2 -0
- package/find/models/tagable/tagable.d.ts +10 -0
- package/find/models/tagable/tagable.js +2 -0
- package/find/models/text-search-config.d.ts +57 -0
- package/find/models/text-search-config.js +2 -0
- package/find/models/text-search-manipulator.d.ts +46 -0
- package/find/models/text-search-manipulator.js +2 -0
- package/find/models/text-search-result-item/text-search-error.d.ts +7 -0
- package/find/models/text-search-result-item/text-search-error.js +2 -0
- package/find/models/text-search-result-item/text-search-result-item-document.d.ts +10 -0
- package/find/models/text-search-result-item/text-search-result-item-document.js +2 -0
- package/find/models/text-search-result-item/text-search-result-item-part.d.ts +12 -0
- package/find/models/text-search-result-item/text-search-result-item-part.js +2 -0
- package/find/models/text-search-result-item/text-search-result-item-recent-query.d.ts +10 -0
- package/find/models/text-search-result-item/text-search-result-item-recent-query.js +2 -0
- package/find/models/text-search-result-item/text-search-result-item-unknown.d.ts +12 -0
- package/find/models/text-search-result-item/text-search-result-item-unknown.js +2 -0
- package/find/models/text-search-result-item/text-search-result-item.d.ts +16 -0
- package/find/models/text-search-result-item/text-search-result-item.js +2 -0
- package/find/services/asset.service.d.ts +160 -0
- package/find/services/asset.service.js +2 -0
- package/find/services/filter-uploaders/filter-uploader.d.ts +13 -0
- package/find/services/filter-uploaders/filter-uploader.js +2 -0
- package/find/services/filter-uploaders/update-filters-uploader.d.ts +17 -0
- package/find/services/filter-uploaders/update-filters-uploader.js +2 -0
- package/find/services/filter-uploaders/update-filters.model.d.ts +19 -0
- package/find/services/filter-uploaders/update-filters.model.js +2 -0
- package/find/services/search/cv-search.service.d.ts +103 -0
- package/find/services/search/cv-search.service.js +2 -0
- package/find/services/search/recent-text-search-queries.service.d.ts +89 -0
- package/find/services/search/recent-text-search-queries.service.js +2 -0
- package/find/services/search/search-result.service.d.ts +142 -0
- package/find/services/search/search-result.service.js +2 -0
- package/find/services/search/search.service.d.ts +291 -0
- package/find/services/search/search.service.js +2 -0
- package/find/services/search/tag-search.service.d.ts +66 -0
- package/find/services/search/tag-search.service.js +2 -0
- package/find/services/search/text-search.service.d.ts +116 -0
- package/find/services/search/text-search.service.js +2 -0
- package/find/services/search-filter.service.d.ts +223 -0
- package/find/services/search-filter.service.js +2 -0
- package/find/utils/search-helper.d.ts +14 -0
- package/find/utils/search-helper.js +2 -0
- package/gen/sdk-version.d.ts +2 -0
- package/gen/sdk-version.js +2 -0
- package/index.d.ts +121 -0
- package/index.js +2 -0
- package/management/index.d.ts +5 -0
- package/management/index.js +2 -0
- package/management/models/api-key-list-response.d.ts +10 -0
- package/management/models/api-key-list-response.js +2 -0
- package/management/models/api-key-type.d.ts +5 -0
- package/management/models/api-key-type.js +2 -0
- package/management/models/api-key.d.ts +4 -0
- package/management/models/api-key.js +2 -0
- package/management/services/api-key.service.d.ts +39 -0
- package/management/services/api-key.service.js +2 -0
- package/ocr/index.d.ts +4 -0
- package/ocr/index.js +2 -0
- package/ocr/models/detect-response.d.ts +5 -0
- package/ocr/models/detect-response.js +2 -0
- package/ocr/models/detected-text-entry.d.ts +5 -0
- package/ocr/models/detected-text-entry.js +2 -0
- package/ocr/services/ocr.service.d.ts +36 -0
- package/ocr/services/ocr.service.js +2 -0
- package/package.json +45 -0
- package/user-data/index.d.ts +5 -0
- package/user-data/index.js +2 -0
- package/user-data/models/part-with-nullable.d.ts +5 -0
- package/user-data/models/part-with-nullable.js +2 -0
- package/user-data/models/request-list/request-list.d.ts +16 -0
- package/user-data/models/request-list/request-list.js +2 -0
- package/user-data/services/favorite/favorite.service.d.ts +45 -0
- package/user-data/services/favorite/favorite.service.js +2 -0
- package/user-data/services/request-list/request-list.service.d.ts +97 -0
- package/user-data/services/request-list/request-list.service.js +2 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
export declare enum SEARCH_RESULT_STATUS {
|
|
3
|
+
CREATED = "created",
|
|
4
|
+
RUNNING = "running",
|
|
5
|
+
FINISHED = "finished"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ASYNC_TAG_STATUS {
|
|
8
|
+
PENDING = "pending",
|
|
9
|
+
RECEIVED = "received",
|
|
10
|
+
WILL_NOT_RECEIVE = "will-not-receive"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ASYNC_RESULT_STATUS {
|
|
13
|
+
PENDING = "pending",
|
|
14
|
+
RECEIVED = "received",
|
|
15
|
+
WILL_NOT_RECEIVE = "will-not-receive"
|
|
16
|
+
}
|
|
17
|
+
export declare enum SMART_FILTERS_STATUS {
|
|
18
|
+
PENDING = "pending",
|
|
19
|
+
RECEIVED = "received",
|
|
20
|
+
WILL_NOT_RECEIVE = "will-not-receive"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Status of a search session.
|
|
24
|
+
*
|
|
25
|
+
* @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.
|
|
26
|
+
*/
|
|
27
|
+
export declare class SearchResultStatus {
|
|
28
|
+
status: SEARCH_RESULT_STATUS;
|
|
29
|
+
asyncTagsStatus: ASYNC_TAG_STATUS;
|
|
30
|
+
asyncResultsStatus: ASYNC_RESULT_STATUS;
|
|
31
|
+
asyncSmartFiltersStatus: SMART_FILTERS_STATUS;
|
|
32
|
+
constructor(init?: Partial<SearchResultStatus>);
|
|
33
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
export declare enum SEARCH_SESSION_LOG_OBJECT_TYPE {
|
|
3
|
+
QUESTION = "question",
|
|
4
|
+
CODE = "code",// TODO remove when Schadcodes are handled in a generic way
|
|
5
|
+
FEEDBACK = "feedback"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Object that is used for logging information to the search-session that does not directly
|
|
9
|
+
* affect the search-results. It's purpose is to allow us to interpret previous search-sessions,
|
|
10
|
+
* in order to retrain the system. An example for this is user-feedback to searches.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SearchSessionLogObject {
|
|
13
|
+
type: string;
|
|
14
|
+
options: object;
|
|
15
|
+
constructor(init?: Partial<SearchSessionLogObject>);
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { Asset } from '../../models/assets/asset';
|
|
3
|
+
export type ImageCropArea = {
|
|
4
|
+
x1: number;
|
|
5
|
+
y1: number;
|
|
6
|
+
x2: number;
|
|
7
|
+
y2: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The CV-related parameters of a search session.
|
|
11
|
+
*
|
|
12
|
+
* @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.
|
|
13
|
+
*/
|
|
14
|
+
export declare class CVSearchStatus {
|
|
15
|
+
assetId: string;
|
|
16
|
+
cvImage: Asset;
|
|
17
|
+
cropArea: ImageCropArea;
|
|
18
|
+
wasStarted(): boolean;
|
|
19
|
+
setImage(newImage: Asset): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { AssemblyHierarchyNode } from '../../../data';
|
|
3
|
+
import { SearchFilter } from '../search-filter';
|
|
4
|
+
/**
|
|
5
|
+
* The filter-related parameters of a search session.
|
|
6
|
+
*
|
|
7
|
+
* @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.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SearchFilterStatus {
|
|
10
|
+
/**
|
|
11
|
+
* search filters of the current search
|
|
12
|
+
*/
|
|
13
|
+
filters: Array<SearchFilter>;
|
|
14
|
+
/**
|
|
15
|
+
* search filters of the current search as a map
|
|
16
|
+
*/
|
|
17
|
+
filtersMap: {
|
|
18
|
+
[filterKey: string]: SearchFilter;
|
|
19
|
+
};
|
|
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
|
+
excludedHierarchyNodes: {
|
|
25
|
+
[id: string]: AssemblyHierarchyNode;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Determines if the filters are not empty.
|
|
29
|
+
*
|
|
30
|
+
* @returns boolean
|
|
31
|
+
*/
|
|
32
|
+
wasStarted(): boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { Part } from '../../../data/models/part';
|
|
3
|
+
import { TextSearchStatus } from './text-search-status';
|
|
4
|
+
import { CVSearchStatus } from './cv-search-status';
|
|
5
|
+
import { SearchFilterStatus } from './search-filter-status';
|
|
6
|
+
import { TagSearchStatus } from './tag-search-status';
|
|
7
|
+
import { SearchResultStatus } from '../search-result-status';
|
|
8
|
+
type SearchModalities = 'text' | 'cv' | 'filter' | 'tag';
|
|
9
|
+
/**
|
|
10
|
+
* The current status of a search-session.
|
|
11
|
+
*
|
|
12
|
+
* @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.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SearchStatus {
|
|
15
|
+
searchSessionID: string;
|
|
16
|
+
searchDomainId: string;
|
|
17
|
+
searchLanguage: string;
|
|
18
|
+
textSearchStatus: TextSearchStatus;
|
|
19
|
+
cvSearchStatus: CVSearchStatus;
|
|
20
|
+
filterStatus: SearchFilterStatus;
|
|
21
|
+
tagSearchStatus: TagSearchStatus;
|
|
22
|
+
curResultList: Array<Part>;
|
|
23
|
+
searchResultStatus: SearchResultStatus;
|
|
24
|
+
constructor(searchDomainId?: string);
|
|
25
|
+
/**
|
|
26
|
+
* Determine if some search modality has started.
|
|
27
|
+
* If provided an array of SearchModalities, only those would be checked.
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
* @returns boolean
|
|
31
|
+
*/
|
|
32
|
+
wasStarted(modalities?: SearchModalities[]): boolean;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { SearchTag } from '../search-tag';
|
|
3
|
+
/**
|
|
4
|
+
* The available and included Search-Tags of a search session.
|
|
5
|
+
*
|
|
6
|
+
* @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.
|
|
7
|
+
*/
|
|
8
|
+
export declare class TagSearchStatus {
|
|
9
|
+
proposedSearchTags: SearchTag[];
|
|
10
|
+
/**
|
|
11
|
+
* Determines if currently there is a tag in the search.
|
|
12
|
+
*
|
|
13
|
+
* @returns boolean
|
|
14
|
+
*/
|
|
15
|
+
wasStarted(): boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TextSearchQueries } from "../../services/search/text-search.service";
|
|
3
|
+
import { TextSearchConfig } from "../text-search-config";
|
|
4
|
+
/**
|
|
5
|
+
* The Text-search-related parameters of a search session.
|
|
6
|
+
*
|
|
7
|
+
* @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.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TextSearchStatus {
|
|
10
|
+
/** @deprecated use searchQueries instead */
|
|
11
|
+
searchQuery: string;
|
|
12
|
+
searchQueries: TextSearchQueries;
|
|
13
|
+
searchConfig: TextSearchConfig;
|
|
14
|
+
wasStarted(): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
/**
|
|
3
|
+
* Search-Tags, that can be applied to a search-session.
|
|
4
|
+
* @deprecated will not be supported anymore in the future
|
|
5
|
+
*/
|
|
6
|
+
export declare class SearchTag {
|
|
7
|
+
value: string;
|
|
8
|
+
score?: number;
|
|
9
|
+
type?: string;
|
|
10
|
+
isAsync?: boolean;
|
|
11
|
+
constructor(init?: Partial<SearchTag>);
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { APIObject } from '../../core';
|
|
3
|
+
export interface SmartFilterFromAPI {
|
|
4
|
+
label: string;
|
|
5
|
+
/** @deprecated only needed for old find-API */
|
|
6
|
+
name: string;
|
|
7
|
+
values: {
|
|
8
|
+
value: string;
|
|
9
|
+
count: number;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare class SmartFilterValue {
|
|
13
|
+
name: string;
|
|
14
|
+
partCount: number;
|
|
15
|
+
constructor(init?: Partial<SmartFilterValue>);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Smart Filters can be applied to search session.
|
|
19
|
+
*/
|
|
20
|
+
export declare class SmartFilter extends APIObject {
|
|
21
|
+
filterName: string;
|
|
22
|
+
filterValues: SmartFilterValue[];
|
|
23
|
+
constructor(init?: Partial<SmartFilter>);
|
|
24
|
+
static fromAPIResponse(apiResponse: SmartFilterFromAPI): SmartFilter;
|
|
25
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TagableBase } from "./tagable-base";
|
|
3
|
+
import { FormattedString } from "../../../core";
|
|
4
|
+
/**
|
|
5
|
+
* Models that derive from this class can be displayed as tags
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class I18nTagable extends TagableBase {
|
|
8
|
+
protected abstract getText(languageCode: string): string;
|
|
9
|
+
getTextFormattedStrings(languageCode: string): Array<FormattedString>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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.I18nTagable=void 0;var tagable_base_1=require("./tagable-base"),I18nTagable=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getTextFormattedStrings=function(t){return this.formattedStrings||(this.formattedStrings=this.getFormattedStrings(this.getText(t))),this.formattedStrings},e}(tagable_base_1.TagableBase);exports.I18nTagable=I18nTagable;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { FormattedString } from "../../../core";
|
|
3
|
+
/**
|
|
4
|
+
* Models that derive from this class can be displayed as tags
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class TagableBase {
|
|
7
|
+
abstract getCssClassName(): string;
|
|
8
|
+
abstract getId(): string;
|
|
9
|
+
protected formattedStrings: Array<FormattedString>;
|
|
10
|
+
protected getFormattedStrings(text: string): Array<FormattedString>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagableBase=void 0;var core_1=require("../../../core"),TagableBase=function(){function e(){}return e.prototype.getFormattedStrings=function(e){return e.split("***").map((function(e,t){var r=new core_1.FormattedString;return r.text=e,r.fontWeight=t%2==1?"bold":"normal",r}))},e}();exports.TagableBase=TagableBase;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TagableBase } from "./tagable-base";
|
|
3
|
+
import { FormattedString } from "../../../core";
|
|
4
|
+
/**
|
|
5
|
+
* Models that derive from this class can be displayed as tags
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class Tagable extends TagableBase {
|
|
8
|
+
protected abstract getText(): string;
|
|
9
|
+
getTextFormattedStrings(): Array<FormattedString>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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.Tagable=void 0;var tagable_base_1=require("./tagable-base"),Tagable=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getTextFormattedStrings=function(){return this.formattedStrings||(this.formattedStrings=this.getFormattedStrings(this.getText())),this.formattedStrings},e}(tagable_base_1.TagableBase);exports.Tagable=Tagable;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Since temporary-search is deprecated, this config is also not needed anymore.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum SEARCH_DOMAINS {
|
|
6
|
+
PART = "entity",
|
|
7
|
+
/** using SEARCH_DOMAINS.DOCUMENT will not lead to any results, because this feature was removed from the backend */
|
|
8
|
+
DOCUMENT = "document"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Since temporary-search is deprecated, this config is also not needed anymore.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum SEARCH_TYPE {
|
|
14
|
+
FUZZY = "fuzzy",
|
|
15
|
+
EXACT = "exact"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Types of possible temporary search results
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Since temporary-search is deprecated, this config is also not needed anymore.
|
|
21
|
+
*/
|
|
22
|
+
export declare enum TEMPORARY_SEARCH_TYPE {
|
|
23
|
+
RECENT_SEARCH_QUERIES = 0,
|
|
24
|
+
/** @deprecated quick text search is deprecated and will be replaced in the future */
|
|
25
|
+
QUICK_TEXT_SEARCH = 1
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Search-configuration for a text search.
|
|
29
|
+
* Allows overriding text search default behavior
|
|
30
|
+
*
|
|
31
|
+
* @deprecated Since temporary-search is deprecated, this config is also not needed anymore.
|
|
32
|
+
*/
|
|
33
|
+
export declare class TextSearchConfig {
|
|
34
|
+
/**
|
|
35
|
+
* Quicktext search - domains to search in
|
|
36
|
+
*/
|
|
37
|
+
domains: SEARCH_DOMAINS[];
|
|
38
|
+
/**
|
|
39
|
+
* Quicktext limit - how many items the result should max contain
|
|
40
|
+
*/
|
|
41
|
+
limit: number;
|
|
42
|
+
/**
|
|
43
|
+
* Quicktext search - search type to use
|
|
44
|
+
*/
|
|
45
|
+
searchType: SEARCH_TYPE;
|
|
46
|
+
/**
|
|
47
|
+
* Quicktext fuzziness -
|
|
48
|
+
* configuration-parameter only used for search-type FUZZY. Specify a number or AUTO:[low],[high] (<low = fuzziness 0, low..high = fuzziness 1, >=high = fuzziness 2)
|
|
49
|
+
*/
|
|
50
|
+
fuzziness: string;
|
|
51
|
+
/**
|
|
52
|
+
* defines the temporary search types to use for the temporary text search.
|
|
53
|
+
* this affects what kind of search is performed and the temporary text search results.
|
|
54
|
+
*/
|
|
55
|
+
temporarySearch: TEMPORARY_SEARCH_TYPE[];
|
|
56
|
+
constructor(init?: Partial<TextSearchConfig>);
|
|
57
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var SEARCH_DOMAINS,SEARCH_TYPE,TEMPORARY_SEARCH_TYPE;Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextSearchConfig=exports.TEMPORARY_SEARCH_TYPE=exports.SEARCH_TYPE=exports.SEARCH_DOMAINS=void 0,function(E){E.PART="entity",E.DOCUMENT="document"}(SEARCH_DOMAINS||(exports.SEARCH_DOMAINS=SEARCH_DOMAINS={})),function(E){E.FUZZY="fuzzy",E.EXACT="exact"}(SEARCH_TYPE||(exports.SEARCH_TYPE=SEARCH_TYPE={})),function(E){E[E.RECENT_SEARCH_QUERIES=0]="RECENT_SEARCH_QUERIES",E[E.QUICK_TEXT_SEARCH=1]="QUICK_TEXT_SEARCH"}(TEMPORARY_SEARCH_TYPE||(exports.TEMPORARY_SEARCH_TYPE=TEMPORARY_SEARCH_TYPE={}));var TextSearchConfig=function(E){this.domains=[SEARCH_DOMAINS.PART,SEARCH_DOMAINS.DOCUMENT],this.limit=200,this.searchType=SEARCH_TYPE.FUZZY,this.fuzziness="AUTO:5,9",this.temporarySearch=[TEMPORARY_SEARCH_TYPE.QUICK_TEXT_SEARCH,TEMPORARY_SEARCH_TYPE.RECENT_SEARCH_QUERIES],Object.assign(this,E)};exports.TextSearchConfig=TextSearchConfig;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TextSearchResultItem } from "./text-search-result-item/text-search-result-item";
|
|
3
|
+
import { SdkError } from "../../core";
|
|
4
|
+
/**
|
|
5
|
+
* The Text-Search can have different result-types, like parts or documents.
|
|
6
|
+
* It is possible to also have results of a type that is unknown to the Partium SDK.
|
|
7
|
+
* By default, these items will be of type TextSearchResultItemUnknown, when they are leaving the SDK.
|
|
8
|
+
* It is possible to implement the tetSearchResultManipulatorFunction to intersect this action and
|
|
9
|
+
* manipulate, replace or remove result-items. This allows the user of the SDK to add new types
|
|
10
|
+
* and replace the Unknown-Objects with objects of these new types.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated this feature will not be supported anymore in the future.
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class TextSearchManipulator {
|
|
15
|
+
/**
|
|
16
|
+
* Method that can be overridden to process the text-search-result.
|
|
17
|
+
* This is currently needed for DB Schadcodes, maybe it will not be needed in the future anymore
|
|
18
|
+
* and can then be removed.
|
|
19
|
+
*
|
|
20
|
+
* The default method does nothing
|
|
21
|
+
*/
|
|
22
|
+
abstract textSearchResultManipulatorFunction(res: {
|
|
23
|
+
query: string;
|
|
24
|
+
result?: Array<TextSearchResultItem>;
|
|
25
|
+
error?: SdkError;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
query: string;
|
|
28
|
+
result?: Array<TextSearchResultItem>;
|
|
29
|
+
error?: SdkError;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The default implementation of the TextSearchManipulator does not do any changes to the
|
|
34
|
+
* search-result. It will just forward it with the unknown object type.
|
|
35
|
+
*/
|
|
36
|
+
export declare class TextSearchManipulatorDoNothing extends TextSearchManipulator {
|
|
37
|
+
textSearchResultManipulatorFunction(res: {
|
|
38
|
+
query: string;
|
|
39
|
+
result?: Array<TextSearchResultItem>;
|
|
40
|
+
error?: SdkError;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
query: string;
|
|
43
|
+
result?: Array<TextSearchResultItem>;
|
|
44
|
+
error?: SdkError;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{c(r.next(t))}catch(t){a(t)}}function u(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,u)}c((r=r.apply(t,e||[])).next())}))},__generator=this&&this.__generator||function(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextSearchManipulatorDoNothing=exports.TextSearchManipulator=void 0;var TextSearchManipulator=function(){};exports.TextSearchManipulator=TextSearchManipulator;var TextSearchManipulatorDoNothing=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.textSearchResultManipulatorFunction=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,t]}))}))},e}(TextSearchManipulator);exports.TextSearchManipulatorDoNothing=TextSearchManipulatorDoNothing;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TextSearchResultItem } from "./text-search-result-item";
|
|
3
|
+
import { Document } from "../../../data";
|
|
4
|
+
/**
|
|
5
|
+
* Text-search results of type document.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TextSearchResultItemDocument extends TextSearchResultItem {
|
|
8
|
+
constructor(document: Document, score: number);
|
|
9
|
+
getText(languageCode: string): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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.TextSearchResultItemDocument=void 0;var text_search_result_item_1=require("./text-search-result-item"),TextSearchResultItemDocument=function(t){function e(e,r){return t.call(this,e,r)||this}return __extends(e,t),e.prototype.getText=function(t){return this.getValue().name},e}(text_search_result_item_1.TextSearchResultItem);exports.TextSearchResultItemDocument=TextSearchResultItemDocument;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TextSearchResultItem } from "./text-search-result-item";
|
|
3
|
+
import { Part } from "../../../data";
|
|
4
|
+
/**
|
|
5
|
+
* Text-search results of type part.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated not needed anymore
|
|
8
|
+
*/
|
|
9
|
+
export declare class TextSearchResultItemPart extends TextSearchResultItem {
|
|
10
|
+
constructor(part: Part, score: number);
|
|
11
|
+
getText(languageCode: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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.TextSearchResultItemPart=void 0;var text_search_result_item_1=require("./text-search-result-item"),TextSearchResultItemPart=function(t){function e(e,r){return t.call(this,e,r)||this}return __extends(e,t),e.prototype.getText=function(t){return this.getValue().name.getText(t)},e}(text_search_result_item_1.TextSearchResultItem);exports.TextSearchResultItemPart=TextSearchResultItemPart;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TextSearchResultItem } from "./text-search-result-item";
|
|
3
|
+
/**
|
|
4
|
+
* Text-search results of type recent query.
|
|
5
|
+
* Recently sent text search query
|
|
6
|
+
*/
|
|
7
|
+
export declare class TextSearchResultItemRecentQuery extends TextSearchResultItem {
|
|
8
|
+
constructor(query: string, score: number);
|
|
9
|
+
getText(languageCode: string): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
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.TextSearchResultItemRecentQuery=void 0;var text_search_result_item_1=require("./text-search-result-item"),TextSearchResultItemRecentQuery=function(t){function e(e,r){return t.call(this,e,r)||this}return __extends(e,t),e.prototype.getText=function(t){return this.getValue()},e}(text_search_result_item_1.TextSearchResultItem);exports.TextSearchResultItemRecentQuery=TextSearchResultItemRecentQuery;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { TextSearchResultItem } from "./text-search-result-item";
|
|
3
|
+
/**
|
|
4
|
+
* This Unknown-type is used as an intermediate type for all results that can't be resolved by the SDK.
|
|
5
|
+
* The app using the SDK can replace these Unknown-Items over externalTempSearchResultManipulator with
|
|
6
|
+
* other TextSearchResultItem-Types
|
|
7
|
+
*/
|
|
8
|
+
export declare class TextSearchResultItemUnknown extends TextSearchResultItem {
|
|
9
|
+
domainType: any;
|
|
10
|
+
constructor(data: any, score: number, domainType: string);
|
|
11
|
+
getText(languageCode: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextSearchResultItemUnknown=void 0;var text_search_result_item_1=require("./text-search-result-item"),TextSearchResultItemUnknown=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.domainType=r,o}return __extends(e,t),e.prototype.getText=function(t){return"unknown"},e}(text_search_result_item_1.TextSearchResultItem);exports.TextSearchResultItemUnknown=TextSearchResultItemUnknown;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
export type TextSearchResultValue = any;
|
|
3
|
+
/**
|
|
4
|
+
* The text-search can have result-items of different types, like parts or documents.
|
|
5
|
+
* This is the generic super-type of text-search result-items.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class TextSearchResultItem {
|
|
8
|
+
abstract getText(languageCode: string): string;
|
|
9
|
+
private value;
|
|
10
|
+
score: number;
|
|
11
|
+
constructor(value: TextSearchResultValue, score: number);
|
|
12
|
+
/**
|
|
13
|
+
* Get the value of the search-result item, depends on the type
|
|
14
|
+
*/
|
|
15
|
+
getValue(): TextSearchResultValue;
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextSearchResultItem=void 0;var TextSearchResultItem=function(){function e(e,t){this.value=e,this.score=t}return e.prototype.getValue=function(){return this.value},e}();exports.TextSearchResultItem=TextSearchResultItem;
|