@partium/js-sdk 15.20.0 → 16.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/core/constants/constants.d.ts +1 -2
- package/core/constants/constants.js +1 -1
- package/core/index.d.ts +2 -2
- package/core/index.js +1 -1
- package/core/integration-defaults/http/https-client/axios-https-client.service.d.ts +5 -0
- package/core/integration-defaults/http/https-client/axios-https-client.service.js +1 -1
- package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +1 -1
- package/core/integration-defaults/session/js-oauth-api-key-session.service.js +1 -1
- package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +1 -1
- package/core/integration-defaults/session/js-oauth-web-cookie-session.service.js +1 -1
- package/core/models/user.d.ts +7 -43
- package/core/models/user.js +1 -1
- package/core/services/http/https.service.interface.d.ts +18 -20
- package/core/services/http/https.service.interface.js +1 -1
- package/core/services/http/oauth-https.service.d.ts +3 -3
- package/core/services/local-storage.service.interface.d.ts +1 -1
- package/core/services/log.service.d.ts +1 -1
- package/core/services/organization/index.d.ts +6 -0
- package/core/services/organization/index.js +2 -0
- package/core/services/organization/models/get-organization-by-id-request.d.ts +10 -0
- package/core/services/organization/models/get-organization-by-name-request.d.ts +10 -0
- package/core/services/organization/models/get-organizations-request.d.ts +33 -0
- package/core/services/organization/models/get-organizations-request.js +2 -0
- package/core/services/organization/models/organization.d.ts +77 -0
- package/core/services/organization/models/organization.js +2 -0
- package/core/services/organization/organization.service.d.ts +81 -0
- package/core/services/organization/organization.service.js +2 -0
- package/core/services/recent-parts.service.d.ts +1 -1
- package/core/services/session/session.service.interface.d.ts +17 -5
- package/core/services/session/session.service.interface.js +1 -1
- package/core/utils/general-helper.d.ts +2 -1
- package/core/utils/general-helper.js +1 -1
- package/core/utils/multipart-upload.helper.d.ts +20 -0
- package/core/utils/multipart-upload.helper.js +2 -0
- package/data/models/attribute.d.ts +5 -5
- package/data/models/attribute.js +1 -1
- package/data/models/csa-request.d.ts +2 -3
- package/data/models/csa-request.js +1 -1
- package/data/models/image.d.ts +10 -13
- package/data/models/image.js +1 -1
- package/data/models/part-data.d.ts +1 -1
- package/data/models/part.d.ts +13 -9
- package/data/models/part.js +1 -1
- package/data/services/customer-service-assistance.service.d.ts +3 -22
- package/data/services/customer-service-assistance.service.js +1 -1
- package/data/services/data.service.js +1 -1
- package/data/services/filter.service.d.ts +0 -21
- package/data/services/filter.service.js +1 -1
- package/enrichment/models/enrichment-job-part.d.ts +2 -2
- package/enrichment/models/enrichment-job-part.js +1 -1
- package/enrichment/models/enrichment-job.d.ts +2 -2
- package/enrichment/models/enrichment-job.js +1 -1
- package/find/index.d.ts +1 -28
- package/find/index.js +1 -1
- package/find/models/image-crop-area.d.ts +7 -0
- package/find/models/search-input.d.ts +11 -3
- package/find/models/search-input.js +1 -1
- package/find/services/asset.service.d.ts +41 -102
- package/find/services/asset.service.js +1 -1
- package/find/services/search/search.service.d.ts +5 -218
- package/find/services/search/search.service.js +1 -1
- package/gen/sdk-version.d.ts +1 -1
- package/gen/sdk-version.js +1 -1
- package/index.d.ts +14 -8
- package/index.js +1 -1
- package/ocr/index.d.ts +1 -2
- package/ocr/index.js +1 -1
- package/ocr/models/ocr-response.d.ts +5 -0
- package/ocr/models/ocr-response.js +2 -0
- package/ocr/services/ocr.service.d.ts +9 -15
- package/ocr/services/ocr.service.js +1 -1
- package/package.json +1 -1
- package/core/models/organization.d.ts +0 -127
- package/core/models/organization.js +0 -2
- package/core/services/organization.service.d.ts +0 -48
- package/core/services/organization.service.js +0 -2
- package/data/services/csa-helper.service.d.ts +0 -32
- package/data/services/csa-helper.service.js +0 -2
- package/find/models/assets/asset.d.ts +0 -24
- package/find/models/assets/asset.js +0 -2
- package/find/models/search-filter.d.ts +0 -87
- package/find/models/search-filter.js +0 -2
- package/find/models/search-result-status.d.ts +0 -33
- package/find/models/search-result-status.js +0 -2
- package/find/models/search-session-log-object.d.ts +0 -16
- package/find/models/search-session-log-object.js +0 -2
- package/find/models/search-status/cv-search-status.d.ts +0 -20
- package/find/models/search-status/cv-search-status.js +0 -2
- package/find/models/search-status/search-filter-status.d.ts +0 -33
- package/find/models/search-status/search-filter-status.js +0 -2
- package/find/models/search-status/search-status.d.ts +0 -34
- package/find/models/search-status/search-status.js +0 -2
- package/find/models/search-status/tag-search-status.d.ts +0 -16
- package/find/models/search-status/tag-search-status.js +0 -2
- package/find/models/search-status/text-search-status.d.ts +0 -15
- package/find/models/search-status/text-search-status.js +0 -2
- package/find/models/search-tag.d.ts +0 -12
- package/find/models/search-tag.js +0 -2
- package/find/models/tagable/i18n-tagable.d.ts +0 -10
- package/find/models/tagable/i18n-tagable.js +0 -2
- package/find/models/tagable/tagable-base.d.ts +0 -11
- package/find/models/tagable/tagable-base.js +0 -2
- package/find/models/tagable/tagable.d.ts +0 -10
- package/find/models/tagable/tagable.js +0 -2
- package/find/models/text-search-config.d.ts +0 -57
- package/find/models/text-search-config.js +0 -2
- package/find/models/text-search-manipulator.d.ts +0 -46
- package/find/models/text-search-manipulator.js +0 -2
- package/find/models/text-search-result-item/text-search-error.d.ts +0 -7
- package/find/models/text-search-result-item/text-search-error.js +0 -2
- package/find/models/text-search-result-item/text-search-result-item-document.d.ts +0 -10
- package/find/models/text-search-result-item/text-search-result-item-document.js +0 -2
- package/find/models/text-search-result-item/text-search-result-item-part.d.ts +0 -12
- package/find/models/text-search-result-item/text-search-result-item-part.js +0 -2
- package/find/models/text-search-result-item/text-search-result-item-recent-query.d.ts +0 -10
- package/find/models/text-search-result-item/text-search-result-item-recent-query.js +0 -2
- package/find/models/text-search-result-item/text-search-result-item-unknown.d.ts +0 -12
- package/find/models/text-search-result-item/text-search-result-item-unknown.js +0 -2
- package/find/models/text-search-result-item/text-search-result-item.d.ts +0 -16
- package/find/models/text-search-result-item/text-search-result-item.js +0 -2
- package/find/services/filter-uploaders/filter-uploader.d.ts +0 -13
- package/find/services/filter-uploaders/update-filters-uploader.d.ts +0 -17
- package/find/services/filter-uploaders/update-filters-uploader.js +0 -2
- package/find/services/filter-uploaders/update-filters.model.d.ts +0 -19
- package/find/services/filter-uploaders/update-filters.model.js +0 -2
- package/find/services/search/cv-search.service.d.ts +0 -103
- package/find/services/search/cv-search.service.js +0 -2
- package/find/services/search/search-result.service.d.ts +0 -142
- package/find/services/search/search-result.service.js +0 -2
- package/find/services/search/tag-search.service.d.ts +0 -66
- package/find/services/search/tag-search.service.js +0 -2
- package/find/services/search/text-search.service.d.ts +0 -116
- package/find/services/search/text-search.service.js +0 -2
- package/find/services/search-filter.service.d.ts +0 -223
- package/find/services/search-filter.service.js +0 -2
- package/find/utils/search-helper.d.ts +0 -14
- package/find/utils/search-helper.js +0 -2
- package/ocr/models/detect-response.d.ts +0 -5
- package/ocr/models/detected-text-entry.d.ts +0 -5
- /package/{find/services/filter-uploaders/filter-uploader.js → core/services/organization/models/get-organization-by-id-request.js} +0 -0
- /package/{ocr/models/detect-response.js → core/services/organization/models/get-organization-by-name-request.js} +0 -0
- /package/{ocr/models/detected-text-entry.js → find/models/image-crop-area.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__decorate=this&&this.__decorate||function(e,t,r,i){var o,n=arguments.length,c=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(n<3?o(c):n>3?o(t,r,c):o(t,r))||c);return n>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OcrServiceImpl=void 0;var
|
|
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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__decorate=this&&this.__decorate||function(e,t,r,i){var o,n=arguments.length,c=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(n<3?o(c):n>3?o(t,r,c):o(t,r))||c);return n>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OcrServiceImpl=void 0;var injection_identifier_1=require("../../core/decorators/injection-identifier"),base_service_1=require("../../core/services/base.service"),https_service_interface_1=require("../../core/services/http/https.service.interface"),multipart_upload_helper_1=require("../../core/utils/multipart-upload.helper"),OcrServiceImpl=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(https_service_interface_1.HttpsService)},t.prototype.detectFromFile=function(e,t,r){var i=this;return(0,multipart_upload_helper_1.guardMultipartUpload)(t,(function(){return(0,multipart_upload_helper_1.postPFileImageMultipartRequest)(i.httpsService,{url:"/find/ocr/detect",image:t,input:{organization:e,searchSessionId:null==r?void 0:r.searchSessionId},eventInterface:null==r?void 0:r.eventInterface})}))},t=__decorate([(0,injection_identifier_1.InjectionIdentifier)("OcrService")],t)}(base_service_1.BaseService);exports.OcrServiceImpl=OcrServiceImpl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@partium/js-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"author": "Partium Inc.",
|
|
5
5
|
"license": "See LICENSE.txt",
|
|
6
6
|
"description": "The Partium Find SDK enables integration of Partium’s parts and materials search capabilities into JavaScript-based applications.",
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
import { APIObject } from './api-object';
|
|
3
|
-
export interface OrganizationFromAPI {
|
|
4
|
-
partiumId: string;
|
|
5
|
-
name: string;
|
|
6
|
-
displayName?: string;
|
|
7
|
-
requiresAdditionalAuthentication?: boolean;
|
|
8
|
-
config?: {
|
|
9
|
-
defaultSearchLanguage?: string;
|
|
10
|
-
availableSearchLanguages?: string[];
|
|
11
|
-
availableUiLanguages?: string[];
|
|
12
|
-
smmsLanguages?: string[];
|
|
13
|
-
ecr?: {
|
|
14
|
-
email?: string;
|
|
15
|
-
contactPhoneNumber?: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
featureFlags?: {
|
|
19
|
-
assemblyNavigationEnabled?: boolean;
|
|
20
|
-
imageSearchEnabled?: boolean;
|
|
21
|
-
codeScannerEnabled?: boolean;
|
|
22
|
-
hybridTextSearchEnabled?: boolean;
|
|
23
|
-
ecrEnabled?: boolean;
|
|
24
|
-
trackingEnabled?: boolean;
|
|
25
|
-
enrichedPartMetadataEnabled?: boolean;
|
|
26
|
-
partRelationsEnabled?: boolean;
|
|
27
|
-
catalogOptimizationEnabled?: boolean;
|
|
28
|
-
dataEnrichmentEnabled?: boolean;
|
|
29
|
-
shoppingCartEnabled?: boolean;
|
|
30
|
-
inquiriesEnabled?: boolean;
|
|
31
|
-
};
|
|
32
|
-
ci?: {
|
|
33
|
-
format?: string;
|
|
34
|
-
theme?: 'dark' | 'light';
|
|
35
|
-
colors?: {
|
|
36
|
-
[id: string]: string;
|
|
37
|
-
};
|
|
38
|
-
assets?: {
|
|
39
|
-
[id: string]: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
subOrgs?: OrganizationFromAPI[];
|
|
43
|
-
}
|
|
44
|
-
export declare enum THEME {
|
|
45
|
-
LIGHT = "light",
|
|
46
|
-
DARK = "dark"
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Advanced configuration parameters for this organization
|
|
50
|
-
*/
|
|
51
|
-
export declare class OrganizationConfig {
|
|
52
|
-
defaultSearchLanguage?: string;
|
|
53
|
-
/** @deprecated use defaultSearchLanguage instead */
|
|
54
|
-
defaultLanguage?: string;
|
|
55
|
-
availableSearchLanguages?: string[];
|
|
56
|
-
/** @deprecated use availableSearchLanguages instead */
|
|
57
|
-
availableLanguages?: string[];
|
|
58
|
-
availableUiLanguages?: string[];
|
|
59
|
-
smmsLanguages?: string[];
|
|
60
|
-
ecr?: {
|
|
61
|
-
email?: string;
|
|
62
|
-
contactPhoneNumber?: string;
|
|
63
|
-
};
|
|
64
|
-
/** @deprecated use OrganizationFeatureFlags.assemblyNavigationEnabled instead */
|
|
65
|
-
assemblyNavigationEnabled?: boolean;
|
|
66
|
-
/** @deprecated use OrganizationFeatureFlags.trackingEnabled instead */
|
|
67
|
-
trackingEnabled?: boolean;
|
|
68
|
-
/** @deprecated use OrganizationFeatureFlags.codeScannerEnabled instead */
|
|
69
|
-
codeScannerEnabled?: boolean;
|
|
70
|
-
/** @deprecated use OrganizationFeatureFlags.hybridTextSearchEnabled instead */
|
|
71
|
-
hybridTextSearchEnabled?: boolean;
|
|
72
|
-
/** @deprecated use OrganizationFeatureFlags.ecrEnabled instead */
|
|
73
|
-
csaEnabled?: boolean;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Feature flags for this organization
|
|
77
|
-
*/
|
|
78
|
-
export declare class OrganizationFeatureFlags {
|
|
79
|
-
assemblyNavigationEnabled?: boolean;
|
|
80
|
-
imageSearchEnabled?: boolean;
|
|
81
|
-
codeScannerEnabled?: boolean;
|
|
82
|
-
hybridTextSearchEnabled?: boolean;
|
|
83
|
-
ecrEnabled?: boolean;
|
|
84
|
-
trackingEnabled?: boolean;
|
|
85
|
-
enrichedPartMetadataEnabled?: boolean;
|
|
86
|
-
partRelationsEnabled?: boolean;
|
|
87
|
-
catalogOptimizationEnabled?: boolean;
|
|
88
|
-
dataEnrichmentEnabled?: boolean;
|
|
89
|
-
shoppingCartEnabled?: boolean;
|
|
90
|
-
inquiriesEnabled?: boolean;
|
|
91
|
-
}
|
|
92
|
-
export declare class OrganizationCI {
|
|
93
|
-
format?: string;
|
|
94
|
-
theme?: THEME;
|
|
95
|
-
colors?: {
|
|
96
|
-
[id: string]: string;
|
|
97
|
-
};
|
|
98
|
-
assets?: {
|
|
99
|
-
[id: string]: string;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* An Organization and its configuration data
|
|
104
|
-
*/
|
|
105
|
-
export declare class Organization extends APIObject {
|
|
106
|
-
partiumId: string;
|
|
107
|
-
/** @deprecated not supported anymore, use partiumId or name instead */
|
|
108
|
-
searchDomainId?: string;
|
|
109
|
-
name: string;
|
|
110
|
-
displayName?: string;
|
|
111
|
-
requiresAdditionalAuthentication?: boolean;
|
|
112
|
-
config?: OrganizationConfig;
|
|
113
|
-
featureFlags?: OrganizationFeatureFlags;
|
|
114
|
-
ci?: OrganizationCI;
|
|
115
|
-
/** @deprecated use config.ecr instead */
|
|
116
|
-
csa?: {
|
|
117
|
-
emailAddress: string | null;
|
|
118
|
-
contactPhone: string | null;
|
|
119
|
-
};
|
|
120
|
-
subOrgs?: Organization[];
|
|
121
|
-
constructor(init?: Partial<Organization>);
|
|
122
|
-
static fromAPIResponse(organizationFromAPI: Partial<OrganizationFromAPI>): Organization;
|
|
123
|
-
private static mapOrgConfig;
|
|
124
|
-
private static mapFeatureFlags;
|
|
125
|
-
private static mapCI;
|
|
126
|
-
private static mapSubOrgs;
|
|
127
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __extends=this&&this.__extends||function(){var a=function(n,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(a[e]=n[e])},a(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=n}a(n,e),n.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(a){for(var n,e=1,i=arguments.length;e<i;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(a[o]=n[o]);return a},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Organization=exports.OrganizationCI=exports.OrganizationFeatureFlags=exports.OrganizationConfig=exports.THEME=void 0;var THEME,api_object_1=require("./api-object"),lodash_1=require("lodash");!function(a){a.LIGHT="light",a.DARK="dark"}(THEME||(exports.THEME=THEME={}));var OrganizationConfig=function(){};exports.OrganizationConfig=OrganizationConfig;var OrganizationFeatureFlags=function(){};exports.OrganizationFeatureFlags=OrganizationFeatureFlags;var OrganizationCI=function(){};exports.OrganizationCI=OrganizationCI;var Organization=function(a){function n(n){var e=a.call(this)||this;return Object.assign(e,n),e}return __extends(n,a),n.fromAPIResponse=function(a){var e,i,o,t,r=new n({partiumId:a.partiumId,searchDomainId:a.partiumId,name:a.name,displayName:a.displayName||a.name,requiresAdditionalAuthentication:a.requiresAdditionalAuthentication,config:this.mapOrgConfig(a),featureFlags:this.mapFeatureFlags(a),ci:this.mapCI(a),csa:{emailAddress:null===(i=null===(e=a.config)||void 0===e?void 0:e.ecr)||void 0===i?void 0:i.email,contactPhone:null===(t=null===(o=a.config)||void 0===o?void 0:o.ecr)||void 0===t?void 0:t.contactPhoneNumber}}),l=this.mapSubOrgs(a);return l&&(r.subOrgs=l),r},n.mapOrgConfig=function(a){var n,e,i,o,t,r,l,u,d,s,g,c,v,f,b,p,h,m;return{defaultSearchLanguage:((null===(n=a.config)||void 0===n?void 0:n.defaultSearchLanguage)||"").toLowerCase(),defaultLanguage:((null===(e=a.config)||void 0===e?void 0:e.defaultSearchLanguage)||"").toLowerCase(),availableSearchLanguages:((null===(i=a.config)||void 0===i?void 0:i.availableSearchLanguages)||[]).map((function(a){return a.toLowerCase()})),availableLanguages:((null===(o=a.config)||void 0===o?void 0:o.availableSearchLanguages)||[]).map((function(a){return a.toLowerCase()})),availableUiLanguages:((null===(r=null===(t=a.config)||void 0===t?void 0:t.availableUiLanguages)||void 0===r?void 0:r.length)>0?null===(l=a.config)||void 0===l?void 0:l.availableUiLanguages:(null===(u=a.config)||void 0===u?void 0:u.availableSearchLanguages)||[]).map((function(a){return a.toLowerCase()})),smmsLanguages:((null===(d=a.config)||void 0===d?void 0:d.smmsLanguages)||[]).map((function(a){return a.toLowerCase()})),ecr:{email:null===(g=null===(s=a.config)||void 0===s?void 0:s.ecr)||void 0===g?void 0:g.email,contactPhoneNumber:null===(v=null===(c=a.config)||void 0===c?void 0:c.ecr)||void 0===v?void 0:v.contactPhoneNumber},csaEnabled:null===(f=a.featureFlags)||void 0===f?void 0:f.ecrEnabled,codeScannerEnabled:null===(b=a.featureFlags)||void 0===b?void 0:b.codeScannerEnabled,hybridTextSearchEnabled:null===(p=a.featureFlags)||void 0===p?void 0:p.hybridTextSearchEnabled,assemblyNavigationEnabled:null===(h=a.featureFlags)||void 0===h?void 0:h.assemblyNavigationEnabled,trackingEnabled:null===(m=a.featureFlags)||void 0===m?void 0:m.trackingEnabled}},n.mapFeatureFlags=function(a){var n,e,i,o,t,r,l,u,d,s,g,c;return{assemblyNavigationEnabled:null===(n=a.featureFlags)||void 0===n?void 0:n.assemblyNavigationEnabled,imageSearchEnabled:null===(e=a.featureFlags)||void 0===e?void 0:e.imageSearchEnabled,codeScannerEnabled:null===(i=a.featureFlags)||void 0===i?void 0:i.codeScannerEnabled,hybridTextSearchEnabled:null===(o=a.featureFlags)||void 0===o?void 0:o.hybridTextSearchEnabled,ecrEnabled:null===(t=a.featureFlags)||void 0===t?void 0:t.ecrEnabled,trackingEnabled:null===(r=a.featureFlags)||void 0===r?void 0:r.trackingEnabled,enrichedPartMetadataEnabled:null===(l=a.featureFlags)||void 0===l?void 0:l.enrichedPartMetadataEnabled,partRelationsEnabled:null===(u=a.featureFlags)||void 0===u?void 0:u.partRelationsEnabled,catalogOptimizationEnabled:null===(d=a.featureFlags)||void 0===d?void 0:d.catalogOptimizationEnabled,dataEnrichmentEnabled:null===(s=a.featureFlags)||void 0===s?void 0:s.dataEnrichmentEnabled,shoppingCartEnabled:null===(g=a.featureFlags)||void 0===g?void 0:g.shoppingCartEnabled,inquiriesEnabled:null===(c=a.featureFlags)||void 0===c?void 0:c.inquiriesEnabled}},n.mapCI=function(a){var n,e,i,o;return{format:null===(n=a.ci)||void 0===n?void 0:n.format,theme:null===(e=a.ci)||void 0===e?void 0:e.theme,colors:null===(i=a.ci)||void 0===i?void 0:i.colors,assets:null===(o=a.ci)||void 0===o?void 0:o.assets}},n.mapSubOrgs=function(a){var e,i=__assign(__assign({},a),{subOrgs:null});return null===(e=a.subOrgs)||void 0===e?void 0:e.map((function(a){return n.fromAPIResponse(__assign(__assign({},(0,lodash_1.mergeWith)({},i,a,(function(a,n){if(Array.isArray(a))return n}))),{subOrgs:null}))}))},n}(api_object_1.APIObject);exports.Organization=Organization;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { Organization } from '../models/organization';
|
|
4
|
-
import { Role } from '../models/user';
|
|
5
|
-
import { BaseService } from './base.service';
|
|
6
|
-
import { ServiceProvider } from './service-provider';
|
|
7
|
-
export declare class OrganizationService extends BaseService {
|
|
8
|
-
private httpsService;
|
|
9
|
-
private organizations$;
|
|
10
|
-
constructor(serviceProvider: ServiceProvider);
|
|
11
|
-
onCreate(): void;
|
|
12
|
-
/**
|
|
13
|
-
* initializes the service by requesting the backend to get the organizations, and caching them
|
|
14
|
-
* should be called whenever the logged-in user and his associated organization changes (i.e. on login)
|
|
15
|
-
*/
|
|
16
|
-
init(): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* gets all organizations of the logged-in user is associated with
|
|
19
|
-
*/
|
|
20
|
-
getOrganizations(): Promise<Array<Organization>>;
|
|
21
|
-
/**
|
|
22
|
-
* Gets the first organization of the organization that the logged-in user is associated with, which does not need
|
|
23
|
-
* additional authentication.
|
|
24
|
-
*/
|
|
25
|
-
getFirstOrganization(): Promise<Organization | undefined>;
|
|
26
|
-
/**
|
|
27
|
-
* gets an organization by id
|
|
28
|
-
* @param string // organization id
|
|
29
|
-
* @param includeSubOrgs // if true, the organizations sub-orgs will also be included in the response
|
|
30
|
-
* @returns Promise<Organization>
|
|
31
|
-
*/
|
|
32
|
-
getOrganization(organizationId: string, includeSubOrgs?: boolean): Promise<Organization | undefined>;
|
|
33
|
-
/**
|
|
34
|
-
* gets the first 100 organizations for the current user by roles
|
|
35
|
-
* @param string[] // roles
|
|
36
|
-
* @returns Promise<Organization>
|
|
37
|
-
* @deprecated use getOrganizationsListByRoles instead
|
|
38
|
-
*/
|
|
39
|
-
getOrganizationsByRoles(roles: Role[]): Promise<Organization[]>;
|
|
40
|
-
/**
|
|
41
|
-
* gets all organizations for the current user by roles with reduced organization data. It makes multiple requests to retrieve all the organizations.
|
|
42
|
-
* @param string[] // roles
|
|
43
|
-
* @param pageSize // number
|
|
44
|
-
* @returns Observable<Organization>
|
|
45
|
-
*/
|
|
46
|
-
getOrganizationsListByRoles(roles: Role[], pageSize?: number): Observable<Organization[]>;
|
|
47
|
-
private getOrganizationsRequest;
|
|
48
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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)}}(),__decorate=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a},__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},__generator=this&&this.__generator||function(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OrganizationService=void 0;var rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),injection_identifier_1=require("../decorators/injection-identifier"),organization_1=require("../models/organization"),base_service_1=require("./base.service"),https_service_interface_1=require("./http/https.service.interface"),OrganizationService=function(t){function e(e){var r=t.call(this,e)||this;return r.organizations$=new rxjs_1.ReplaySubject(1),r}return __extends(e,t),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(https_service_interface_1.HttpsService)},e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return console.log("OrganizationService - init"),[4,this.getOrganizationsRequest()];case 1:return t=e.sent(),this.organizations$.next(t.map((function(t){return new organization_1.Organization(t)}))),console.log("..initialized organization.service (organizations: ".concat(t.length,")")),[2]}}))}))},e.prototype.getOrganizations=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.organizations$.pipe((0,operators_1.take)(1)).toPromise()]}))}))},e.prototype.getFirstOrganization=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.getOrganizations()];case 1:return[2,(t=e.sent()).find((function(t){return!t.requiresAdditionalAuthentication}))||t[0]]}}))}))},e.prototype.getOrganization=function(t){return __awaiter(this,arguments,void 0,(function(t,e){return void 0===e&&(e=!1),__generator(this,(function(r){return[2,this.httpsService.get("organizations-ui/".concat(t),[{includeSubOrgs:e}],https_service_interface_1.BACKEND_SERVICE.DATA).pipe((0,operators_1.map)((function(t){return organization_1.Organization.fromAPIResponse(t)}))).toPromise()]}))}))},e.prototype.getOrganizationsByRoles=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.httpsService.get("organizations",[{roles:t.join(",")}],https_service_interface_1.BACKEND_SERVICE.DATA).pipe((0,operators_1.map)((function(t){return(t.results||[]).map((function(t){return organization_1.Organization.fromAPIResponse(t)}))}))).toPromise()]}))}))},e.prototype.getOrganizationsListByRoles=function(t,e){var r=this;void 0===e&&(e=1e3);var n="organizations-list";return this.httpsService.get(n,[{roles:t.join(","),page_size:e}],https_service_interface_1.BACKEND_SERVICE.DATA).pipe((0,operators_1.expand)((function(i){var o=!(!i.pagination||!i.pagination.next),a=parseInt(i.pagination.page)+1;return o?r.httpsService.get(n,[{roles:t.join(","),page_size:e,page:a}],https_service_interface_1.BACKEND_SERVICE.DATA):rxjs_1.EMPTY})),(0,operators_1.reduce)((function(t,e){return t.concat(e.results)}),[]),(0,operators_1.takeWhile)((function(t){return null!==t}),!0),(0,operators_1.map)((function(t){return(t||[]).map((function(t){return organization_1.Organization.fromAPIResponse(t)}))})))},e.prototype.getOrganizationsRequest=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.httpsService.get("organizations-ui",[{includeSubOrgs:!0}],https_service_interface_1.BACKEND_SERVICE.DATA).pipe((0,operators_1.map)((function(t){return t.map((function(t){return organization_1.Organization.fromAPIResponse(t)}))}))).toPromise()]}))}))},e=__decorate([(0,injection_identifier_1.InjectionIdentifier)("OrganizationService")],e)}(base_service_1.BaseService);exports.OrganizationService=OrganizationService;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
import { Observable } from "rxjs";
|
|
3
|
-
import { BaseService } from "../../core/services/base.service";
|
|
4
|
-
import { ServiceProvider } from "../../core/services/service-provider";
|
|
5
|
-
import { AssemblyHierarchyNode } from "../models/assembly-hierarchy-node";
|
|
6
|
-
export declare class CSAHelperService extends BaseService {
|
|
7
|
-
private searchFilterService;
|
|
8
|
-
private assemblyHierarchyNodesService;
|
|
9
|
-
constructor(serviceProvider: ServiceProvider);
|
|
10
|
-
onCreate(): void;
|
|
11
|
-
/**
|
|
12
|
-
* Returns all hierarchy-nodes that should be displayed to the user
|
|
13
|
-
* as applied hierarchy-filters. This considers excluded nodes.
|
|
14
|
-
* The list of filters does not equal the applied hierarchy-filters,
|
|
15
|
-
* but it contains also siblings of excluded nodes, which don't
|
|
16
|
-
* explicitly have to be added in the filter-service, but it's more
|
|
17
|
-
* readable to the user like this.
|
|
18
|
-
* Also loads nodes from later pages than page one.
|
|
19
|
-
*
|
|
20
|
-
* @returns Observable that resolves with an array of AssemblyHierarchyNodes that represent all applied filters
|
|
21
|
-
* @deprecated not needed anymore as HierarchyPartiumIdFilter is deprecated
|
|
22
|
-
*/
|
|
23
|
-
getHierarchyFilterNodesForUI(): Observable<AssemblyHierarchyNode[]>;
|
|
24
|
-
/**
|
|
25
|
-
* Loads all direct children of the node with the given id.
|
|
26
|
-
* (Does not only load the first page, but iteratively loads all pages)
|
|
27
|
-
*
|
|
28
|
-
* @param partiumId id of the parent node
|
|
29
|
-
* @returns Observable that resolves with all direct child nodes
|
|
30
|
-
*/
|
|
31
|
-
private loadAllChildren;
|
|
32
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __extends=this&&this.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},e(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}(),__decorate=this&&this.__decorate||function(e,r,t,i){var o,n=arguments.length,s=n<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,r,t,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(n<3?o(s):n>3?o(r,t,s):o(r,t))||s);return n>3&&s&&Object.defineProperty(r,t,s),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CSAHelperService=void 0;var lodash_1=require("lodash"),rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),injection_identifier_1=require("../../core/decorators/injection-identifier"),base_service_1=require("../../core/services/base.service"),search_filter_1=require("../../find/models/search-filter"),search_filter_service_1=require("../../find/services/search-filter.service"),assembly_hierarchy_nodes_service_1=require("./assembly-hierarchy-nodes.service"),CSAHelperService=function(e){function r(r){return e.call(this,r)||this}return __extends(r,e),r.prototype.onCreate=function(){this.searchFilterService=this.serviceProvider.getService(search_filter_service_1.SearchFilterServiceImpl),this.assemblyHierarchyNodesService=this.serviceProvider.getService(assembly_hierarchy_nodes_service_1.AssemblyHierarchyNodesServiceImpl)},r.prototype.getHierarchyFilterNodesForUI=function(){var e,r,t,i=this,o=this.searchFilterService.getSearchFilters().pipe((0,operators_1.first)()),n=this.searchFilterService.getExcludedHierarchyFilterNodes().pipe((0,operators_1.first)());return(0,rxjs_1.forkJoin)([o,n]).pipe((0,operators_1.mergeMap)((function(o){var n=o[0],s=o[1];e=[],r=[],t=s;var c=n.find((function(e){return e instanceof search_filter_1.HierarchyPartiumIdFilter}));c&&e.push.apply(e,c.include);for(var a=0,l=Object.values(t);a<l.length;a++)for(var u=function(t){r.filter((function(e){return e===t.partiumId})).length<1&&r.push(t.partiumId),e=e.filter((function(e){return e!==t.partiumId}))},p=0,f=l[a].breadcrumbs;p<f.length;p++){u(f[p])}for(var _=[],h=0,d=r;h<d.length;h++){var v=d[h];_.push(i.loadAllChildren(v))}return _.length>0?(0,rxjs_1.forkJoin)(_):(0,rxjs_1.of)([])})),(0,operators_1.mergeMap)((function(o){for(var n=0,s=o;n<s.length;n++)for(var c=0,a=s[n];c<a.length;c++){var l=a[c];Object.keys(t).includes(l.partiumId)||r.includes(l.partiumId)||e.includes(l.partiumId)||e.push(l.partiumId)}return i.assemblyHierarchyNodesService.getAssemblyHierarchyNodes(e).pipe((0,operators_1.map)((function(e){return e.filter((function(e){return null!=e}))})))})),(0,operators_1.map)((function(e){return(0,lodash_1.sortBy)(e,(function(e){return e.breadcrumbs.length}))})))},r.prototype.loadAllChildren=function(e){var r=new rxjs_1.Subject,t=this.assemblyHierarchyNodesService.getAssemblyHierarchyNodesByParentId(e);return t.loadInitialPage(!0).pipe((0,operators_1.first)(),(0,operators_1.mergeMap)((function(e){return e.moreResultsAvailable()?(0,rxjs_1.defer)((function(){return t.loadMore()})).pipe((0,operators_1.first)(),(0,operators_1.tap)((function(e){e.moreResultsAvailable()?setTimeout((function(){r.next()})):r.complete()})),(0,operators_1.repeatWhen)((function(){return r.asObservable()}))):(0,rxjs_1.of)(e)})),(0,operators_1.map)((function(e){return e.items})))},r=__decorate([(0,injection_identifier_1.InjectionIdentifier)("CSAHelperService")],r)}(base_service_1.BaseService);exports.CSAHelperService=CSAHelperService;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
import { PFile } from "../../../core";
|
|
3
|
-
export declare enum ASSET_STATUS {
|
|
4
|
-
NEW = 0,// asset is only available local or just being generated
|
|
5
|
-
PREPARING = 1,// prepare asset request on the server is currently running
|
|
6
|
-
PREPARED = 2,// asset is prepared for upload
|
|
7
|
-
UPLOADING = 3,// assets is currently uploading to the server
|
|
8
|
-
UPLOADED = 4,// asset was successfully uploaded to the server
|
|
9
|
-
VERIFYING = 5,// the verify request is currently active
|
|
10
|
-
VERIFIED = 6,// the asset upload was verified with the BE
|
|
11
|
-
ERROR = 7
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Asset of any type that exists in the Partium ecosystem.
|
|
15
|
-
*/
|
|
16
|
-
export declare class Asset {
|
|
17
|
-
referenceId: string;
|
|
18
|
-
uploadUrl: string;
|
|
19
|
-
private status;
|
|
20
|
-
file: PFile;
|
|
21
|
-
constructor(file: PFile);
|
|
22
|
-
setStatus(newStatus: ASSET_STATUS): void;
|
|
23
|
-
getStatus(): ASSET_STATUS;
|
|
24
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
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,87 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated not needed for new search, use search.performSearch and SearchInput.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum SearchFilterType {
|
|
6
|
-
CategoryFilter = "category",
|
|
7
|
-
IncludeExcludeFilter = "includeExclude",
|
|
8
|
-
KvpHardFilter = "kvpHardFilter"
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Search-filters that can be applied to a search-session, in order to narrow down the search.
|
|
12
|
-
*
|
|
13
|
-
* @deprecated not needed for new search, use search.performSearch and SearchInput.
|
|
14
|
-
*/
|
|
15
|
-
export declare class SearchFilter {
|
|
16
|
-
key: string;
|
|
17
|
-
type: SearchFilterType;
|
|
18
|
-
header?: string;
|
|
19
|
-
constructor(key: string, type: SearchFilterType);
|
|
20
|
-
/**
|
|
21
|
-
* checks equality between filters. Need to be overriden by sub types to correctly determine equality.
|
|
22
|
-
* @param other
|
|
23
|
-
* @returns true if they can be considered equal, false if not
|
|
24
|
-
*/
|
|
25
|
-
equals(other: SearchFilter): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* checks if the filter has any value set.
|
|
28
|
-
* @returns true if the filter has no value set
|
|
29
|
-
*/
|
|
30
|
-
isEmpty(): boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated this filter class is deprecated. Use the KvpHardFilter instead.
|
|
34
|
-
*/
|
|
35
|
-
export declare class CategoryFilter extends SearchFilter {
|
|
36
|
-
value: string | string[];
|
|
37
|
-
label?: string;
|
|
38
|
-
constructor(key: string, value: string | string[], label?: string);
|
|
39
|
-
equals(other: SearchFilter): boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated not needed for new search, use search.performSearch and SearchInput.
|
|
43
|
-
*/
|
|
44
|
-
export declare class IncludeExcludeFilter extends SearchFilter {
|
|
45
|
-
include: string[];
|
|
46
|
-
exclude: string[];
|
|
47
|
-
label?: string;
|
|
48
|
-
constructor(key: string, include: string[], exclude: string[], label?: string);
|
|
49
|
-
equals(other: SearchFilter): boolean;
|
|
50
|
-
isEmpty(): boolean;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated not needed for new search, use search.performSearch and SearchInput.
|
|
54
|
-
*/
|
|
55
|
-
export declare class ExternalPayloadFilter extends CategoryFilter {
|
|
56
|
-
constructor(field: string, value: string, label?: string);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated this filter class is deprecated and will be removed in a future version of the SDK, use HierarchyPartiumIdFilter instead
|
|
60
|
-
*/
|
|
61
|
-
export declare class HierarchyFilter extends CategoryFilter {
|
|
62
|
-
constructor(partiumId: string, label?: string);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Hierarchy search filter that allows filtering for assembly hierarchy nodes by their partiumId.
|
|
66
|
-
* This is an IncludeExcludeFilter, which means that nodes can be included, as well as excluded in the search.
|
|
67
|
-
* For example it is possible to exclude nodes and search only in the nodes that are not excluded.
|
|
68
|
-
* 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
|
|
69
|
-
*
|
|
70
|
-
* @deprecated not needed for new search, use search.performSearch and SearchInput.
|
|
71
|
-
*/
|
|
72
|
-
export declare class HierarchyPartiumIdFilter extends IncludeExcludeFilter {
|
|
73
|
-
static readonly KEY = "hierarchy-partium-id";
|
|
74
|
-
constructor(include: string[], exclude?: string[], label?: string);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Key-value hard filters
|
|
78
|
-
*
|
|
79
|
-
* @deprecated not needed for new search, use search.performSearch and SearchInput.
|
|
80
|
-
*/
|
|
81
|
-
export declare class KvpHardFilter extends SearchFilter {
|
|
82
|
-
label: string;
|
|
83
|
-
values: string[];
|
|
84
|
-
constructor(partiumId: string, label: string, values: string[]);
|
|
85
|
-
equals(other: SearchFilter): boolean;
|
|
86
|
-
isEmpty(): boolean;
|
|
87
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
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,33 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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 | null;
|
|
17
|
-
cropArea?: ImageCropArea;
|
|
18
|
-
wasStarted(): boolean;
|
|
19
|
-
setImage(newImage: Asset | null): void;
|
|
20
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CVSearchStatus=void 0;var CVSearchStatus=function(){function t(){this.assetId="",this.cvImage=null}return t.prototype.wasStarted=function(){return!!this.assetId},t.prototype.setImage=function(t){var e;this.cvImage=t,this.assetId=null!==(e=null==t?void 0:t.referenceId)&&void 0!==e?e:""},t}();exports.CVSearchStatus=CVSearchStatus;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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 | null;
|
|
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 {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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.searchSessionID="",this.searchDomainId="",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}),this.searchDomainId=null!=t?t:""}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,16 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagSearchStatus=void 0;var TagSearchStatus=function(){function t(){this.proposedSearchTags=[]}return t.prototype.wasStarted=function(){return this.proposedSearchTags&&this.proposedSearchTags.length>0},t}();exports.TagSearchStatus=TagSearchStatus;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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 | null;
|
|
14
|
-
wasStarted(): boolean;
|
|
15
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextSearchStatus=void 0;var TextSearchStatus=function(){function e(){this.searchQuery="",this.searchQueries={},this.searchConfig=null}return e.prototype.wasStarted=function(){return!!this.searchQuery||Object.values(this.searchQueries).some((function(e){return e}))},e}();exports.TextSearchStatus=TextSearchStatus;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2026 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
|
-
}
|