@partium/js-sdk 15.6.0 → 15.7.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.
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * The projection of the part data.
4
4
  */
5
- export type PartDataProjection = 'partiumId' | 'images' | 'supplierDiscovery' | 'identifiers';
5
+ export type PartDataProjection = 'partiumId' | 'images' | 'supplierDiscovery' | 'identifiers' | 'enrichedAttributes';
6
6
  /**
7
7
  * The request for the get part data request.
8
8
  */
@@ -23,4 +23,12 @@ export interface GetPartDataRequest {
23
23
  * The projection of the part data.
24
24
  */
25
25
  projection: PartDataProjection[];
26
+ /**
27
+ * The language used to resolve translated attribute names and values.
28
+ */
29
+ language?: string;
30
+ /**
31
+ * Ordered fallback languages used when the preferred language is missing.
32
+ */
33
+ fallbackLanguages?: string[];
26
34
  }
@@ -118,6 +118,46 @@ export interface PartDataIdentifiersResponse {
118
118
  */
119
119
  identifiers: PartDataIdentifierEntry[];
120
120
  }
121
+ /**
122
+ * The enrichment status of enriched attributes for the part.
123
+ */
124
+ export declare enum PartDataEnrichmentStatus {
125
+ NOT_TRIGGERED = "not_triggered",
126
+ IN_PROGRESS = "in_progress",
127
+ COMPLETED = "completed",
128
+ ERROR = "error",
129
+ NO_RESULTS = "no_results"
130
+ }
131
+ /**
132
+ * A single enriched attribute entry for the part.
133
+ */
134
+ export interface PartDataAttributeEntry {
135
+ /**
136
+ * Unique identifier for the attribute.
137
+ */
138
+ attributeId: string;
139
+ /**
140
+ * Display name of the attribute.
141
+ */
142
+ name?: string | null;
143
+ /**
144
+ * Enriched values for the attribute.
145
+ */
146
+ values: Array<string | null>;
147
+ }
148
+ /**
149
+ * The enriched attributes payload of a part.
150
+ */
151
+ export interface PartDataAttributesResponse {
152
+ /**
153
+ * The enrichment status for enriched attributes.
154
+ */
155
+ enrichmentStatus: PartDataEnrichmentStatus;
156
+ /**
157
+ * The enriched attributes for the part.
158
+ */
159
+ attributes: PartDataAttributeEntry[];
160
+ }
121
161
  /**
122
162
  * The data of a part.
123
163
  */
@@ -142,4 +182,8 @@ export interface PartData {
142
182
  * The identifiers data of the part.
143
183
  */
144
184
  identifiers?: PartDataIdentifiersResponse;
185
+ /**
186
+ * The enriched attributes data of the part.
187
+ */
188
+ enrichedAttributes?: PartDataAttributesResponse;
145
189
  }
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var PartDataSupplierDiscoveryStatus,PartDataIdentifiersStatus,PartDataIdentifierLabel,PartDataIdentifierOrigin;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartDataIdentifierOrigin=exports.PartDataIdentifierLabel=exports.PartDataIdentifiersStatus=exports.PartDataSupplierDiscoveryStatus=void 0,function(t){t.NOT_REQUESTED="not_requested",t.IN_PROGRESS="in_progress",t.SUCCESS="success",t.ERROR="error"}(PartDataSupplierDiscoveryStatus||(exports.PartDataSupplierDiscoveryStatus=PartDataSupplierDiscoveryStatus={})),function(t){t.NOT_REQUESTED="not_requested",t.IN_PROGRESS="in_progress",t.SUCCESS="success",t.ERROR="error"}(PartDataIdentifiersStatus||(exports.PartDataIdentifiersStatus=PartDataIdentifiersStatus={})),function(t){t.UPC="upc",t.SUPPLIER_NAME="supplier_name",t.SUPPLIER_ID="supplier_id",t.STANDARD="standard",t.SKU="sku",t.SERIAL_NUMBER="serial_number",t.OPM_NAME="opm_name",t.OPM_ID="opm_id",t.OEM_NAME="oem_name",t.OEM_ID="oem_id",t.MANUFACTURER_PART_NUMBER="manufacturer_part_number",t.MANUFACTURER_NAME="manufacturer_name",t.IDENTIFIER="identifier",t.EAN="ean",t.ARTICLE_BRAND="article_brand",t.ARTICLE_NUMBER="article_number"}(PartDataIdentifierLabel||(exports.PartDataIdentifierLabel=PartDataIdentifierLabel={})),function(t){t.INGESTED="ingested",t.EXTRACTED_FROM_PART_DATA="extracted_from_part_data",t.EXTRACTED_FROM_ENRICHMENT="extracted_from_enrichment"}(PartDataIdentifierOrigin||(exports.PartDataIdentifierOrigin=PartDataIdentifierOrigin={}));
2
+ "use strict";var PartDataSupplierDiscoveryStatus,PartDataIdentifiersStatus,PartDataIdentifierLabel,PartDataIdentifierOrigin,PartDataEnrichmentStatus;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartDataEnrichmentStatus=exports.PartDataIdentifierOrigin=exports.PartDataIdentifierLabel=exports.PartDataIdentifiersStatus=exports.PartDataSupplierDiscoveryStatus=void 0,function(t){t.NOT_REQUESTED="not_requested",t.IN_PROGRESS="in_progress",t.SUCCESS="success",t.ERROR="error"}(PartDataSupplierDiscoveryStatus||(exports.PartDataSupplierDiscoveryStatus=PartDataSupplierDiscoveryStatus={})),function(t){t.NOT_REQUESTED="not_requested",t.IN_PROGRESS="in_progress",t.SUCCESS="success",t.ERROR="error"}(PartDataIdentifiersStatus||(exports.PartDataIdentifiersStatus=PartDataIdentifiersStatus={})),function(t){t.UPC="upc",t.SUPPLIER_NAME="supplier_name",t.SUPPLIER_ID="supplier_id",t.STANDARD="standard",t.SKU="sku",t.SERIAL_NUMBER="serial_number",t.OPM_NAME="opm_name",t.OPM_ID="opm_id",t.OEM_NAME="oem_name",t.OEM_ID="oem_id",t.MANUFACTURER_PART_NUMBER="manufacturer_part_number",t.MANUFACTURER_NAME="manufacturer_name",t.IDENTIFIER="identifier",t.EAN="ean",t.ARTICLE_BRAND="article_brand",t.ARTICLE_NUMBER="article_number"}(PartDataIdentifierLabel||(exports.PartDataIdentifierLabel=PartDataIdentifierLabel={})),function(t){t.INGESTED="ingested",t.EXTRACTED_FROM_PART_DATA="extracted_from_part_data",t.EXTRACTED_FROM_ENRICHMENT="extracted_from_enrichment"}(PartDataIdentifierOrigin||(exports.PartDataIdentifierOrigin=PartDataIdentifierOrigin={})),function(t){t.NOT_TRIGGERED="not_triggered",t.IN_PROGRESS="in_progress",t.COMPLETED="completed",t.ERROR="error",t.NO_RESULTS="no_results"}(PartDataEnrichmentStatus||(exports.PartDataEnrichmentStatus=PartDataEnrichmentStatus={}));
@@ -1,2 +1,2 @@
1
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 o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(c=(i<3?n(c):i>3?n(e,r,c):n(e,r))||c);return i>3&&c&&Object.defineProperty(e,r,c),c},__rest=this&&this.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataServiceImpl=void 0;var core_1=require("../../core"),DataServiceImpl=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.getPart=function(t){void 0===t&&(t={projection:["partiumId"]});var e=t.projection,r=__rest(t,["projection"]),o=Array.from(new Set(e)).join(","),n=Object.entries(__assign(__assign({},r),{projection:o})).map((function(t){var e,r=t[0],o=t[1];return(e={})[r]=o,e}));return this.httpsService.get("part",n,core_1.BACKEND_SERVICE.DATA_V2)},e=__decorate([(0,core_1.InjectionIdentifier)("DataService")],e)}(core_1.BaseService);exports.DataServiceImpl=DataServiceImpl;
2
+ "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(t,r,c):o(t,r))||c);return i>3&&c&&Object.defineProperty(t,r,c),c},__rest=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataServiceImpl=void 0;var core_1=require("../../core"),DataServiceImpl=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.getPart=function(e){void 0===e&&(e={projection:["partiumId"]});var t=e.projection,r=e.fallbackLanguages,n=__rest(e,["projection","fallbackLanguages"]),o=Array.from(new Set(t)).join(","),i=(null==r?void 0:r.length)?Array.from(new Set(r)).join(","):void 0,c=Object.entries(__assign(__assign({},n),{projection:o,fallbackLanguages:i})).filter((function(e){return null!=e[1]})).map((function(e){var t,r=e[0],n=e[1];return(t={})[r]=n,t}));return this.httpsService.get("part",c,core_1.BACKEND_SERVICE.DATA_V2)},t=__decorate([(0,core_1.InjectionIdentifier)("DataService")],t)}(core_1.BaseService);exports.DataServiceImpl=DataServiceImpl;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- export declare const SDK_VERSION_NUMBER = "15.6.0";
2
+ export declare const SDK_VERSION_NUMBER = "15.7.0";
@@ -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="15.6.0";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="15.7.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@partium/js-sdk",
3
- "version": "15.6.0",
3
+ "version": "15.7.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.",