@partium/js-sdk 15.15.0 → 15.17.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/models/error.d.ts +1 -0
- package/core/models/error.js +1 -1
- package/core/utils/general-helper.d.ts +8 -0
- package/core/utils/general-helper.js +1 -1
- package/data/services/data.service.d.ts +31 -5
- package/data/services/data.service.js +1 -1
- package/datacuration/services/image-submission.service.d.ts +0 -1
- package/datacuration/services/image-submission.service.js +1 -1
- package/enrichment/models/submit-enrichment-job-request.d.ts +4 -0
- package/enrichment/services/data-enrichment.service.d.ts +0 -1
- package/enrichment/services/data-enrichment.service.js +1 -1
- package/gen/sdk-version.d.ts +1 -1
- package/gen/sdk-version.js +1 -1
- package/package.json +1 -1
package/core/models/error.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare enum SDK_ERROR_CODES {
|
|
|
40
40
|
INITIAL_ITEMS_NOT_YET_LOADED = "INITIAL_ITEMS_NOT_YET_LOADED",// the request for the first page of items has not yet finished
|
|
41
41
|
NO_MORE_ITEMS_AVAILABLE = "NO_MORE_ITEMS_AVAILABLE",// can't load more items, because the end of the list is reached
|
|
42
42
|
NO_PAGINATION_CURSOR_AVAILABLE = "NO_PAGINATION_CURSOR_AVAILABLE",// can't load more items, because there is no cursor available
|
|
43
|
+
INVALID_PAGINATION_CURSOR_URL = "INVALID_PAGINATION_CURSOR_URL",// backend returned an invalid next page URL
|
|
43
44
|
UNEXPECTED_API_VERSION = "UNEXPECTED_API_VERSION",// the function that was called can not be executed with the selected Backend-API version,
|
|
44
45
|
UNEXPECTED_SEARCH_VERSION = "UNEXPECTED_SEARCH_VERSION",// the search-function that was called can not be executed with the selected Backend-API version,
|
|
45
46
|
SSO_USER_CERT = "SSO_USER_CERT",
|
package/core/models/error.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var SDK_ERROR_CODES;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SdkError=exports.SDK_ERROR_CODES=void 0,function(E){E.NO_INTERNET="NO_INTERNET",E.COULD_NOT_REACH_SERVER="COULD_NOT_REACH_SERVER",E.UNKNOWN_HOST_ERROR="UNKNOWN_HOST_ERROR",E.BAD_REQUEST="BAD_REQUEST",E.FORBIDDEN="FORBIDDEN",E.NOT_FOUND="NOT_FOUND",E.UNPROCESSABLE_ENTITY="UNPROCESSABLE_ENTITY",E.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",E.NOT_IMPLEMENTED="NOT_IMPLEMENTED",E.BAD_GATEWAY="BAD_GATEWAY",E.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",E.GATEWAY_TIMEOUT="GATEWAY_TIMEOUT",E.INVALID_AUTH_CONFIG="INVALID_AUTH_CONFIG",E.USER_UNAUTHORIZED="USER_UNAUTHORIZED",E.INVALID_API_KEY_FORMAT="INVALID_API_KEY_FORMAT",E.API_KEY_MISSING="API_KEY_MISSING",E.WRONG_AUTH_TYPE="wrongAuthType",E.NO_AUTHENTICATION_CONFIG_FOUND="NO_AUTHENTICATION_CONFIG_FOUND",E.INVALID_AUTHENTICATION="INVALID_AUTHENTICATION",E.VALIDATION_ERROR="VALIDATION_ERROR",E.INVALID_LOGIN_CONFIG="INVALID_LOGIN_CONFIG",E.UNKNOWN_ERROR="UNKNOWN_ERROR",E.NO_SEARCH_SESSION_ACTIVE="NO_SEARCH_SESSION_ACTIVE",E.RESULT_UNDEFINED="RESULT_UNDEFINED",E.INVALID_SEARCH_MODALITY_CONFIG="INVALID_SEARCH_MODALITY_CONFIG",E.INVALID_MULTIPLE_IMAGE_SEARCHES="INVALID_MULTIPLE_IMAGE_SEARCHES",E.INVALID_SEARCH_LANGUAGE="INVALID_SEARCH_LANGUAGE",E.GENERAL_SEARCH_ERROR="GENERAL_SEARCH_ERROR",E.INVALID_ASSET_STATUS="INVALID_ASSET_STATUS",E.FILE_NOT_FOUND="FILE_NOT_FOUND",E.CAPTURE_IMAGE_FAILED="CAPTURE_IMAGE_FAILED",E.LOADING_FROM_GALLERY_FAILED="LOADING_FROM_GALLERY_FAILED",E.IMAGE_SEARCH_ERROR="IMAGE_SEARCH_ERROR",E.PICK_IMAGE_ABORTED_BY_USER="PICK_IMAGE_ABORTED_BY_USER",E.SEARCH_RESULT_TIMEOUT="SEARCH_RESULT_TIMEOUT",E.TIMEOUT_ERROR="TIMEOUT_ERROR",E.INTEGRATION_ERROR="INTEGRATION_ERROR",E.INITIAL_ITEMS_NOT_YET_LOADED="INITIAL_ITEMS_NOT_YET_LOADED",E.NO_MORE_ITEMS_AVAILABLE="NO_MORE_ITEMS_AVAILABLE",E.NO_PAGINATION_CURSOR_AVAILABLE="NO_PAGINATION_CURSOR_AVAILABLE",E.UNEXPECTED_API_VERSION="UNEXPECTED_API_VERSION",E.UNEXPECTED_SEARCH_VERSION="UNEXPECTED_SEARCH_VERSION",E.SSO_USER_CERT="SSO_USER_CERT",E.SSO_TOKEN_REFRESH="SSO_TOKEN_REFRESH",E.TOKEN_EXPIRED="TOKEN_EXPIRED",E.INVALID_TOKEN="INVALID_TOKEN",E.REFRESH_TOKEN_EXPIRED="REFRESH_TOKEN_EXPIRED",E.OAUTH_ERROR="OAUTH_ERROR",E.LOGIN_CANCELLED="LOGIN_CANCELLED",E.LOGIN_ALREADY_IN_PROGRESS="LOGIN_ALREADY_IN_PROGRESS",E.MISSING_STORAGE_ACCESS_PERMISSION="MISSING_STORAGE_ACCESS_PERMISSION",E.SDK_OUTDATED="SDK_OUTDATED",E.BACKEND_DOWN="BACKEND_DOWN",E.STATUS_BACKEND_DOWN="STATUS_BACKEND_DOWN",E.INVALID_FILE_TYPE="INVALID_FILE_TYPE",E.INVALID_CROP_AREA="INVALID_CROP_AREA",E.ORGANIZATION_NOT_FOUND="ORGANIZATION_NOT_FOUND",E.NO_UPIS_FOUND="NO_UPIS_FOUND"}(SDK_ERROR_CODES||(exports.SDK_ERROR_CODES=SDK_ERROR_CODES={}));var SdkError=function(){function E(E,_,I){this.errorString="".concat(E," - ");try{this.errorString+=I||JSON.stringify(_)}catch(E){_.toString&&(this.errorString+=_.toString())}this.code=E,this.detail=_}return E.prototype.toString=function(){return this.errorString},E}();exports.SdkError=SdkError;
|
|
2
|
+
"use strict";var SDK_ERROR_CODES;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SdkError=exports.SDK_ERROR_CODES=void 0,function(E){E.NO_INTERNET="NO_INTERNET",E.COULD_NOT_REACH_SERVER="COULD_NOT_REACH_SERVER",E.UNKNOWN_HOST_ERROR="UNKNOWN_HOST_ERROR",E.BAD_REQUEST="BAD_REQUEST",E.FORBIDDEN="FORBIDDEN",E.NOT_FOUND="NOT_FOUND",E.UNPROCESSABLE_ENTITY="UNPROCESSABLE_ENTITY",E.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",E.NOT_IMPLEMENTED="NOT_IMPLEMENTED",E.BAD_GATEWAY="BAD_GATEWAY",E.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",E.GATEWAY_TIMEOUT="GATEWAY_TIMEOUT",E.INVALID_AUTH_CONFIG="INVALID_AUTH_CONFIG",E.USER_UNAUTHORIZED="USER_UNAUTHORIZED",E.INVALID_API_KEY_FORMAT="INVALID_API_KEY_FORMAT",E.API_KEY_MISSING="API_KEY_MISSING",E.WRONG_AUTH_TYPE="wrongAuthType",E.NO_AUTHENTICATION_CONFIG_FOUND="NO_AUTHENTICATION_CONFIG_FOUND",E.INVALID_AUTHENTICATION="INVALID_AUTHENTICATION",E.VALIDATION_ERROR="VALIDATION_ERROR",E.INVALID_LOGIN_CONFIG="INVALID_LOGIN_CONFIG",E.UNKNOWN_ERROR="UNKNOWN_ERROR",E.NO_SEARCH_SESSION_ACTIVE="NO_SEARCH_SESSION_ACTIVE",E.RESULT_UNDEFINED="RESULT_UNDEFINED",E.INVALID_SEARCH_MODALITY_CONFIG="INVALID_SEARCH_MODALITY_CONFIG",E.INVALID_MULTIPLE_IMAGE_SEARCHES="INVALID_MULTIPLE_IMAGE_SEARCHES",E.INVALID_SEARCH_LANGUAGE="INVALID_SEARCH_LANGUAGE",E.GENERAL_SEARCH_ERROR="GENERAL_SEARCH_ERROR",E.INVALID_ASSET_STATUS="INVALID_ASSET_STATUS",E.FILE_NOT_FOUND="FILE_NOT_FOUND",E.CAPTURE_IMAGE_FAILED="CAPTURE_IMAGE_FAILED",E.LOADING_FROM_GALLERY_FAILED="LOADING_FROM_GALLERY_FAILED",E.IMAGE_SEARCH_ERROR="IMAGE_SEARCH_ERROR",E.PICK_IMAGE_ABORTED_BY_USER="PICK_IMAGE_ABORTED_BY_USER",E.SEARCH_RESULT_TIMEOUT="SEARCH_RESULT_TIMEOUT",E.TIMEOUT_ERROR="TIMEOUT_ERROR",E.INTEGRATION_ERROR="INTEGRATION_ERROR",E.INITIAL_ITEMS_NOT_YET_LOADED="INITIAL_ITEMS_NOT_YET_LOADED",E.NO_MORE_ITEMS_AVAILABLE="NO_MORE_ITEMS_AVAILABLE",E.NO_PAGINATION_CURSOR_AVAILABLE="NO_PAGINATION_CURSOR_AVAILABLE",E.INVALID_PAGINATION_CURSOR_URL="INVALID_PAGINATION_CURSOR_URL",E.UNEXPECTED_API_VERSION="UNEXPECTED_API_VERSION",E.UNEXPECTED_SEARCH_VERSION="UNEXPECTED_SEARCH_VERSION",E.SSO_USER_CERT="SSO_USER_CERT",E.SSO_TOKEN_REFRESH="SSO_TOKEN_REFRESH",E.TOKEN_EXPIRED="TOKEN_EXPIRED",E.INVALID_TOKEN="INVALID_TOKEN",E.REFRESH_TOKEN_EXPIRED="REFRESH_TOKEN_EXPIRED",E.OAUTH_ERROR="OAUTH_ERROR",E.LOGIN_CANCELLED="LOGIN_CANCELLED",E.LOGIN_ALREADY_IN_PROGRESS="LOGIN_ALREADY_IN_PROGRESS",E.MISSING_STORAGE_ACCESS_PERMISSION="MISSING_STORAGE_ACCESS_PERMISSION",E.SDK_OUTDATED="SDK_OUTDATED",E.BACKEND_DOWN="BACKEND_DOWN",E.STATUS_BACKEND_DOWN="STATUS_BACKEND_DOWN",E.INVALID_FILE_TYPE="INVALID_FILE_TYPE",E.INVALID_CROP_AREA="INVALID_CROP_AREA",E.ORGANIZATION_NOT_FOUND="ORGANIZATION_NOT_FOUND",E.NO_UPIS_FOUND="NO_UPIS_FOUND"}(SDK_ERROR_CODES||(exports.SDK_ERROR_CODES=SDK_ERROR_CODES={}));var SdkError=function(){function E(E,_,I){this.errorString="".concat(E," - ");try{this.errorString+=I||JSON.stringify(_)}catch(E){_.toString&&(this.errorString+=_.toString())}this.code=E,this.detail=_}return E.prototype.toString=function(){return this.errorString},E}();exports.SdkError=SdkError;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
+
import { BasePaginatedResponse } from '../models/base-paginated-response';
|
|
2
3
|
/**
|
|
3
4
|
* Converts camel case to snake case
|
|
4
5
|
*
|
|
@@ -40,3 +41,10 @@ export declare const addUrlParameter: (url: string, paramObject: Object) => stri
|
|
|
40
41
|
* @returns query param objects consumable by HttpsService
|
|
41
42
|
*/
|
|
42
43
|
export declare const toQueryParams: (params: object) => Array<Object>;
|
|
44
|
+
/**
|
|
45
|
+
* Extracts the cursor query parameter from a paginated response next URL.
|
|
46
|
+
*
|
|
47
|
+
* @param response paginated response with optional next URL
|
|
48
|
+
* @returns cursor value if present
|
|
49
|
+
*/
|
|
50
|
+
export declare const extractNextCursor: <T>(response: BasePaginatedResponse<T>) => string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __spreadArray=this&&this.__spreadArray||function(r,e,a){if(a||2===arguments.length)for(var t,n=0,o=e.length;n<o;n++)!t&&n in e||(t||(t=Array.prototype.slice.call(e,0,n)),t[n]=e[n]);return r.concat(t||Array.prototype.slice.call(e))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.toQueryParams=exports.addUrlParameter=exports.addUrlParameters=exports.snakeToCamelCase=exports.camelToSnake=void 0;var camelToSnake=function(r){var e={};return Object.keys(r).forEach((function(a){var t=a.replace(/[A-Z]/g,(function(r){return"_".concat(r.toLowerCase())}));if(e[t]=r[a],Array.isArray(r[t])){var n=r[t];n=n.map((function(r){return r&&"object"==typeof r&&r.constructor===Object?(0,exports.camelToSnake)(r):r})),e[t]=n}})),e};exports.camelToSnake=camelToSnake;var snakeToCamelCase=function(r){var e={};return Object.keys(r).forEach((function(a){var t=a.toLowerCase().replace(/([-_][a-z])/g,(function(r){return r.toUpperCase().replace("-","").replace("_","")}));if(e[t]=r[a],Array.isArray(r[t])){var n=r[t];n=n.map((function(r){return r&&"object"==typeof r&&r.constructor===Object?(0,exports.snakeToCamelCase)(r):r})),e[t]=n}})),e};exports.snakeToCamelCase=snakeToCamelCase;var addUrlParameters=function(r,e){if(!e||e.length<1)return r;for(var a=0,t=e;a<t.length;a++){var n=t[a];r=(0,exports.addUrlParameter)(r,n)}return r};exports.addUrlParameters=addUrlParameters;var addUrlParameter=function(r,e){if(!e)return r;var a=r.split("?"),t=a[0],n=[];a.length>1&&(n=a[1].split("&").map((function(r){return r.split("=")})));for(var o=0,s=Object.keys(e);o<s.length;o++){var c=s[o],
|
|
2
|
+
"use strict";var __spreadArray=this&&this.__spreadArray||function(r,e,a){if(a||2===arguments.length)for(var t,n=0,o=e.length;n<o;n++)!t&&n in e||(t||(t=Array.prototype.slice.call(e,0,n)),t[n]=e[n]);return r.concat(t||Array.prototype.slice.call(e))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.extractNextCursor=exports.toQueryParams=exports.addUrlParameter=exports.addUrlParameters=exports.snakeToCamelCase=exports.camelToSnake=void 0;var error_1=require("../models/error"),camelToSnake=function(r){var e={};return Object.keys(r).forEach((function(a){var t=a.replace(/[A-Z]/g,(function(r){return"_".concat(r.toLowerCase())}));if(e[t]=r[a],Array.isArray(r[t])){var n=r[t];n=n.map((function(r){return r&&"object"==typeof r&&r.constructor===Object?(0,exports.camelToSnake)(r):r})),e[t]=n}})),e};exports.camelToSnake=camelToSnake;var snakeToCamelCase=function(r){var e={};return Object.keys(r).forEach((function(a){var t=a.toLowerCase().replace(/([-_][a-z])/g,(function(r){return r.toUpperCase().replace("-","").replace("_","")}));if(e[t]=r[a],Array.isArray(r[t])){var n=r[t];n=n.map((function(r){return r&&"object"==typeof r&&r.constructor===Object?(0,exports.snakeToCamelCase)(r):r})),e[t]=n}})),e};exports.snakeToCamelCase=snakeToCamelCase;var addUrlParameters=function(r,e){if(!e||e.length<1)return r;for(var a=0,t=e;a<t.length;a++){var n=t[a];r=(0,exports.addUrlParameter)(r,n)}return r};exports.addUrlParameters=addUrlParameters;var addUrlParameter=function(r,e){if(!e)return r;var a=r.split("?"),t=a[0],n=[];a.length>1&&(n=a[1].split("&").map((function(r){return r.split("=")})));for(var o=0,s=Object.keys(e);o<s.length;o++){var c=s[o],u=e[c];null!=u&&(c=encodeURIComponent(c),u=encodeURIComponent(u),n.push([c,u]))}var i=n.map((function(r){return r.join("=")}));return i.length>0?"".concat(t,"?").concat(i.join("&")):t};exports.addUrlParameter=addUrlParameter;var toQueryParams=function(r){return Object.entries(r).reduce((function(r,e){var a,t=e[0],n=e[1];return null==n?r:Array.isArray(n)?__spreadArray(__spreadArray([],r,!0),n.map((function(r){var e;return(e={})[t]=r,e})),!0):__spreadArray(__spreadArray([],r,!0),[(a={},a[t]=n,a)],!1)}),[])};exports.toQueryParams=toQueryParams;var extractNextCursor=function(r){if(r.next)try{return new URL(r.next).searchParams.get("cursor")||void 0}catch(e){throw new error_1.SdkError(error_1.SDK_ERROR_CODES.INVALID_PAGINATION_CURSOR_URL,{next:r.next,reason:e instanceof Error?e.message:String(e)},"Invalid pagination next URL.")}};exports.extractNextCursor=extractNextCursor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseService, ServiceProvider } from '../../core';
|
|
3
|
+
import { BaseService, DefaultGetPaginatedRequestPaginationContext, ServiceProvider } from '../../core';
|
|
4
4
|
import { GetPartDataRequest } from '../models/get-part-data-request';
|
|
5
5
|
import { GetPartDataResponse } from '../models/get-part-data-response';
|
|
6
6
|
import { GetSelectableAttributesRequest } from '../models/get-selectable-attributes-request';
|
|
@@ -14,17 +14,43 @@ export interface DataService {
|
|
|
14
14
|
*/
|
|
15
15
|
getPart(request: GetPartDataRequest): Observable<GetPartDataResponse>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Loads the first page of selectable attribute definitions with pagination context.
|
|
18
18
|
*
|
|
19
19
|
* @param request - The request object.
|
|
20
|
-
* @returns The
|
|
20
|
+
* @returns The first page and pagination context for loading additional pages.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
loadSelectableAttributes(request?: GetSelectableAttributesRequest): Observable<{
|
|
23
|
+
response: GetSelectableAttributesResponse;
|
|
24
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Loads the next page of selectable attribute definitions.
|
|
28
|
+
*
|
|
29
|
+
* @param paginationContext - The pagination context returned by previous selectable-attribute calls.
|
|
30
|
+
* @returns The next page and updated pagination context.
|
|
31
|
+
*/
|
|
32
|
+
loadMoreSelectableAttributes(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
33
|
+
response: GetSelectableAttributesResponse;
|
|
34
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns true when another selectable-attribute page can be loaded.
|
|
38
|
+
*/
|
|
39
|
+
hasMoreSelectableAttributesAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
23
40
|
}
|
|
24
41
|
export declare class DataServiceImpl extends BaseService implements DataService {
|
|
25
42
|
private httpsService;
|
|
26
43
|
constructor(serviceProvider: ServiceProvider);
|
|
27
44
|
onCreate(): void;
|
|
28
45
|
getPart(request?: GetPartDataRequest): Observable<GetPartDataResponse>;
|
|
29
|
-
|
|
46
|
+
loadSelectableAttributes(request?: GetSelectableAttributesRequest): Observable<{
|
|
47
|
+
response: GetSelectableAttributesResponse;
|
|
48
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
49
|
+
}>;
|
|
50
|
+
loadMoreSelectableAttributes(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
51
|
+
response: GetSelectableAttributesResponse;
|
|
52
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
53
|
+
}>;
|
|
54
|
+
hasMoreSelectableAttributesAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
55
|
+
private fetchSelectableAttributesPage;
|
|
30
56
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __extends=this&&this.__extends||function(){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 o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,r,s):n(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},__rest=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataServiceImpl=void 0;var rxjs_1=require("rxjs"),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,o=__rest(e,["projection","fallbackLanguages"]),n=Array.from(new Set(t)).join(","),i=(null==r?void 0:r.length)?Array.from(new Set(r)).join(","):void 0,s=Object.entries(__assign(__assign({},o),{projection:n,fallbackLanguages:i})).filter((function(e){return null!=e[1]})).map((function(e){var t,r=e[0],o=e[1];return(t={})[r]=o,t}));return this.httpsService.get("part",s,core_1.BACKEND_SERVICE.DATA_V2)},t.prototype.loadSelectableAttributes=function(e){return void 0===e&&(e={}),this.fetchSelectableAttributesPage(e).pipe((0,rxjs_1.map)((function(t){return{response:t,paginationContext:{initialRequest:__assign({},e),nextCursor:(0,core_1.extractNextCursor)(t)}}})))},t.prototype.loadMoreSelectableAttributes=function(e){if(!e.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},e.initialRequest),{cursor:e.nextCursor});return this.fetchSelectableAttributesPage(t).pipe((0,rxjs_1.map)((function(t){return{response:t,paginationContext:__assign(__assign({},e),{nextCursor:(0,core_1.extractNextCursor)(t)})}})))},t.prototype.hasMoreSelectableAttributesAvailable=function(e){return!!e.nextCursor},t.prototype.fetchSelectableAttributesPage=function(e){return this.httpsService.get("attributes",(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_V2)},t=__decorate([(0,core_1.InjectionIdentifier)("DataService")],t)}(core_1.BaseService);exports.DataServiceImpl=DataServiceImpl;
|
|
@@ -93,5 +93,4 @@ export declare class ImageSubmissionServiceImpl extends BaseService implements I
|
|
|
93
93
|
update(request: UpdateImageSubmissionRequest): Observable<UpdateImageSubmissionResponse>;
|
|
94
94
|
hasMoreResultsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
95
95
|
private fetchSubmissionsPage;
|
|
96
|
-
private extractNextCursor;
|
|
97
96
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __extends=this&&this.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])},r(e,t)};return function(e,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=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(r,e,t,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageSubmissionServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),ImageSubmissionServiceImpl=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return __extends(e,r),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.submit=function(r){var e=new FormData;return r.organization?r.images.length?r.files.length?(e.append("images",JSON.stringify({organization:r.organization,images:r.images})),r.files.forEach((function(r){e.append("files",r,r.name)})),this.httpsService.post("submissions/images/upload",e,void 0,core_1.BACKEND_SERVICE.DATACURATION,{"Content-Type":"multipart/form-data"})):(0,rxjs_1.throwError)((function(){return new Error("Files are required")})):(0,rxjs_1.throwError)((function(){return new Error("Images are required")})):(0,rxjs_1.throwError)((function(){return new Error("Organization is required")}))},e.prototype.loadInitialSubmissions=function(r){
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])},r(e,t)};return function(e,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=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(r,e,t,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,e,t,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageSubmissionServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),ImageSubmissionServiceImpl=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return __extends(e,r),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.submit=function(r){var e=new FormData;return r.organization?r.images.length?r.files.length?(e.append("images",JSON.stringify({organization:r.organization,images:r.images})),r.files.forEach((function(r){e.append("files",r,r.name)})),this.httpsService.post("submissions/images/upload",e,void 0,core_1.BACKEND_SERVICE.DATACURATION,{"Content-Type":"multipart/form-data"})):(0,rxjs_1.throwError)((function(){return new Error("Files are required")})):(0,rxjs_1.throwError)((function(){return new Error("Images are required")})):(0,rxjs_1.throwError)((function(){return new Error("Organization is required")}))},e.prototype.loadInitialSubmissions=function(r){return this.fetchSubmissionsPage(r).pipe((0,rxjs_1.map)((function(e){return{response:e,paginationContext:{initialRequest:__assign({},r),nextCursor:(0,core_1.extractNextCursor)(e)}}})))},e.prototype.loadMoreSubmissions=function(r){if(!r.nextCursor)return(0,rxjs_1.throwError)((function(){return new Error("No more pages available")}));var e=__assign(__assign({},r.initialRequest),{cursor:r.nextCursor});return this.fetchSubmissionsPage(e).pipe((0,rxjs_1.map)((function(e){return{response:e,paginationContext:__assign(__assign({},r),{nextCursor:(0,core_1.extractNextCursor)(e)})}})))},e.prototype.approve=function(r){return r.organization?r.imageIds.length?this.httpsService.post("submissions/images/approve",r,void 0,core_1.BACKEND_SERVICE.DATACURATION):(0,rxjs_1.throwError)((function(){return new Error("Image IDs are required")})):(0,rxjs_1.throwError)((function(){return new Error("Organization is required")}))},e.prototype.reject=function(r){return r.organization?r.imageIds.length?this.httpsService.post("submissions/images/reject",r,void 0,core_1.BACKEND_SERVICE.DATACURATION):(0,rxjs_1.throwError)((function(){return new Error("Image IDs are required")})):(0,rxjs_1.throwError)((function(){return new Error("Organization is required")}))},e.prototype.update=function(r){return r.organization?r.images.length?this.httpsService.patch("submissions/images/update",r,void 0,core_1.BACKEND_SERVICE.DATACURATION):(0,rxjs_1.throwError)((function(){return new Error("Images are required")})):(0,rxjs_1.throwError)((function(){return new Error("Organization is required")}))},e.prototype.hasMoreResultsAvailable=function(r){return!!r.nextCursor},e.prototype.fetchSubmissionsPage=function(r){if(!r.language)return(0,rxjs_1.throwError)((function(){return new Error("Language is required")}));var e=Object.entries(r).map((function(r){var e,t=r[0],n=r[1];return(e={})[t]=n,e}));return this.httpsService.get("submissions/images",e,core_1.BACKEND_SERVICE.DATACURATION)},e=__decorate([(0,core_1.InjectionIdentifier)("ImageSubmissionService")],e)}(core_1.BaseService);exports.ImageSubmissionServiceImpl=ImageSubmissionServiceImpl;
|
|
@@ -23,6 +23,10 @@ export interface SubmitEnrichmentJobRequest {
|
|
|
23
23
|
* When provided, it overrides the type set during upload.
|
|
24
24
|
*/
|
|
25
25
|
jobType?: EnrichmentJobType;
|
|
26
|
+
/**
|
|
27
|
+
* Optional list of attribute identifiers used for attribute enrichment jobs.
|
|
28
|
+
*/
|
|
29
|
+
attributeIds?: string[];
|
|
26
30
|
/**
|
|
27
31
|
* Organization identifier when explicitly selecting an organization.
|
|
28
32
|
*/
|
|
@@ -130,5 +130,4 @@ export declare class DataEnrichmentServiceImpl extends BaseService implements Da
|
|
|
130
130
|
triggerEnrichmentJob(request: TriggerEnrichmentJobRequest): Observable<TriggerEnrichmentJobResponse>;
|
|
131
131
|
private fetchEnrichmentJobsPage;
|
|
132
132
|
private fetchEnrichmentJobPartsPage;
|
|
133
|
-
private extractNextCursor;
|
|
134
133
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2026 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __extends=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])},r(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(r,t,e,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(t,e,s):o(t,e))||s);return i>3&&s&&Object.defineProperty(t,e,s),s},__rest=this&&this.__rest||function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e},__spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return r.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataEnrichmentServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),enrichment_job_1=require("../models/enrichment-job"),enrichment_job_part_1=require("../models/enrichment-job-part"),DataEnrichmentServiceImpl=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return __extends(t,r),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.loadEnrichmentJobs=function(r){return this.fetchEnrichmentJobsPage(r).pipe((0,rxjs_1.map)((function(t){var e=t.jobs,n=t.nextCursor;return{jobs:e,paginationContext:{initialRequest:r,nextCursor:n}}})))},t.prototype.loadMoreEnrichmentJobs=function(r){if(!r.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},r.initialRequest),{cursor:r.nextCursor});return this.fetchEnrichmentJobsPage(t).pipe((0,rxjs_1.map)((function(t){var e=t.jobs,n=t.nextCursor;return{jobs:e,paginationContext:__assign(__assign({},r),{nextCursor:n})}})))},t.prototype.hasMoreEnrichmentJobsAvailable=function(r){return!!r.nextCursor},t.prototype.getEnrichmentJob=function(r){var t=r.jobId,e=__rest(r,["jobId"]);return this.httpsService.get("jobs/".concat(t),(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){return(0,enrichment_job_1.enrichmentJobDetailFromAPIResponse)(r)})))},t.prototype.loadEnrichmentJobParts=function(r){return this.fetchEnrichmentJobPartsPage(r).pipe((0,rxjs_1.map)((function(t){var e=t.parts,n=t.partsSummary,o=t.nextCursor;return{parts:e,partsSummary:n,paginationContext:{initialRequest:r,nextCursor:o}}})))},t.prototype.loadMoreEnrichmentJobParts=function(r){if(!r.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},r.initialRequest),{cursor:r.nextCursor});return this.fetchEnrichmentJobPartsPage(t).pipe((0,rxjs_1.map)((function(t){var e=t.parts,n=t.partsSummary,o=t.nextCursor;return{parts:e,partsSummary:n,paginationContext:__assign(__assign({},r),{nextCursor:o})}})))},t.prototype.hasMoreEnrichmentJobPartsAvailable=function(r){return!!r.nextCursor},t.prototype.createEnrichmentJob=function(r){var t=new FormData;t.append("file",r.csvFile);var e=__spreadArray(__spreadArray([],r.jobType?[{jobType:r.jobType}]:[],!0),void 0!==r.organization?[{organization:r.organization}]:[],!0);return this.httpsService.post("jobs/upload",t,e,core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{"Content-Type":"multipart/form-data"})},t.prototype.createEnrichmentJobWithSearchSession=function(r){var t=__spreadArray(__spreadArray([],r.jobType?[{jobType:r.jobType}]:[],!0),void 0!==r.organization?[{organization:r.organization}]:[],!0);return this.httpsService.post("jobs",r,t,core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.submitEnrichmentJob=function(r){return this.httpsService.post("jobs/".concat(r.jobId,"/submit"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.triggerEnrichmentJob=function(r){var t,e=__assign(__assign({type:r.type,partIds:r.partIds,visible:null!==(t=r.visible)&&void 0!==t&&t},void 0!==r.attributeIds?{attributeIds:r.attributeIds}:{}),void 0!==r.organization?{organization:r.organization}:{});return this.httpsService.post("jobs/trigger",e,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.fetchEnrichmentJobsPage=function(r){var t=
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])},r(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(r,t,e,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(t,e,s):o(t,e))||s);return i>3&&s&&Object.defineProperty(t,e,s),s},__rest=this&&this.__rest||function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e},__spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return r.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataEnrichmentServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),enrichment_job_1=require("../models/enrichment-job"),enrichment_job_part_1=require("../models/enrichment-job-part"),DataEnrichmentServiceImpl=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return __extends(t,r),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.loadEnrichmentJobs=function(r){return this.fetchEnrichmentJobsPage(r).pipe((0,rxjs_1.map)((function(t){var e=t.jobs,n=t.nextCursor;return{jobs:e,paginationContext:{initialRequest:r,nextCursor:n}}})))},t.prototype.loadMoreEnrichmentJobs=function(r){if(!r.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},r.initialRequest),{cursor:r.nextCursor});return this.fetchEnrichmentJobsPage(t).pipe((0,rxjs_1.map)((function(t){var e=t.jobs,n=t.nextCursor;return{jobs:e,paginationContext:__assign(__assign({},r),{nextCursor:n})}})))},t.prototype.hasMoreEnrichmentJobsAvailable=function(r){return!!r.nextCursor},t.prototype.getEnrichmentJob=function(r){var t=r.jobId,e=__rest(r,["jobId"]);return this.httpsService.get("jobs/".concat(t),(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){return(0,enrichment_job_1.enrichmentJobDetailFromAPIResponse)(r)})))},t.prototype.loadEnrichmentJobParts=function(r){return this.fetchEnrichmentJobPartsPage(r).pipe((0,rxjs_1.map)((function(t){var e=t.parts,n=t.partsSummary,o=t.nextCursor;return{parts:e,partsSummary:n,paginationContext:{initialRequest:r,nextCursor:o}}})))},t.prototype.loadMoreEnrichmentJobParts=function(r){if(!r.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},r.initialRequest),{cursor:r.nextCursor});return this.fetchEnrichmentJobPartsPage(t).pipe((0,rxjs_1.map)((function(t){var e=t.parts,n=t.partsSummary,o=t.nextCursor;return{parts:e,partsSummary:n,paginationContext:__assign(__assign({},r),{nextCursor:o})}})))},t.prototype.hasMoreEnrichmentJobPartsAvailable=function(r){return!!r.nextCursor},t.prototype.createEnrichmentJob=function(r){var t=new FormData;t.append("file",r.csvFile);var e=__spreadArray(__spreadArray([],r.jobType?[{jobType:r.jobType}]:[],!0),void 0!==r.organization?[{organization:r.organization}]:[],!0);return this.httpsService.post("jobs/upload",t,e,core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{"Content-Type":"multipart/form-data"})},t.prototype.createEnrichmentJobWithSearchSession=function(r){var t=__spreadArray(__spreadArray([],r.jobType?[{jobType:r.jobType}]:[],!0),void 0!==r.organization?[{organization:r.organization}]:[],!0);return this.httpsService.post("jobs",r,t,core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.submitEnrichmentJob=function(r){return this.httpsService.post("jobs/".concat(r.jobId,"/submit"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.triggerEnrichmentJob=function(r){var t,e=__assign(__assign({type:r.type,partIds:r.partIds,visible:null!==(t=r.visible)&&void 0!==t&&t},void 0!==r.attributeIds?{attributeIds:r.attributeIds}:{}),void 0!==r.organization?{organization:r.organization}:{});return this.httpsService.post("jobs/trigger",e,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.fetchEnrichmentJobsPage=function(r){var t=(0,core_1.toQueryParams)(r);return this.httpsService.get("jobs",t,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){var t,e;return{jobs:null!==(e=null===(t=r.results)||void 0===t?void 0:t.map((function(r){return(0,enrichment_job_1.enrichmentJobFromAPIResponse)(r)})))&&void 0!==e?e:[],nextCursor:(0,core_1.extractNextCursor)(r)}})))},t.prototype.fetchEnrichmentJobPartsPage=function(r){var t=r.jobId,e=__rest(r,["jobId"]),n=(0,core_1.toQueryParams)(e);return this.httpsService.get("jobs/".concat(t,"/parts"),n,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){var t,e;return{parts:null!==(e=null===(t=r.results)||void 0===t?void 0:t.map((function(r){return(0,enrichment_job_part_1.enrichmentJobPartFromAPIResponse)(r)})))&&void 0!==e?e:[],partsSummary:r.partsSummary,nextCursor:(0,core_1.extractNextCursor)(r)}})))},t=__decorate([(0,core_1.InjectionIdentifier)("DataEnrichmentService")],t)}(core_1.BaseService);exports.DataEnrichmentServiceImpl=DataEnrichmentServiceImpl;
|
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 = "15.
|
|
2
|
+
export declare const SDK_VERSION_NUMBER = "15.17.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="15.
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="15.17.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@partium/js-sdk",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.17.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.",
|