@partium/js-sdk 16.0.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/constants/constants.d.ts +1 -0
- package/core/constants/constants.js +1 -1
- package/core/models/log.d.ts +3 -1
- package/core/models/log.js +1 -1
- package/core/services/http/https.service.interface.d.ts +3 -1
- package/core/services/http/https.service.interface.js +1 -1
- package/gen/sdk-version.d.ts +1 -1
- package/gen/sdk-version.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/selection/index.d.ts +17 -0
- package/selection/index.js +2 -0
- package/selection/models/add-all-search-session-parts-to-selection-request.d.ts +4 -0
- package/selection/models/add-all-search-session-parts-to-selection-request.js +2 -0
- package/selection/models/add-all-search-session-parts-to-selection-response.d.ts +5 -0
- package/selection/models/add-all-search-session-parts-to-selection-response.js +2 -0
- package/selection/models/add-parts-from-file-to-selection-request.d.ts +10 -0
- package/selection/models/add-parts-from-file-to-selection-request.js +2 -0
- package/selection/models/add-parts-from-file-to-selection-response.d.ts +33 -0
- package/selection/models/add-parts-from-file-to-selection-response.js +2 -0
- package/selection/models/add-parts-to-selection-request.d.ts +4 -0
- package/selection/models/add-parts-to-selection-request.js +2 -0
- package/selection/models/add-parts-to-selection-response.d.ts +5 -0
- package/selection/models/add-parts-to-selection-response.js +2 -0
- package/selection/models/check-which-parts-in-selection-request.d.ts +4 -0
- package/selection/models/check-which-parts-in-selection-request.js +2 -0
- package/selection/models/check-which-parts-in-selection-response.d.ts +4 -0
- package/selection/models/check-which-parts-in-selection-response.js +2 -0
- package/selection/models/create-selection-request.d.ts +6 -0
- package/selection/models/create-selection-request.js +2 -0
- package/selection/models/create-selection-response.d.ts +10 -0
- package/selection/models/create-selection-response.js +2 -0
- package/selection/models/remove-all-search-session-parts-from-selection-request.d.ts +4 -0
- package/selection/models/remove-all-search-session-parts-from-selection-request.js +2 -0
- package/selection/models/remove-all-search-session-parts-from-selection-response.d.ts +5 -0
- package/selection/models/remove-all-search-session-parts-from-selection-response.js +2 -0
- package/selection/models/remove-parts-from-selection-request.d.ts +4 -0
- package/selection/models/remove-parts-from-selection-request.js +2 -0
- package/selection/models/remove-parts-from-selection-response.d.ts +5 -0
- package/selection/models/remove-parts-from-selection-response.js +2 -0
- package/selection/models/selection-search-summary-response.d.ts +5 -0
- package/selection/models/selection-search-summary-response.js +2 -0
- package/selection/services/selection.service.d.ts +95 -0
- package/selection/services/selection.service.js +2 -0
|
@@ -12,4 +12,5 @@ export declare const REL_DATACURATION_API_URL = "datacuration";
|
|
|
12
12
|
export declare const REL_DATA_V2_API_URL = "data";
|
|
13
13
|
export declare const REL_DATA_ENRICHMENT_API_URL = "enrichment";
|
|
14
14
|
export declare const REL_BACKOFFICE_API_URL = "backoffice";
|
|
15
|
+
export declare const REL_SELECTION_API_URL = "selection";
|
|
15
16
|
export declare const BACKEND_STATUS_FALLBACK_URL = "https://example.com";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BACKEND_STATUS_FALLBACK_URL=exports.REL_BACKOFFICE_API_URL=exports.REL_DATA_ENRICHMENT_API_URL=exports.REL_DATA_V2_API_URL=exports.REL_DATACURATION_API_URL=exports.REL_CATALOG_API_URL=exports.REL_MANAGEMENT_API_URL=exports.REL_STATUS_API_URL=exports.REL_AUTH_API_URL=exports.REL_USER_DATA_API_URL=exports.REL_LOGS_API_URL=exports.REL_CSA_API_URL=exports.REL_DATA_API_URL=exports.PARTIUM_API_VERSION=void 0,exports.PARTIUM_API_VERSION=1,exports.REL_DATA_API_URL="_data",exports.REL_CSA_API_URL="_csa",exports.REL_LOGS_API_URL="_logs",exports.REL_USER_DATA_API_URL="_ud",exports.REL_AUTH_API_URL="_auth",exports.REL_STATUS_API_URL="_status",exports.REL_MANAGEMENT_API_URL="management",exports.REL_CATALOG_API_URL="catalog",exports.REL_DATACURATION_API_URL="datacuration",exports.REL_DATA_V2_API_URL="data",exports.REL_DATA_ENRICHMENT_API_URL="enrichment",exports.REL_BACKOFFICE_API_URL="backoffice",exports.BACKEND_STATUS_FALLBACK_URL="https://example.com";
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BACKEND_STATUS_FALLBACK_URL=exports.REL_SELECTION_API_URL=exports.REL_BACKOFFICE_API_URL=exports.REL_DATA_ENRICHMENT_API_URL=exports.REL_DATA_V2_API_URL=exports.REL_DATACURATION_API_URL=exports.REL_CATALOG_API_URL=exports.REL_MANAGEMENT_API_URL=exports.REL_STATUS_API_URL=exports.REL_AUTH_API_URL=exports.REL_USER_DATA_API_URL=exports.REL_LOGS_API_URL=exports.REL_CSA_API_URL=exports.REL_DATA_API_URL=exports.PARTIUM_API_VERSION=void 0,exports.PARTIUM_API_VERSION=1,exports.REL_DATA_API_URL="_data",exports.REL_CSA_API_URL="_csa",exports.REL_LOGS_API_URL="_logs",exports.REL_USER_DATA_API_URL="_ud",exports.REL_AUTH_API_URL="_auth",exports.REL_STATUS_API_URL="_status",exports.REL_MANAGEMENT_API_URL="management",exports.REL_CATALOG_API_URL="catalog",exports.REL_DATACURATION_API_URL="datacuration",exports.REL_DATA_V2_API_URL="data",exports.REL_DATA_ENRICHMENT_API_URL="enrichment",exports.REL_BACKOFFICE_API_URL="backoffice",exports.REL_SELECTION_API_URL="selection",exports.BACKEND_STATUS_FALLBACK_URL="https://example.com";
|
package/core/models/log.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export declare enum INTERFACE {
|
|
|
70
70
|
ANALYTICS_APP = "analytics_app",
|
|
71
71
|
DATA_CLEANSING_APP = "data_cleansing_app",
|
|
72
72
|
DATA_ENRICHMENT_APP = "data_enrichment_app",
|
|
73
|
+
AGENT_APP = "agent_app",
|
|
73
74
|
GLOBAL_APP = "global_app"
|
|
74
75
|
}
|
|
75
76
|
export declare enum PARTIUM_CONTEXT {
|
|
@@ -81,7 +82,8 @@ export declare enum PARTIUM_CONTEXT {
|
|
|
81
82
|
DATA_CLEANSING = "data_cleansing",
|
|
82
83
|
ANALYTICS = "analytics",
|
|
83
84
|
DATA_INSIGHTS = "data_insights",
|
|
84
|
-
DATA_ENRICHMENT = "data_enrichment"
|
|
85
|
+
DATA_ENRICHMENT = "data_enrichment",
|
|
86
|
+
AGENT = "agent"
|
|
85
87
|
}
|
|
86
88
|
export declare enum OCR_CONTEXT {
|
|
87
89
|
TEXT_SEARCH = "text_search",
|
package/core/models/log.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var EVENT,INTERFACE,PARTIUM_CONTEXT,OCR_CONTEXT,ECR_TYPE,EVENTLOG_VERSIONS,PART_RELEVANCY_LOG_TYPES,__assign=this&&this.__assign||function(){return __assign=Object.assign||function(_){for(var e,E=1,t=arguments.length;E<t;E++)for(var T in e=arguments[E])Object.prototype.hasOwnProperty.call(e,T)&&(_[T]=e[T]);return _},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.eventLogRequestResponseAdapter=exports.EventLog=exports.PART_RELEVANCY_LOG_TYPES=exports.EVENTLOG_VERSIONS=exports.ECR_TYPE=exports.OCR_CONTEXT=exports.PARTIUM_CONTEXT=exports.INTERFACE=exports.EVENT=void 0,function(_){_.PART_COPY_ID="part_copy_id",_.PART_CONFIRMED_SEARCH="part_confirmed_search",_.PART_RELEVANCY_TO_SEARCH="part_relevancy_to_search",_.DEVICE_INFO="device_info",_.PART_DETAIL_ENTER="part_detail_enter",_.PART_DETAIL_LEAVE="part_detail_leave",_.PART_DETAIL_SET_RELATION="parts_detail_set_relation",_.PART_THUMBSUP="part_thumbsup",_.PART_THUMBSDOWN="part_thumbsdown",_.REQUEST_LIST_ADD_PART="request_list_add_part",_.REQUEST_LIST_DEL_PART="request_list_del_part",_.REQUEST_LIST_RESET_PARTS="request_list_reset_parts",_.REQUEST_LIST_SEND="request_list_send",_.REQUEST_LIST_UPDATE="request_list_update",_.REQUEST_LIST_ADD_PART_EXISTING="request_list_add_part_existing",_.ATTEMPT_UPLOAD_IMAGE_DIMENSIONS="attempt_upload_image_dimensions",_.CSA_FORM_ENTER_FROM_RESULTS="csa_form_enter_from_results",_.CSA_FORM_ENTER_FROM_PART_DETAILS="csa_form_enter_from_part_details",_.CSA_REQUEST_SEND="csa_request_send",_.CSA_CALL_EXPERT="csa_call_expert",_.CSA_EXPERT_CONFIRMS_PART="csa_expert_confirms_part",_.CSA_EXPERT_MARK_NOT_RESOLVED="csa_expert_marks_not_resolved",_.RECENT_SEARCH_QUERY_CLICKED="recent_search_query_clicked",_.SEARCH_TAG_USED="search_tag_used",_.REQUEST_LIST_EXPORTED="request_list_exported",_.CSA_EXPERT_OPENS_REQUEST="csa_expert_opens_request",_.LANGUAGE_CHANGE="language_change",_.USER_SESSION_INFO="user_session_info",_.CONFIRMED_ID_MATCHES_PART_TO_CONFIRM="confirmed_id_matches_part_to_confirm",_.SHOPPING_CART_EXPORTED="shopping_cart_exported",_.SHOPPING_CART_UPDATE="shopping_cart_update",_.SHOPPING_CART_REMOVE_ALL_PARTS="shopping_cart_remove_all_parts",_.SHOPPING_CART_REMOVE_PART="shopping_cart_remove_part",_.SHOPPING_CART_ADD_PART="shopping_cart_add_part",_.SHOPPING_CART_REQUEST_OFFER="shopping_cart_request_offer",_.FAVORITES_REMOVE="favorites_remove_part",_.FAVORITES_ADD="favorites_add_part",_.ECR_DETAILS_ENTER="ecr_details_enter",_.ECR_LIST="ecr_list",_.ECR_CALL="ecr_call",_.ECR_FORM_SUBMIT="ecr_form_submit",_.ECR_FORM_ENTER="ecr_form_enter",_.SEARCH_INPUT_CODE_SCANNING="search_input_code_scanning",_.SEARCH_INPUT_BOM_FILTER="search_input_bom_filter",_.SEARCH_INPUT_ATTRIBUTE_FILTERS="search_input_attribute_filters",_.SEARCH_INPUT_SEMANTIC_TAGS="search_input_semantic_tags",_.SEARCH_INPUT_SMART_FILTER_APPLIED="search_input_smart_filter_applied",_.SEARCH_RESULTS_STS="search_results_sts",_.SEARCH_RESULTS_VM="search_results_vm",_.SEARCH_RESULTS_HVT="search_results_hvt",_.SEARCH_RESULTS_SMMS_FLOW="search_results_smms_flow",_.SEARCH_RESULTS_FUSION="search_results_fusion",_.SEARCH_SESSION_CREATE="search_session_create",_.SEARCH_ASSISTANCE_OCR="search_assistance_ocr",_.INQUIRY_EXPORTED="inquiry_exported",_.EXPERT_OPENS_INQUIRY="expert_opens_inquiry",_.CSA_EXPERT_STARTS_EXPERT_SEARCH="csa_expert_starts_expert_search",_.CSA_INVITES_EXPERT="csa_invites_expert"}(EVENT||(exports.EVENT=EVENT={})),function(_){_.FIND_APP="find_app",_.API_ACCESS="api_access",_.AGENT_PORTAL_APP="agent_portal_app",_.ANALYTICS_APP="analytics_app",_.DATA_CLEANSING_APP="data_cleansing_app",_.DATA_ENRICHMENT_APP="data_enrichment_app",_.GLOBAL_APP="global_app"}(INTERFACE||(exports.INTERFACE=INTERFACE={})),function(_){_.SEARCH="search",_.RECENTLY_VIEWED_PARTS="recently_viewed_parts",_.FAVORITES="favorites",_.ECR="ecr",_.SHOPPING_CART="shopping_cart",_.DATA_CLEANSING="data_cleansing",_.ANALYTICS="analytics",_.DATA_INSIGHTS="data_insights",_.DATA_ENRICHMENT="data_enrichment"}(PARTIUM_CONTEXT||(exports.PARTIUM_CONTEXT=PARTIUM_CONTEXT={})),function(_){_.TEXT_SEARCH="text_search",_.BOM_FILTER="bom_filter"}(OCR_CONTEXT||(exports.OCR_CONTEXT=OCR_CONTEXT={})),function(_){_.ASK_FOR_HELP="ask_for_help",_.ASK_FOR_CONFIRMATION="ask_for_confirmation"}(ECR_TYPE||(exports.ECR_TYPE=ECR_TYPE={})),function(_){_.V_1_0_0="1.0.0",_.V_2_0_0="2.0.0"}(EVENTLOG_VERSIONS||(exports.EVENTLOG_VERSIONS=EVENTLOG_VERSIONS={})),function(_){_.MATCHES_SEARCH_EXACTLY="matches_search_exactly",_.BEST_MATCH="best_match",_.NOT_MATCH_BUT_RELATED="not_match_but_related",_.NEEDS_CHECK_ELSEWHERE="needs_check_elsewhere",_.NOT_RELEVANT="not_relevant",_.OTHER="other"}(PART_RELEVANCY_LOG_TYPES||(exports.PART_RELEVANCY_LOG_TYPES=PART_RELEVANCY_LOG_TYPES={}));var EventLog=function(_){Object.assign(this,_)};exports.EventLog=EventLog;var eventLogRequestResponseAdapter=function(_){return function(e){return new EventLog(__assign(__assign({},_),{id:e.event_id,timestamp:new Date(e.timestamp)}))}};exports.eventLogRequestResponseAdapter=eventLogRequestResponseAdapter;
|
|
2
|
+
"use strict";var EVENT,INTERFACE,PARTIUM_CONTEXT,OCR_CONTEXT,ECR_TYPE,EVENTLOG_VERSIONS,PART_RELEVANCY_LOG_TYPES,__assign=this&&this.__assign||function(){return __assign=Object.assign||function(_){for(var e,E=1,t=arguments.length;E<t;E++)for(var T in e=arguments[E])Object.prototype.hasOwnProperty.call(e,T)&&(_[T]=e[T]);return _},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.eventLogRequestResponseAdapter=exports.EventLog=exports.PART_RELEVANCY_LOG_TYPES=exports.EVENTLOG_VERSIONS=exports.ECR_TYPE=exports.OCR_CONTEXT=exports.PARTIUM_CONTEXT=exports.INTERFACE=exports.EVENT=void 0,function(_){_.PART_COPY_ID="part_copy_id",_.PART_CONFIRMED_SEARCH="part_confirmed_search",_.PART_RELEVANCY_TO_SEARCH="part_relevancy_to_search",_.DEVICE_INFO="device_info",_.PART_DETAIL_ENTER="part_detail_enter",_.PART_DETAIL_LEAVE="part_detail_leave",_.PART_DETAIL_SET_RELATION="parts_detail_set_relation",_.PART_THUMBSUP="part_thumbsup",_.PART_THUMBSDOWN="part_thumbsdown",_.REQUEST_LIST_ADD_PART="request_list_add_part",_.REQUEST_LIST_DEL_PART="request_list_del_part",_.REQUEST_LIST_RESET_PARTS="request_list_reset_parts",_.REQUEST_LIST_SEND="request_list_send",_.REQUEST_LIST_UPDATE="request_list_update",_.REQUEST_LIST_ADD_PART_EXISTING="request_list_add_part_existing",_.ATTEMPT_UPLOAD_IMAGE_DIMENSIONS="attempt_upload_image_dimensions",_.CSA_FORM_ENTER_FROM_RESULTS="csa_form_enter_from_results",_.CSA_FORM_ENTER_FROM_PART_DETAILS="csa_form_enter_from_part_details",_.CSA_REQUEST_SEND="csa_request_send",_.CSA_CALL_EXPERT="csa_call_expert",_.CSA_EXPERT_CONFIRMS_PART="csa_expert_confirms_part",_.CSA_EXPERT_MARK_NOT_RESOLVED="csa_expert_marks_not_resolved",_.RECENT_SEARCH_QUERY_CLICKED="recent_search_query_clicked",_.SEARCH_TAG_USED="search_tag_used",_.REQUEST_LIST_EXPORTED="request_list_exported",_.CSA_EXPERT_OPENS_REQUEST="csa_expert_opens_request",_.LANGUAGE_CHANGE="language_change",_.USER_SESSION_INFO="user_session_info",_.CONFIRMED_ID_MATCHES_PART_TO_CONFIRM="confirmed_id_matches_part_to_confirm",_.SHOPPING_CART_EXPORTED="shopping_cart_exported",_.SHOPPING_CART_UPDATE="shopping_cart_update",_.SHOPPING_CART_REMOVE_ALL_PARTS="shopping_cart_remove_all_parts",_.SHOPPING_CART_REMOVE_PART="shopping_cart_remove_part",_.SHOPPING_CART_ADD_PART="shopping_cart_add_part",_.SHOPPING_CART_REQUEST_OFFER="shopping_cart_request_offer",_.FAVORITES_REMOVE="favorites_remove_part",_.FAVORITES_ADD="favorites_add_part",_.ECR_DETAILS_ENTER="ecr_details_enter",_.ECR_LIST="ecr_list",_.ECR_CALL="ecr_call",_.ECR_FORM_SUBMIT="ecr_form_submit",_.ECR_FORM_ENTER="ecr_form_enter",_.SEARCH_INPUT_CODE_SCANNING="search_input_code_scanning",_.SEARCH_INPUT_BOM_FILTER="search_input_bom_filter",_.SEARCH_INPUT_ATTRIBUTE_FILTERS="search_input_attribute_filters",_.SEARCH_INPUT_SEMANTIC_TAGS="search_input_semantic_tags",_.SEARCH_INPUT_SMART_FILTER_APPLIED="search_input_smart_filter_applied",_.SEARCH_RESULTS_STS="search_results_sts",_.SEARCH_RESULTS_VM="search_results_vm",_.SEARCH_RESULTS_HVT="search_results_hvt",_.SEARCH_RESULTS_SMMS_FLOW="search_results_smms_flow",_.SEARCH_RESULTS_FUSION="search_results_fusion",_.SEARCH_SESSION_CREATE="search_session_create",_.SEARCH_ASSISTANCE_OCR="search_assistance_ocr",_.INQUIRY_EXPORTED="inquiry_exported",_.EXPERT_OPENS_INQUIRY="expert_opens_inquiry",_.CSA_EXPERT_STARTS_EXPERT_SEARCH="csa_expert_starts_expert_search",_.CSA_INVITES_EXPERT="csa_invites_expert"}(EVENT||(exports.EVENT=EVENT={})),function(_){_.FIND_APP="find_app",_.API_ACCESS="api_access",_.AGENT_PORTAL_APP="agent_portal_app",_.ANALYTICS_APP="analytics_app",_.DATA_CLEANSING_APP="data_cleansing_app",_.DATA_ENRICHMENT_APP="data_enrichment_app",_.AGENT_APP="agent_app",_.GLOBAL_APP="global_app"}(INTERFACE||(exports.INTERFACE=INTERFACE={})),function(_){_.SEARCH="search",_.RECENTLY_VIEWED_PARTS="recently_viewed_parts",_.FAVORITES="favorites",_.ECR="ecr",_.SHOPPING_CART="shopping_cart",_.DATA_CLEANSING="data_cleansing",_.ANALYTICS="analytics",_.DATA_INSIGHTS="data_insights",_.DATA_ENRICHMENT="data_enrichment",_.AGENT="agent"}(PARTIUM_CONTEXT||(exports.PARTIUM_CONTEXT=PARTIUM_CONTEXT={})),function(_){_.TEXT_SEARCH="text_search",_.BOM_FILTER="bom_filter"}(OCR_CONTEXT||(exports.OCR_CONTEXT=OCR_CONTEXT={})),function(_){_.ASK_FOR_HELP="ask_for_help",_.ASK_FOR_CONFIRMATION="ask_for_confirmation"}(ECR_TYPE||(exports.ECR_TYPE=ECR_TYPE={})),function(_){_.V_1_0_0="1.0.0",_.V_2_0_0="2.0.0"}(EVENTLOG_VERSIONS||(exports.EVENTLOG_VERSIONS=EVENTLOG_VERSIONS={})),function(_){_.MATCHES_SEARCH_EXACTLY="matches_search_exactly",_.BEST_MATCH="best_match",_.NOT_MATCH_BUT_RELATED="not_match_but_related",_.NEEDS_CHECK_ELSEWHERE="needs_check_elsewhere",_.NOT_RELEVANT="not_relevant",_.OTHER="other"}(PART_RELEVANCY_LOG_TYPES||(exports.PART_RELEVANCY_LOG_TYPES=PART_RELEVANCY_LOG_TYPES={}));var EventLog=function(_){Object.assign(this,_)};exports.EventLog=EventLog;var eventLogRequestResponseAdapter=function(_){return function(e){return new EventLog(__assign(__assign({},_),{id:e.event_id,timestamp:new Date(e.timestamp)}))}};exports.eventLogRequestResponseAdapter=eventLogRequestResponseAdapter;
|
|
@@ -15,7 +15,8 @@ export declare enum BACKEND_SERVICE {
|
|
|
15
15
|
DATACURATION = 7,
|
|
16
16
|
DATA_V2 = 8,
|
|
17
17
|
DATA_ENRICHMENT = 9,
|
|
18
|
-
BACKOFFICE = 10
|
|
18
|
+
BACKOFFICE = 10,
|
|
19
|
+
SELECTION = 11
|
|
19
20
|
}
|
|
20
21
|
export interface BaseUrls {
|
|
21
22
|
partiumApiBaseUrl: string;
|
|
@@ -29,6 +30,7 @@ export interface BaseUrls {
|
|
|
29
30
|
dataV2BeBaseUrl: string;
|
|
30
31
|
dataEnrichmentBeBaseUrl: string;
|
|
31
32
|
backofficeBeBaseUrl: string;
|
|
33
|
+
selectionBeBaseUrl: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Defines the structure of a https-service implementation, which
|
|
@@ -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(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},e(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),__decorate=this&&this.__decorate||function(e,r,t,n){var o,s=arguments.length,i=s<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(r,t,i):o(r,t))||i);return s>3&&i&&Object.defineProperty(r,t,i),i};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpsService=exports.BACKEND_SERVICE=void 0;var BACKEND_SERVICE,base_service_1=require("../base.service"),rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),https_client_service_interface_1=require("./https-client/https-client.service.interface"),injection_identifier_1=require("../../decorators/injection-identifier");!function(e){e[e.PARTIUM=0]="PARTIUM",e[e.DATA=1]="DATA",e[e.CSA=2]="CSA",e[e.LOG=3]="LOG",e[e.USER_DATA=4]="USER_DATA",e[e.MANAGEMENT=5]="MANAGEMENT",e[e.CATALOG=6]="CATALOG",e[e.DATACURATION=7]="DATACURATION",e[e.DATA_V2=8]="DATA_V2",e[e.DATA_ENRICHMENT=9]="DATA_ENRICHMENT",e[e.BACKOFFICE=10]="BACKOFFICE"}(BACKEND_SERVICE||(exports.BACKEND_SERVICE=BACKEND_SERVICE={}));var HttpsService=function(e){function r(r){return e.call(this,r)||this}return __extends(r,e),r.prototype.onCreate=function(){this.httpsClientService=this.serviceProvider.getService(https_client_service_interface_1.HttpsClientService)},r.prototype.init=function(e,r){return this.baseUrls=e,this.config=r,(0,rxjs_1.of)(void 0)},r.prototype.get=function(e,r,t){var n=this;return(0,rxjs_1.defer)((function(){return n.configureHeaders({},t)})).pipe((0,operators_1.mergeMap)((function(o){return n.httpsClientService.get(n.createUrl(e,t),r,o)})),(0,operators_1.retryWhen)((function(e){return n.retryWhen(e)})),(0,operators_1.catchError)((function(e){return n.processError(e)})))},r.prototype.post=function(e,r,t,n,o){var s=this;return(0,rxjs_1.defer)((function(){return s.configureHeaders(o,n)})).pipe((0,operators_1.mergeMap)((function(o){return s.httpsClientService.post(s.createUrl(e,n),r,t,o)})),(0,operators_1.retryWhen)((function(e){return s.retryWhen(e)})),(0,operators_1.catchError)((function(e){return s.processError(e)})))},r.prototype.put=function(e,r,t,n,o){var s=this;return(0,rxjs_1.defer)((function(){return s.configureHeaders(o,n)})).pipe((0,operators_1.mergeMap)((function(o){return s.httpsClientService.put(s.createUrl(e,n),r,t,o)})),(0,operators_1.retryWhen)((function(e){return s.retryWhen(e)})),(0,operators_1.catchError)((function(e){return s.processError(e)})))},r.prototype.patch=function(e,r,t,n,o){var s=this;return(0,rxjs_1.defer)((function(){return s.configureHeaders(o,n)})).pipe((0,operators_1.mergeMap)((function(o){return s.httpsClientService.patch(s.createUrl(e,n),r,t,o)})),(0,operators_1.retryWhen)((function(e){return s.retryWhen(e)})),(0,operators_1.catchError)((function(e){return s.processError(e)})))},r.prototype.delete=function(e,r,t,n){var o=this;return(0,rxjs_1.defer)((function(){return o.configureHeaders({},n)})).pipe((0,operators_1.mergeMap)((function(s){return o.httpsClientService.delete(o.createUrl(e,n),r,t,s)})),(0,operators_1.retryWhen)((function(e){return o.retryWhen(e)})),(0,operators_1.catchError)((function(e){return o.processError(e)})))},r.prototype.setCurrentOrganization=function(e){this.currentOrganization$=e},r.prototype.retryWhen=function(e){return e.pipe((0,operators_1.mergeMap)((function(e){return(0,rxjs_1.throwError)(e)})))},r.prototype.processError=function(e){return(0,rxjs_1.throwError)(e)},r.prototype.createHeaders=function(e){throw new Error("In order to use the HttpsService, don't directly use this class, but one of it's descendants, by choosing a replacement with serviceProvider.useService().")},r.prototype.createUrl=function(e,r){for(void 0===r&&(r=BACKEND_SERVICE.PARTIUM);e.startsWith("/");)e=e.substring(1);var t;switch(r){case BACKEND_SERVICE.DATA:t=this.baseUrls.dataBeBaseUrl;break;case BACKEND_SERVICE.CSA:t=this.baseUrls.csaBeBaseUrl;break;case BACKEND_SERVICE.LOG:t=this.baseUrls.logBeBaseUrl;break;case BACKEND_SERVICE.USER_DATA:t=this.baseUrls.userDataBeBaseUrl;break;case BACKEND_SERVICE.MANAGEMENT:t=this.baseUrls.managementBeBaseUrl;break;case BACKEND_SERVICE.CATALOG:t=this.baseUrls.catalogBeBaseUrl;break;case BACKEND_SERVICE.DATACURATION:t=this.baseUrls.datacurationBeBaseUrl;break;case BACKEND_SERVICE.DATA_V2:t=this.baseUrls.dataV2BeBaseUrl;break;case BACKEND_SERVICE.DATA_ENRICHMENT:t=this.baseUrls.dataEnrichmentBeBaseUrl;break;case BACKEND_SERVICE.BACKOFFICE:t=this.baseUrls.backofficeBeBaseUrl;break;case BACKEND_SERVICE.PARTIUM:default:t=this.baseUrls.partiumApiBaseUrl}return[t,e].join("/")},r.prototype.configureHeaders=function(e,r){var t=this.createHeaders(e);return this.config.externalUserId&&r!==BACKEND_SERVICE.LOG&&(t["X-Partium-ExternalUserId"]=this.config.externalUserId),this.currentOrganization$?this.currentOrganization$.pipe((0,operators_1.first)(),(0,operators_1.map)((function(e){return(null==e?void 0:e.name)&&(t["X-Partium-Data-Organization"]=e.name),t}))):(0,rxjs_1.of)(t)},r=__decorate([(0,injection_identifier_1.InjectionIdentifier)("HttpsService")],r)}(base_service_1.BaseService);exports.HttpsService=HttpsService;
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},e(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),__decorate=this&&this.__decorate||function(e,r,t,n){var o,s=arguments.length,i=s<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(r,t,i):o(r,t))||i);return s>3&&i&&Object.defineProperty(r,t,i),i};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpsService=exports.BACKEND_SERVICE=void 0;var BACKEND_SERVICE,base_service_1=require("../base.service"),rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),https_client_service_interface_1=require("./https-client/https-client.service.interface"),injection_identifier_1=require("../../decorators/injection-identifier");!function(e){e[e.PARTIUM=0]="PARTIUM",e[e.DATA=1]="DATA",e[e.CSA=2]="CSA",e[e.LOG=3]="LOG",e[e.USER_DATA=4]="USER_DATA",e[e.MANAGEMENT=5]="MANAGEMENT",e[e.CATALOG=6]="CATALOG",e[e.DATACURATION=7]="DATACURATION",e[e.DATA_V2=8]="DATA_V2",e[e.DATA_ENRICHMENT=9]="DATA_ENRICHMENT",e[e.BACKOFFICE=10]="BACKOFFICE",e[e.SELECTION=11]="SELECTION"}(BACKEND_SERVICE||(exports.BACKEND_SERVICE=BACKEND_SERVICE={}));var HttpsService=function(e){function r(r){return e.call(this,r)||this}return __extends(r,e),r.prototype.onCreate=function(){this.httpsClientService=this.serviceProvider.getService(https_client_service_interface_1.HttpsClientService)},r.prototype.init=function(e,r){return this.baseUrls=e,this.config=r,(0,rxjs_1.of)(void 0)},r.prototype.get=function(e,r,t){var n=this;return(0,rxjs_1.defer)((function(){return n.configureHeaders({},t)})).pipe((0,operators_1.mergeMap)((function(o){return n.httpsClientService.get(n.createUrl(e,t),r,o)})),(0,operators_1.retryWhen)((function(e){return n.retryWhen(e)})),(0,operators_1.catchError)((function(e){return n.processError(e)})))},r.prototype.post=function(e,r,t,n,o){var s=this;return(0,rxjs_1.defer)((function(){return s.configureHeaders(o,n)})).pipe((0,operators_1.mergeMap)((function(o){return s.httpsClientService.post(s.createUrl(e,n),r,t,o)})),(0,operators_1.retryWhen)((function(e){return s.retryWhen(e)})),(0,operators_1.catchError)((function(e){return s.processError(e)})))},r.prototype.put=function(e,r,t,n,o){var s=this;return(0,rxjs_1.defer)((function(){return s.configureHeaders(o,n)})).pipe((0,operators_1.mergeMap)((function(o){return s.httpsClientService.put(s.createUrl(e,n),r,t,o)})),(0,operators_1.retryWhen)((function(e){return s.retryWhen(e)})),(0,operators_1.catchError)((function(e){return s.processError(e)})))},r.prototype.patch=function(e,r,t,n,o){var s=this;return(0,rxjs_1.defer)((function(){return s.configureHeaders(o,n)})).pipe((0,operators_1.mergeMap)((function(o){return s.httpsClientService.patch(s.createUrl(e,n),r,t,o)})),(0,operators_1.retryWhen)((function(e){return s.retryWhen(e)})),(0,operators_1.catchError)((function(e){return s.processError(e)})))},r.prototype.delete=function(e,r,t,n){var o=this;return(0,rxjs_1.defer)((function(){return o.configureHeaders({},n)})).pipe((0,operators_1.mergeMap)((function(s){return o.httpsClientService.delete(o.createUrl(e,n),r,t,s)})),(0,operators_1.retryWhen)((function(e){return o.retryWhen(e)})),(0,operators_1.catchError)((function(e){return o.processError(e)})))},r.prototype.setCurrentOrganization=function(e){this.currentOrganization$=e},r.prototype.retryWhen=function(e){return e.pipe((0,operators_1.mergeMap)((function(e){return(0,rxjs_1.throwError)(e)})))},r.prototype.processError=function(e){return(0,rxjs_1.throwError)(e)},r.prototype.createHeaders=function(e){throw new Error("In order to use the HttpsService, don't directly use this class, but one of it's descendants, by choosing a replacement with serviceProvider.useService().")},r.prototype.createUrl=function(e,r){for(void 0===r&&(r=BACKEND_SERVICE.PARTIUM);e.startsWith("/");)e=e.substring(1);var t;switch(r){case BACKEND_SERVICE.DATA:t=this.baseUrls.dataBeBaseUrl;break;case BACKEND_SERVICE.CSA:t=this.baseUrls.csaBeBaseUrl;break;case BACKEND_SERVICE.LOG:t=this.baseUrls.logBeBaseUrl;break;case BACKEND_SERVICE.USER_DATA:t=this.baseUrls.userDataBeBaseUrl;break;case BACKEND_SERVICE.MANAGEMENT:t=this.baseUrls.managementBeBaseUrl;break;case BACKEND_SERVICE.CATALOG:t=this.baseUrls.catalogBeBaseUrl;break;case BACKEND_SERVICE.DATACURATION:t=this.baseUrls.datacurationBeBaseUrl;break;case BACKEND_SERVICE.DATA_V2:t=this.baseUrls.dataV2BeBaseUrl;break;case BACKEND_SERVICE.DATA_ENRICHMENT:t=this.baseUrls.dataEnrichmentBeBaseUrl;break;case BACKEND_SERVICE.BACKOFFICE:t=this.baseUrls.backofficeBeBaseUrl;break;case BACKEND_SERVICE.SELECTION:t=this.baseUrls.selectionBeBaseUrl;break;case BACKEND_SERVICE.PARTIUM:default:t=this.baseUrls.partiumApiBaseUrl}return[t,e].join("/")},r.prototype.configureHeaders=function(e,r){var t=this.createHeaders(e);return this.config.externalUserId&&r!==BACKEND_SERVICE.LOG&&(t["X-Partium-ExternalUserId"]=this.config.externalUserId),this.currentOrganization$?this.currentOrganization$.pipe((0,operators_1.first)(),(0,operators_1.map)((function(e){return(null==e?void 0:e.name)&&(t["X-Partium-Data-Organization"]=e.name),t}))):(0,rxjs_1.of)(t)},r=__decorate([(0,injection_identifier_1.InjectionIdentifier)("HttpsService")],r)}(base_service_1.BaseService);exports.HttpsService=HttpsService;
|
package/gen/sdk-version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
export declare const SDK_VERSION_NUMBER = "16.
|
|
2
|
+
export declare const SDK_VERSION_NUMBER = "16.1.0";
|
package/gen/sdk-version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="16.
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="16.1.0";
|
package/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { PartEnrichmentService } from './data/services/part-enrichment.service';
|
|
|
26
26
|
import { ImagesService } from './catalog/services/images.service';
|
|
27
27
|
import { ImageSubmissionService } from './datacuration';
|
|
28
28
|
import { DataEnrichmentService } from './enrichment';
|
|
29
|
+
import { SelectionService } from './selection';
|
|
29
30
|
export declare enum INITIALIZATION_STATUS {
|
|
30
31
|
NOT_INITIALIZED = 0,
|
|
31
32
|
INITIALIZING = 1,
|
|
@@ -71,6 +72,7 @@ export declare class Partium {
|
|
|
71
72
|
static get images(): ImagesService;
|
|
72
73
|
static get imageSubmission(): ImageSubmissionService;
|
|
73
74
|
static get dataEnrichment(): DataEnrichmentService;
|
|
75
|
+
static get selection(): SelectionService;
|
|
74
76
|
/**
|
|
75
77
|
* Initialize the Partium SDK with a given configuration.
|
|
76
78
|
* The configuration defines what Authentication method is used and which
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Partium=exports.INITIALIZATION_STATUS=void 0;var INITIALIZATION_STATUS,rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),core_1=require("./core"),auth_config_1=require("./core/models/auth-config"),partium_config_1=require("./core/models/partium-config"),backend_status_service_1=require("./core/services/backend-status.service"),device_status_service_interface_1=require("./core/services/device-status.service.interface"),file_service_interface_1=require("./core/services/file.service.interface"),file_transfer_service_interface_1=require("./core/services/http/file-transfer/file-transfer.service.interface"),https_client_service_interface_1=require("./core/services/http/https-client/https-client.service.interface"),https_service_interface_1=require("./core/services/http/https.service.interface"),local_storage_service_interface_1=require("./core/services/local-storage.service.interface"),log_service_1=require("./core/services/log.service"),service_provider_1=require("./core/services/service-provider"),session_service_interface_1=require("./core/services/session/session.service.interface"),data_1=require("./data"),filter_service_1=require("./data/services/filter.service"),part_attribute_service_1=require("./data/services/part-attribute.service"),part_service_1=require("./data/services/part.service"),request_list_service_1=require("./user-data/services/request-list/request-list.service"),favorite_service_1=require("./user-data/services/favorite/favorite.service"),asset_service_1=require("./find/services/asset.service"),search_service_1=require("./find/services/search/search.service"),sdk_version_1=require("./gen/sdk-version"),recent_text_search_queries_service_1=require("./find/services/search/recent-text-search-queries.service"),ocr_1=require("./ocr"),shopping_cart_service_1=require("./data/services/shopping-cart.service"),inquiry_service_1=require("./data/services/inquiry.service"),announcement_service_1=require("./data/services/announcement.service"),related_parts_service_1=require("./data/services/related-parts.service"),constants_1=require("./core/constants/constants"),management_1=require("./management"),part_enrichment_service_1=require("./data/services/part-enrichment.service"),images_service_1=require("./catalog/services/images.service"),datacuration_1=require("./datacuration"),enrichment_1=require("./enrichment");!function(e){e[e.NOT_INITIALIZED=0]="NOT_INITIALIZED",e[e.INITIALIZING=1]="INITIALIZING",e[e.INITIALIZED=2]="INITIALIZED",e[e.INITIALIZATION_ERROR=3]="INITIALIZATION_ERROR"}(INITIALIZATION_STATUS||(exports.INITIALIZATION_STATUS=INITIALIZATION_STATUS={}));var Partium=function(){function e(){}return Object.defineProperty(e,"search",{get:function(){return e.getService(search_service_1.SearchServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"asset",{get:function(){return e.getService(asset_service_1.AssetServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"https",{get:function(){return e.getService(https_service_interface_1.HttpsService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"fileTransfer",{get:function(){return e.getService(file_transfer_service_interface_1.FileTransferService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"session",{get:function(){return e.getService(session_service_interface_1.SessionService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"assemblyHierarchyNode",{get:function(){return e.getService(data_1.AssemblyHierarchyNodesServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"part",{get:function(){return e.getService(part_service_1.PartServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"partEnrichment",{get:function(){return e.getService(part_enrichment_service_1.PartEnrichmentServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"relatedParts",{get:function(){return e.getService(related_parts_service_1.RelatedPartsServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"requestList",{get:function(){return e.getService(request_list_service_1.RequestListServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"shoppingCart",{get:function(){return e.getService(shopping_cart_service_1.ShoppingCartServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"partAttribute",{get:function(){return e.getService(part_attribute_service_1.PartAttributeServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"data",{get:function(){return e.getService(data_1.DataServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"inquiry",{get:function(){return e.getService(inquiry_service_1.InquiryServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"announcement",{get:function(){return e.getService(announcement_service_1.AnnouncementServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"customerServiceAssistance",{get:function(){return e.getService(data_1.CustomerServiceAssistanceServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"log",{get:function(){return e.getService(log_service_1.LogServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"file",{get:function(){return e.getService(file_service_interface_1.FileService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"recentParts",{get:function(){return e.getService(core_1.RecentPartsServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"favorites",{get:function(){return e.getService(favorite_service_1.FavoriteServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"filters",{get:function(){return e.getService(filter_service_1.FilterServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"organization",{get:function(){return e.getService(core_1.OrganizationServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"ocr",{get:function(){return e.getService(ocr_1.OcrServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"apiKey",{get:function(){return e.getService(management_1.ApiKeyServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"localStorage",{get:function(){return e.getService(local_storage_service_interface_1.LocalStorageService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"images",{get:function(){return e.getService(images_service_1.ImagesServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"imageSubmission",{get:function(){return e.getService(datacuration_1.ImageSubmissionServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dataEnrichment",{get:function(){return e.getService(enrichment_1.DataEnrichmentServiceImpl)},enumerable:!1,configurable:!0}),e.init=function(r){console.log("Initializing Partium...",r),e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZING),e._serviceProvider||(e._serviceProvider=new service_provider_1.ServiceProvider);var i=[r.partiumApiBaseUrl,r.partiumLoginUrl].filter((function(e){return!!e}));switch(e._serviceProvider.useService(r.httpsClientService,https_client_service_interface_1.HttpsClientService,i),e._serviceProvider.useService(r.fileTransferService,file_transfer_service_interface_1.FileTransferService,i),e._serviceProvider.useService(r.localStorageService,local_storage_service_interface_1.LocalStorageService),e._serviceProvider.useService(r.deviceStatusService,device_status_service_interface_1.DeviceStatusService),e._serviceProvider.useService(r.fileService,file_service_interface_1.FileService),r.authenticationMethod){case partium_config_1.AUTHENTICATION_METHOD.OAUTH_API_KEY:case partium_config_1.AUTHENTICATION_METHOD.OAUTH:e._serviceProvider.useService(r.authenticationConfig.oauthHttpsService,https_service_interface_1.HttpsService),e._serviceProvider.useService(r.authenticationConfig.oauthSessionService,session_service_interface_1.SessionService)}e._serviceProvider.serviceSelectionFinished();var t=e.getService(session_service_interface_1.SessionService),n=e.getService(local_storage_service_interface_1.LocalStorageService);t.registerLoginInitService(n,1);var c=e.getService(asset_service_1.AssetServiceImpl);t.registerLoginInitService(c,2);var a=e.getService(core_1.RecentPartsServiceImpl);t.registerLoginInitService(a,2);var s=e.getService(recent_text_search_queries_service_1.RecentTextSearchQueriesServiceImpl);t.registerLoginInitService(s,2);var o=e.getService(favorite_service_1.FavoriteServiceImpl);t.registerLoginInitService(o,2);var _=e.getService(data_1.CustomerServiceAssistanceServiceImpl);t.registerLoginInitService(_,2);var u=e.getService(search_service_1.SearchServiceImpl);t.registerLoginInitService(u,2);var v=e.getService(log_service_1.LogServiceImpl);t.registerLoginInitService(v,2);var l=e.getService(https_service_interface_1.HttpsService),I=e.getService(backend_status_service_1.BackendStatusService);return I.init(sdk_version_1.SDK_VERSION_NUMBER,"en",e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_STATUS_API_URL]),constants_1.BACKEND_STATUS_FALLBACK_URL),I.checkCompatibility().pipe((0,operators_1.mergeMap)((function(){return I.checkAvailability()})),(0,operators_1.mergeMap)((function(){return t.init(r)})),(0,operators_1.mergeMap)((function(){return l.init({partiumApiBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION)]),dataBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATA_API_URL]),csaBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_CSA_API_URL]),logBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_LOGS_API_URL]),userDataBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_USER_DATA_API_URL]),managementBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_MANAGEMENT_API_URL]),catalogBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_CATALOG_API_URL]),datacurationBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATACURATION_API_URL]),dataV2BeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATA_V2_API_URL]),dataEnrichmentBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATA_ENRICHMENT_API_URL]),backofficeBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_BACKOFFICE_API_URL])},r.authenticationConfig)})),(0,operators_1.tap)((function(){l.setCurrentOrganization(t.getCurrentOrganization$())})),(0,operators_1.tap)((function(){e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZED)})),(0,operators_1.catchError)((function(r){return e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZATION_ERROR),e.reset(),(0,rxjs_1.throwError)((function(){return r}))})))},e.initApiKey=function(r){return e.init(new partium_config_1.PartiumConfig({authenticationConfig:new auth_config_1.OauthApiKeyAuthenticationConfig({apiKey:r})}))},e.reset=function(){e._serviceProvider=null,e._initializationStatus$.next(INITIALIZATION_STATUS.NOT_INITIALIZED)},e.getInitializationStatus=function(){return e._initializationStatus$.asObservable()},e.getOrganizations=function(r){return e.ensureInitialized(),(0,rxjs_1.firstValueFrom)(e.getService(core_1.OrganizationServiceImpl).loadOrganizations(r))},e.useOrganizationById=function(r){return e.ensureInitialized(),e.session.useOrganizationById(r)},e.useOrganizationByName=function(r){return e.ensureInitialized(),e.session.useOrganizationByName(r)},e.getService=function(r){return e._serviceProvider||(e._serviceProvider=new service_provider_1.ServiceProvider),e._serviceProvider.getService(r)},e.isInitialized=function(){return e._initializationStatus$.value===INITIALIZATION_STATUS.INITIALIZED},e.ensureInitialized=function(){if(!e.isInitialized())throw"Partium-JS-SDK not initialized. Make sure to initialize the Partium-JS-SDK before you try to use it's features!"},e.buildUrl=function(e){for(var r=[],i=0,t=e;i<t.length;i++){var n=t[i];r.push(n.replace(/^\/+/,"").replace(/\/+$/,""))}return r.join("/")},e._serviceProvider=null,e._initializationStatus$=new rxjs_1.BehaviorSubject(INITIALIZATION_STATUS.NOT_INITIALIZED),e}();exports.Partium=Partium;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Partium=exports.INITIALIZATION_STATUS=void 0;var INITIALIZATION_STATUS,rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),core_1=require("./core"),auth_config_1=require("./core/models/auth-config"),partium_config_1=require("./core/models/partium-config"),backend_status_service_1=require("./core/services/backend-status.service"),device_status_service_interface_1=require("./core/services/device-status.service.interface"),file_service_interface_1=require("./core/services/file.service.interface"),file_transfer_service_interface_1=require("./core/services/http/file-transfer/file-transfer.service.interface"),https_client_service_interface_1=require("./core/services/http/https-client/https-client.service.interface"),https_service_interface_1=require("./core/services/http/https.service.interface"),local_storage_service_interface_1=require("./core/services/local-storage.service.interface"),log_service_1=require("./core/services/log.service"),service_provider_1=require("./core/services/service-provider"),session_service_interface_1=require("./core/services/session/session.service.interface"),data_1=require("./data"),filter_service_1=require("./data/services/filter.service"),part_attribute_service_1=require("./data/services/part-attribute.service"),part_service_1=require("./data/services/part.service"),request_list_service_1=require("./user-data/services/request-list/request-list.service"),favorite_service_1=require("./user-data/services/favorite/favorite.service"),asset_service_1=require("./find/services/asset.service"),search_service_1=require("./find/services/search/search.service"),sdk_version_1=require("./gen/sdk-version"),recent_text_search_queries_service_1=require("./find/services/search/recent-text-search-queries.service"),ocr_1=require("./ocr"),shopping_cart_service_1=require("./data/services/shopping-cart.service"),inquiry_service_1=require("./data/services/inquiry.service"),announcement_service_1=require("./data/services/announcement.service"),related_parts_service_1=require("./data/services/related-parts.service"),constants_1=require("./core/constants/constants"),management_1=require("./management"),part_enrichment_service_1=require("./data/services/part-enrichment.service"),images_service_1=require("./catalog/services/images.service"),datacuration_1=require("./datacuration"),enrichment_1=require("./enrichment"),selection_1=require("./selection");!function(e){e[e.NOT_INITIALIZED=0]="NOT_INITIALIZED",e[e.INITIALIZING=1]="INITIALIZING",e[e.INITIALIZED=2]="INITIALIZED",e[e.INITIALIZATION_ERROR=3]="INITIALIZATION_ERROR"}(INITIALIZATION_STATUS||(exports.INITIALIZATION_STATUS=INITIALIZATION_STATUS={}));var Partium=function(){function e(){}return Object.defineProperty(e,"search",{get:function(){return e.getService(search_service_1.SearchServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"asset",{get:function(){return e.getService(asset_service_1.AssetServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"https",{get:function(){return e.getService(https_service_interface_1.HttpsService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"fileTransfer",{get:function(){return e.getService(file_transfer_service_interface_1.FileTransferService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"session",{get:function(){return e.getService(session_service_interface_1.SessionService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"assemblyHierarchyNode",{get:function(){return e.getService(data_1.AssemblyHierarchyNodesServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"part",{get:function(){return e.getService(part_service_1.PartServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"partEnrichment",{get:function(){return e.getService(part_enrichment_service_1.PartEnrichmentServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"relatedParts",{get:function(){return e.getService(related_parts_service_1.RelatedPartsServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"requestList",{get:function(){return e.getService(request_list_service_1.RequestListServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"shoppingCart",{get:function(){return e.getService(shopping_cart_service_1.ShoppingCartServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"partAttribute",{get:function(){return e.getService(part_attribute_service_1.PartAttributeServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"data",{get:function(){return e.getService(data_1.DataServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"inquiry",{get:function(){return e.getService(inquiry_service_1.InquiryServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"announcement",{get:function(){return e.getService(announcement_service_1.AnnouncementServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"customerServiceAssistance",{get:function(){return e.getService(data_1.CustomerServiceAssistanceServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"log",{get:function(){return e.getService(log_service_1.LogServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"file",{get:function(){return e.getService(file_service_interface_1.FileService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"recentParts",{get:function(){return e.getService(core_1.RecentPartsServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"favorites",{get:function(){return e.getService(favorite_service_1.FavoriteServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"filters",{get:function(){return e.getService(filter_service_1.FilterServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"organization",{get:function(){return e.getService(core_1.OrganizationServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"ocr",{get:function(){return e.getService(ocr_1.OcrServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"apiKey",{get:function(){return e.getService(management_1.ApiKeyServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"localStorage",{get:function(){return e.getService(local_storage_service_interface_1.LocalStorageService)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"images",{get:function(){return e.getService(images_service_1.ImagesServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"imageSubmission",{get:function(){return e.getService(datacuration_1.ImageSubmissionServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dataEnrichment",{get:function(){return e.getService(enrichment_1.DataEnrichmentServiceImpl)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"selection",{get:function(){return e.getService(selection_1.SelectionServiceImpl)},enumerable:!1,configurable:!0}),e.init=function(r){console.log("Initializing Partium...",r),e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZING),e._serviceProvider||(e._serviceProvider=new service_provider_1.ServiceProvider);var i=[r.partiumApiBaseUrl,r.partiumLoginUrl].filter((function(e){return!!e}));switch(e._serviceProvider.useService(r.httpsClientService,https_client_service_interface_1.HttpsClientService,i),e._serviceProvider.useService(r.fileTransferService,file_transfer_service_interface_1.FileTransferService,i),e._serviceProvider.useService(r.localStorageService,local_storage_service_interface_1.LocalStorageService),e._serviceProvider.useService(r.deviceStatusService,device_status_service_interface_1.DeviceStatusService),e._serviceProvider.useService(r.fileService,file_service_interface_1.FileService),r.authenticationMethod){case partium_config_1.AUTHENTICATION_METHOD.OAUTH_API_KEY:case partium_config_1.AUTHENTICATION_METHOD.OAUTH:e._serviceProvider.useService(r.authenticationConfig.oauthHttpsService,https_service_interface_1.HttpsService),e._serviceProvider.useService(r.authenticationConfig.oauthSessionService,session_service_interface_1.SessionService)}e._serviceProvider.serviceSelectionFinished();var t=e.getService(session_service_interface_1.SessionService),n=e.getService(local_storage_service_interface_1.LocalStorageService);t.registerLoginInitService(n,1);var c=e.getService(asset_service_1.AssetServiceImpl);t.registerLoginInitService(c,2);var a=e.getService(core_1.RecentPartsServiceImpl);t.registerLoginInitService(a,2);var s=e.getService(recent_text_search_queries_service_1.RecentTextSearchQueriesServiceImpl);t.registerLoginInitService(s,2);var o=e.getService(favorite_service_1.FavoriteServiceImpl);t.registerLoginInitService(o,2);var _=e.getService(data_1.CustomerServiceAssistanceServiceImpl);t.registerLoginInitService(_,2);var u=e.getService(search_service_1.SearchServiceImpl);t.registerLoginInitService(u,2);var v=e.getService(log_service_1.LogServiceImpl);t.registerLoginInitService(v,2);var l=e.getService(https_service_interface_1.HttpsService),I=e.getService(backend_status_service_1.BackendStatusService);return I.init(sdk_version_1.SDK_VERSION_NUMBER,"en",e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_STATUS_API_URL]),constants_1.BACKEND_STATUS_FALLBACK_URL),I.checkCompatibility().pipe((0,operators_1.mergeMap)((function(){return I.checkAvailability()})),(0,operators_1.mergeMap)((function(){return t.init(r)})),(0,operators_1.mergeMap)((function(){return l.init({partiumApiBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION)]),dataBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATA_API_URL]),csaBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_CSA_API_URL]),logBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_LOGS_API_URL]),userDataBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_USER_DATA_API_URL]),managementBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_MANAGEMENT_API_URL]),catalogBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_CATALOG_API_URL]),datacurationBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATACURATION_API_URL]),dataV2BeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATA_V2_API_URL]),dataEnrichmentBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_DATA_ENRICHMENT_API_URL]),backofficeBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_BACKOFFICE_API_URL]),selectionBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_SELECTION_API_URL])},r.authenticationConfig)})),(0,operators_1.tap)((function(){l.setCurrentOrganization(t.getCurrentOrganization$())})),(0,operators_1.tap)((function(){e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZED)})),(0,operators_1.catchError)((function(r){return e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZATION_ERROR),e.reset(),(0,rxjs_1.throwError)((function(){return r}))})))},e.initApiKey=function(r){return e.init(new partium_config_1.PartiumConfig({authenticationConfig:new auth_config_1.OauthApiKeyAuthenticationConfig({apiKey:r})}))},e.reset=function(){e._serviceProvider=null,e._initializationStatus$.next(INITIALIZATION_STATUS.NOT_INITIALIZED)},e.getInitializationStatus=function(){return e._initializationStatus$.asObservable()},e.getOrganizations=function(r){return e.ensureInitialized(),(0,rxjs_1.firstValueFrom)(e.getService(core_1.OrganizationServiceImpl).loadOrganizations(r))},e.useOrganizationById=function(r){return e.ensureInitialized(),e.session.useOrganizationById(r)},e.useOrganizationByName=function(r){return e.ensureInitialized(),e.session.useOrganizationByName(r)},e.getService=function(r){return e._serviceProvider||(e._serviceProvider=new service_provider_1.ServiceProvider),e._serviceProvider.getService(r)},e.isInitialized=function(){return e._initializationStatus$.value===INITIALIZATION_STATUS.INITIALIZED},e.ensureInitialized=function(){if(!e.isInitialized())throw"Partium-JS-SDK not initialized. Make sure to initialize the Partium-JS-SDK before you try to use it's features!"},e.buildUrl=function(e){for(var r=[],i=0,t=e;i<t.length;i++){var n=t[i];r.push(n.replace(/^\/+/,"").replace(/\/+$/,""))}return r.join("/")},e._serviceProvider=null,e._initializationStatus$=new rxjs_1.BehaviorSubject(INITIALIZATION_STATUS.NOT_INITIALIZED),e}();exports.Partium=Partium;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@partium/js-sdk",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.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.",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
export * from './services/selection.service';
|
|
3
|
+
export * from './models/add-parts-from-file-to-selection-request';
|
|
4
|
+
export * from './models/add-parts-from-file-to-selection-response';
|
|
5
|
+
export * from './models/create-selection-request';
|
|
6
|
+
export * from './models/create-selection-response';
|
|
7
|
+
export * from './models/add-parts-to-selection-request';
|
|
8
|
+
export * from './models/add-parts-to-selection-response';
|
|
9
|
+
export * from './models/remove-parts-from-selection-request';
|
|
10
|
+
export * from './models/remove-parts-from-selection-response';
|
|
11
|
+
export * from './models/add-all-search-session-parts-to-selection-request';
|
|
12
|
+
export * from './models/add-all-search-session-parts-to-selection-response';
|
|
13
|
+
export * from './models/remove-all-search-session-parts-from-selection-request';
|
|
14
|
+
export * from './models/remove-all-search-session-parts-from-selection-response';
|
|
15
|
+
export * from './models/check-which-parts-in-selection-request';
|
|
16
|
+
export * from './models/check-which-parts-in-selection-response';
|
|
17
|
+
export * from './models/selection-search-summary-response';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,o)}:function(e,r,t,s){void 0===s&&(s=t),e[s]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./services/selection.service"),exports),__exportStar(require("./models/add-parts-from-file-to-selection-request"),exports),__exportStar(require("./models/add-parts-from-file-to-selection-response"),exports),__exportStar(require("./models/create-selection-request"),exports),__exportStar(require("./models/create-selection-response"),exports),__exportStar(require("./models/add-parts-to-selection-request"),exports),__exportStar(require("./models/add-parts-to-selection-response"),exports),__exportStar(require("./models/remove-parts-from-selection-request"),exports),__exportStar(require("./models/remove-parts-from-selection-response"),exports),__exportStar(require("./models/add-all-search-session-parts-to-selection-request"),exports),__exportStar(require("./models/add-all-search-session-parts-to-selection-response"),exports),__exportStar(require("./models/remove-all-search-session-parts-from-selection-request"),exports),__exportStar(require("./models/remove-all-search-session-parts-from-selection-response"),exports),__exportStar(require("./models/check-which-parts-in-selection-request"),exports),__exportStar(require("./models/check-which-parts-in-selection-response"),exports),__exportStar(require("./models/selection-search-summary-response"),exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
/**
|
|
3
|
+
* Request for adding parts to a selection from a file (eg CSV. file).
|
|
4
|
+
*/
|
|
5
|
+
export interface AddPartsFromFileToSelectionRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The file containing the part-ids to add to the selection.
|
|
8
|
+
*/
|
|
9
|
+
file: File;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
export declare enum AddPartsFromFileErrorType {
|
|
3
|
+
INVALID_PART_IDS = "invalid-part-ids",
|
|
4
|
+
PART_LIMIT_EXCEEDED = "part-limit-exceeded"
|
|
5
|
+
}
|
|
6
|
+
export interface InvalidPartIdsErrorDetails {
|
|
7
|
+
/**
|
|
8
|
+
* The part-ids that were invalid
|
|
9
|
+
*/
|
|
10
|
+
partIds: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface PartLimitExceededErrorDetails {
|
|
13
|
+
/**
|
|
14
|
+
* The limit that was exceeded
|
|
15
|
+
*/
|
|
16
|
+
limit: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Response for adding parts to a selection from a file (eg CSV. file).
|
|
20
|
+
*/
|
|
21
|
+
export interface AddPartsFromFileToSelectionResponse {
|
|
22
|
+
/**
|
|
23
|
+
* The amount of part-ids that were added to the selection
|
|
24
|
+
*/
|
|
25
|
+
addedPartsCount: number;
|
|
26
|
+
/**
|
|
27
|
+
* The errors that occurred while adding the parts to the selection
|
|
28
|
+
*/
|
|
29
|
+
errors?: {
|
|
30
|
+
[AddPartsFromFileErrorType.INVALID_PART_IDS]?: InvalidPartIdsErrorDetails;
|
|
31
|
+
[AddPartsFromFileErrorType.PART_LIMIT_EXCEEDED]?: PartLimitExceededErrorDetails;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var AddPartsFromFileErrorType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddPartsFromFileErrorType=void 0,function(r){r.INVALID_PART_IDS="invalid-part-ids",r.PART_LIMIT_EXCEEDED="part-limit-exceeded"}(AddPartsFromFileErrorType||(exports.AddPartsFromFileErrorType=AddPartsFromFileErrorType={}));
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { BaseService } from '../../core';
|
|
4
|
+
import { SelectionSearchSummaryResponse } from '../models/selection-search-summary-response';
|
|
5
|
+
import { AddPartsToSelectionRequest } from '../models/add-parts-to-selection-request';
|
|
6
|
+
import { AddPartsToSelectionResponse } from '../models/add-parts-to-selection-response';
|
|
7
|
+
import { RemovePartsFromSelectionRequest } from '../models/remove-parts-from-selection-request';
|
|
8
|
+
import { RemovePartsFromSelectionResponse } from '../models/remove-parts-from-selection-response';
|
|
9
|
+
import { AddAllSearchSessionPartsToSelectionRequest } from '../models/add-all-search-session-parts-to-selection-request';
|
|
10
|
+
import { AddAllSearchSessionPartsToSelectionResponse } from '../models/add-all-search-session-parts-to-selection-response';
|
|
11
|
+
import { RemoveAllSearchSessionPartsFromSelectionRequest } from '../models/remove-all-search-session-parts-from-selection-request';
|
|
12
|
+
import { RemoveAllSearchSessionPartsFromSelectionResponse } from '../models/remove-all-search-session-parts-from-selection-response';
|
|
13
|
+
import { CreateSelectionRequest } from '../models/create-selection-request';
|
|
14
|
+
import { CreateSelectionResponse } from '../models/create-selection-response';
|
|
15
|
+
import { AddPartsFromFileToSelectionRequest } from '../models/add-parts-from-file-to-selection-request';
|
|
16
|
+
import { AddPartsFromFileToSelectionResponse } from '../models/add-parts-from-file-to-selection-response';
|
|
17
|
+
import { CheckWhichPartsInSelectionRequest } from '../models/check-which-parts-in-selection-request';
|
|
18
|
+
import { CheckWhichPartsInSelectionResponse } from '../models/check-which-parts-in-selection-response';
|
|
19
|
+
/**
|
|
20
|
+
* Service for managing selections (internally modeled as part lists).
|
|
21
|
+
*/
|
|
22
|
+
export interface SelectionService {
|
|
23
|
+
/**
|
|
24
|
+
* Create a new selection.
|
|
25
|
+
*
|
|
26
|
+
* @returns An Observable that emits the response
|
|
27
|
+
*/
|
|
28
|
+
createSelection(request: CreateSelectionRequest): Observable<CreateSelectionResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Add parts to the Given selection.
|
|
31
|
+
*
|
|
32
|
+
* @param partListId - The selection id.
|
|
33
|
+
* @param request - The request containing the selection id and the part ids to add.
|
|
34
|
+
* @returns An Observable that emits the response
|
|
35
|
+
*/
|
|
36
|
+
addPartsToSelection(partListId: string, request: AddPartsToSelectionRequest): Observable<AddPartsToSelectionResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Remove parts from the Given selection.
|
|
39
|
+
*
|
|
40
|
+
* @param partListId - The selection id.
|
|
41
|
+
* @param request - The request containing the selection id and the part ids to remove.
|
|
42
|
+
* @returns An Observable that emits the response
|
|
43
|
+
*/
|
|
44
|
+
removePartsFromSelection(partListId: string, request: RemovePartsFromSelectionRequest): Observable<RemovePartsFromSelectionResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Add all parts from the connected search session to the Given selection.
|
|
47
|
+
*
|
|
48
|
+
* @param partListId - The selection id.
|
|
49
|
+
* @param request - The request containing the search session id to add the parts to.
|
|
50
|
+
* @returns An Observable that emits the response
|
|
51
|
+
*/
|
|
52
|
+
addAllSearchSessionPartsToSelection(partListId: string, request: AddAllSearchSessionPartsToSelectionRequest): Observable<AddAllSearchSessionPartsToSelectionResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Remove all parts from the connected search session from the Given selection.
|
|
55
|
+
*
|
|
56
|
+
* @param partListId - The selection id.
|
|
57
|
+
* @param request - The request containing the search session id to remove the parts from.
|
|
58
|
+
* @returns An Observable that emits the response
|
|
59
|
+
*/
|
|
60
|
+
removeAllSearchSessionPartsFromSelection(partListId: string, request: RemoveAllSearchSessionPartsFromSelectionRequest): Observable<RemoveAllSearchSessionPartsFromSelectionResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Get the add and remove parts count for the Given selection.
|
|
63
|
+
*
|
|
64
|
+
* @param partListId - The selection id.
|
|
65
|
+
* @returns An Observable that emits the add and remove parts count.
|
|
66
|
+
*/
|
|
67
|
+
getSearchSummary(partListId: string): Observable<SelectionSearchSummaryResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Given part ids (e.g. from search), returns which of them are already in the selection.
|
|
70
|
+
*
|
|
71
|
+
* @param partListId - The selection id.
|
|
72
|
+
* @param request - Part ids to check.
|
|
73
|
+
*/
|
|
74
|
+
checkWhichPartsInSelection(partListId: string, request: CheckWhichPartsInSelectionRequest): Observable<CheckWhichPartsInSelectionResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Add parts to the Given selection from a file.
|
|
77
|
+
*
|
|
78
|
+
* @param partListId - The selection id.
|
|
79
|
+
* @param request - The request containing the file containing the part ids to add.
|
|
80
|
+
* @returns An Observable that emits the response
|
|
81
|
+
*/
|
|
82
|
+
addPartsFromFileToSelection(partListId: string, request: AddPartsFromFileToSelectionRequest): Observable<AddPartsFromFileToSelectionResponse>;
|
|
83
|
+
}
|
|
84
|
+
export declare class SelectionServiceImpl extends BaseService implements SelectionService {
|
|
85
|
+
private httpsService;
|
|
86
|
+
onCreate(): void;
|
|
87
|
+
createSelection(request: CreateSelectionRequest): Observable<CreateSelectionResponse>;
|
|
88
|
+
addPartsToSelection(partListId: string, request: AddPartsToSelectionRequest): Observable<AddPartsToSelectionResponse>;
|
|
89
|
+
removePartsFromSelection(partListId: string, request: RemovePartsFromSelectionRequest): Observable<RemovePartsFromSelectionResponse>;
|
|
90
|
+
addAllSearchSessionPartsToSelection(partListId: string, request: AddAllSearchSessionPartsToSelectionRequest): Observable<AddAllSearchSessionPartsToSelectionResponse>;
|
|
91
|
+
removeAllSearchSessionPartsFromSelection(partListId: string, request: RemoveAllSearchSessionPartsFromSelectionRequest): Observable<RemoveAllSearchSessionPartsFromSelectionResponse>;
|
|
92
|
+
getSearchSummary(partListId: string): Observable<SelectionSearchSummaryResponse>;
|
|
93
|
+
checkWhichPartsInSelection(partListId: string, request: CheckWhichPartsInSelectionRequest): Observable<CheckWhichPartsInSelectionResponse>;
|
|
94
|
+
addPartsFromFileToSelection(partListId: string, request: AddPartsFromFileToSelectionRequest): Observable<AddPartsFromFileToSelectionResponse>;
|
|
95
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
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 o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(e,t,r,o){var c,n=arguments.length,i=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(i=(n<3?c(i):n>3?c(t,r,i):c(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectionServiceImpl=void 0;var core_1=require("../../core"),SelectionServiceImpl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.createSelection=function(e){return this.httpsService.post("selections",e,[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.addPartsToSelection=function(e,t){return this.httpsService.post("selections/".concat(e,"/parts/add"),t,[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.removePartsFromSelection=function(e,t){return this.httpsService.post("selections/".concat(e,"/parts/remove"),t,[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.addAllSearchSessionPartsToSelection=function(e,t){return this.httpsService.post("selections/".concat(e,"/search/add"),t,[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.removeAllSearchSessionPartsFromSelection=function(e,t){return this.httpsService.post("selections/".concat(e,"/search/remove"),t,[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.getSearchSummary=function(e){return this.httpsService.get("selections/".concat(e,"/search/summary"),[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.checkWhichPartsInSelection=function(e,t){return this.httpsService.post("selections/".concat(e,"/parts/check"),t,[],core_1.BACKEND_SERVICE.SELECTION)},t.prototype.addPartsFromFileToSelection=function(e,t){var r=new FormData;return r.append("file",t.file),this.httpsService.post("selections/".concat(e,"/parts/add"),r,[],core_1.BACKEND_SERVICE.SELECTION,{"Content-Type":"multipart/form-data"})},t=__decorate([(0,core_1.InjectionIdentifier)("SelectionService")],t)}(core_1.BaseService);exports.SelectionServiceImpl=SelectionServiceImpl;
|