@partium/js-sdk 14.13.0 → 14.14.1
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/index.d.ts +3 -0
- package/core/index.js +1 -1
- package/core/models/base-paginated-request.d.ts +14 -0
- package/core/models/base-paginated-response.d.ts +15 -0
- package/core/models/base-paginated-response.js +2 -0
- package/core/models/default-get-paginated-request-pagination-context.d.ts +15 -0
- package/core/models/default-get-paginated-request-pagination-context.js +2 -0
- package/core/models/error.d.ts +1 -0
- package/core/models/error.js +1 -1
- package/core/models/user.d.ts +2 -1
- package/core/models/user.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/datacuration/index.d.ts +0 -1
- package/datacuration/index.js +1 -1
- package/datacuration/models/get-image-submissions-request.d.ts +2 -9
- package/datacuration/services/image-submission.service.d.ts +9 -10
- package/enrichment/index.d.ts +8 -0
- package/enrichment/index.js +2 -0
- package/enrichment/models/create-enrichment-job-request.d.ts +10 -0
- package/enrichment/models/create-enrichment-job-request.js +2 -0
- package/enrichment/models/create-enrichment-job-response.d.ts +20 -0
- package/enrichment/models/create-enrichment-job-response.js +2 -0
- package/enrichment/models/enrichment-job-part.d.ts +21 -0
- package/enrichment/models/enrichment-job-part.js +2 -0
- package/enrichment/models/enrichment-job.d.ts +23 -0
- package/enrichment/models/enrichment-job.js +2 -0
- package/enrichment/models/get-enrichment-job-parts-request.d.ts +11 -0
- package/enrichment/models/get-enrichment-job-parts-request.js +2 -0
- package/enrichment/models/get-enrichment-job-request.d.ts +10 -0
- package/enrichment/models/get-enrichment-job-request.js +2 -0
- package/enrichment/models/submit-enrichment-job-request.d.ts +18 -0
- package/enrichment/models/submit-enrichment-job-request.js +2 -0
- package/enrichment/services/data-enrichment.service.d.ts +107 -0
- package/enrichment/services/data-enrichment.service.js +2 -0
- 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/datacuration/models/image-submission-pagination-context.d.ts +0 -15
- /package/{datacuration/models/image-submission-pagination-context.js → core/models/base-paginated-request.js} +0 -0
|
@@ -12,4 +12,5 @@ export declare const REL_MANAGEMENT_API_URL = "management";
|
|
|
12
12
|
export declare const REL_CATALOG_API_URL = "catalog";
|
|
13
13
|
export declare const REL_DATACURATION_API_URL = "datacuration";
|
|
14
14
|
export declare const REL_DATA_V2_API_URL = "data";
|
|
15
|
+
export declare const REL_DATA_ENRICHMENT_API_URL = "enrichment";
|
|
15
16
|
export declare const BACKEND_STATUS_FALLBACK_URL = "https://example.com";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BACKEND_STATUS_FALLBACK_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_OCR_API_URL=exports.REL_USER_DATA_API_URL=exports.REL_LOGS_API_URL=exports.REL_CSA_API_URL=exports.REL_DATA_API_URL=exports.REL_FIND_API_URL=exports.PARTIUM_API_VERSION=void 0,exports.PARTIUM_API_VERSION=1,exports.REL_FIND_API_URL="_find",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_OCR_API_URL="_ocr",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.BACKEND_STATUS_FALLBACK_URL="https://example.com";
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BACKEND_STATUS_FALLBACK_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_OCR_API_URL=exports.REL_USER_DATA_API_URL=exports.REL_LOGS_API_URL=exports.REL_CSA_API_URL=exports.REL_DATA_API_URL=exports.REL_FIND_API_URL=exports.PARTIUM_API_VERSION=void 0,exports.PARTIUM_API_VERSION=1,exports.REL_FIND_API_URL="_find",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_OCR_API_URL="_ocr",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.BACKEND_STATUS_FALLBACK_URL="https://example.com";
|
package/core/index.d.ts
CHANGED
|
@@ -46,3 +46,6 @@ export * from './services/log.service';
|
|
|
46
46
|
export * from './factories/paginated-request-service.factory';
|
|
47
47
|
export * from './services/file.service.interface';
|
|
48
48
|
export * from './services/recent-parts.service';
|
|
49
|
+
export * from './models/base-paginated-request';
|
|
50
|
+
export * from './models/base-paginated-response';
|
|
51
|
+
export * from './models/default-get-paginated-request-pagination-context';
|
package/core/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 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 i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,i)}: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("./decorators/injection-identifier"),exports),__exportStar(require("./integration-defaults/js-p-file"),exports),__exportStar(require("./integration-defaults/web-local-storage.service"),exports),__exportStar(require("./integration-defaults/web-device-status.service"),exports),__exportStar(require("./integration-defaults/web-indexeddb.service"),exports),__exportStar(require("./integration-defaults/web-file.service"),exports),__exportStar(require("./integration-defaults/http/js-oauth-keycloak-https.service"),exports),__exportStar(require("./integration-defaults/http/https-client/axios-https-client.service"),exports),__exportStar(require("./integration-defaults/http/https-client/fetch-api-https-client.service"),exports),__exportStar(require("./integration-defaults/http/file-transfer/axios-file-transfer.service"),exports),__exportStar(require("./integration-defaults/http/file-transfer/fetch-api-file-transfer.service"),exports),__exportStar(require("./integration-defaults/session/js-oauth-keycloak-session.service"),exports),__exportStar(require("./integration-defaults/session/js-oauth-keycloak-auth-config"),exports),__exportStar(require("./integration-defaults/session/js-oauth-api-key-session.service"),exports),__exportStar(require("./models/i18n-string"),exports),__exportStar(require("./models/partium-config"),exports),__exportStar(require("./models/auth-config"),exports),__exportStar(require("./models/p-file"),exports),__exportStar(require("./models/formatted-string"),exports),__exportStar(require("./models/i18n-map"),exports),__exportStar(require("./models/error"),exports),__exportStar(require("./models/organization"),exports),__exportStar(require("./models/api-object"),exports),__exportStar(require("./models/paginated-list"),exports),__exportStar(require("./models/log"),exports),__exportStar(require("./models/device-info"),exports),__exportStar(require("./models/user-token"),exports),__exportStar(require("./models/user"),exports),__exportStar(require("./models/base-response"),exports),__exportStar(require("./services/service-provider"),exports),__exportStar(require("./services/local-storage.service.interface"),exports),__exportStar(require("./services/backend-status.service"),exports),__exportStar(require("./services/http/https.service.interface"),exports),__exportStar(require("./services/http/https-client/https-client.service.interface"),exports),__exportStar(require("./services/http/file-transfer/file-transfer.service.interface"),exports),__exportStar(require("./services/http/oauth-https.service"),exports),__exportStar(require("./services/base.service"),exports),__exportStar(require("./services/base-login-init.service"),exports),__exportStar(require("./services/device-status.service.interface"),exports),__exportStar(require("./services/session/session.service.interface"),exports),__exportStar(require("./services/session/oauth-session.service"),exports),__exportStar(require("./services/organization.service"),exports),__exportStar(require("./services/paginated-request.service"),exports),__exportStar(require("./services/log.service"),exports),__exportStar(require("./factories/paginated-request-service.factory"),exports),__exportStar(require("./services/file.service.interface"),exports),__exportStar(require("./services/recent-parts.service"),exports);
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,i)}: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("./decorators/injection-identifier"),exports),__exportStar(require("./integration-defaults/js-p-file"),exports),__exportStar(require("./integration-defaults/web-local-storage.service"),exports),__exportStar(require("./integration-defaults/web-device-status.service"),exports),__exportStar(require("./integration-defaults/web-indexeddb.service"),exports),__exportStar(require("./integration-defaults/web-file.service"),exports),__exportStar(require("./integration-defaults/http/js-oauth-keycloak-https.service"),exports),__exportStar(require("./integration-defaults/http/https-client/axios-https-client.service"),exports),__exportStar(require("./integration-defaults/http/https-client/fetch-api-https-client.service"),exports),__exportStar(require("./integration-defaults/http/file-transfer/axios-file-transfer.service"),exports),__exportStar(require("./integration-defaults/http/file-transfer/fetch-api-file-transfer.service"),exports),__exportStar(require("./integration-defaults/session/js-oauth-keycloak-session.service"),exports),__exportStar(require("./integration-defaults/session/js-oauth-keycloak-auth-config"),exports),__exportStar(require("./integration-defaults/session/js-oauth-api-key-session.service"),exports),__exportStar(require("./models/i18n-string"),exports),__exportStar(require("./models/partium-config"),exports),__exportStar(require("./models/auth-config"),exports),__exportStar(require("./models/p-file"),exports),__exportStar(require("./models/formatted-string"),exports),__exportStar(require("./models/i18n-map"),exports),__exportStar(require("./models/error"),exports),__exportStar(require("./models/organization"),exports),__exportStar(require("./models/api-object"),exports),__exportStar(require("./models/paginated-list"),exports),__exportStar(require("./models/log"),exports),__exportStar(require("./models/device-info"),exports),__exportStar(require("./models/user-token"),exports),__exportStar(require("./models/user"),exports),__exportStar(require("./models/base-response"),exports),__exportStar(require("./services/service-provider"),exports),__exportStar(require("./services/local-storage.service.interface"),exports),__exportStar(require("./services/backend-status.service"),exports),__exportStar(require("./services/http/https.service.interface"),exports),__exportStar(require("./services/http/https-client/https-client.service.interface"),exports),__exportStar(require("./services/http/file-transfer/file-transfer.service.interface"),exports),__exportStar(require("./services/http/oauth-https.service"),exports),__exportStar(require("./services/base.service"),exports),__exportStar(require("./services/base-login-init.service"),exports),__exportStar(require("./services/device-status.service.interface"),exports),__exportStar(require("./services/session/session.service.interface"),exports),__exportStar(require("./services/session/oauth-session.service"),exports),__exportStar(require("./services/organization.service"),exports),__exportStar(require("./services/paginated-request.service"),exports),__exportStar(require("./services/log.service"),exports),__exportStar(require("./factories/paginated-request-service.factory"),exports),__exportStar(require("./services/file.service.interface"),exports),__exportStar(require("./services/recent-parts.service"),exports),__exportStar(require("./models/base-paginated-request"),exports),__exportStar(require("./models/base-paginated-response"),exports),__exportStar(require("./models/default-get-paginated-request-pagination-context"),exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
/**
|
|
3
|
+
* Base request data for getting paginated data.
|
|
4
|
+
*/
|
|
5
|
+
export interface BasePaginatedRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The cursor to get the next page of data.
|
|
8
|
+
*/
|
|
9
|
+
cursor?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The page size of the data.
|
|
12
|
+
*/
|
|
13
|
+
pageSize?: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { BaseResponse } from '..';
|
|
3
|
+
/**
|
|
4
|
+
* Base response for getting paginated data.
|
|
5
|
+
*/
|
|
6
|
+
export interface BasePaginatedResponse<T> extends BaseResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The data.
|
|
9
|
+
*/
|
|
10
|
+
results?: T[];
|
|
11
|
+
/**
|
|
12
|
+
* The next cursor to get the next page of data.
|
|
13
|
+
*/
|
|
14
|
+
next?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { BasePaginatedRequest } from "./base-paginated-request";
|
|
3
|
+
/**
|
|
4
|
+
* Default pagination context for paginated requests.
|
|
5
|
+
*/
|
|
6
|
+
export interface DefaultGetPaginatedRequestPaginationContext {
|
|
7
|
+
/**
|
|
8
|
+
* The original request parameters used for the initial query.
|
|
9
|
+
*/
|
|
10
|
+
initialRequest: BasePaginatedRequest;
|
|
11
|
+
/**
|
|
12
|
+
* The cursor for the next page of results, if available.
|
|
13
|
+
*/
|
|
14
|
+
nextCursor?: string;
|
|
15
|
+
}
|
package/core/models/error.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare enum SDK_ERROR_CODES {
|
|
|
39
39
|
INTEGRATION_ERROR = "INTEGRATION_ERROR",// if this error occurs, this usually indicates that the SDK was not integrated properly.
|
|
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
|
+
NO_PAGINATION_CURSOR_AVAILABLE = "NO_PAGINATION_CURSOR_AVAILABLE",// can't load more items, because there is no cursor available
|
|
42
43
|
UNEXPECTED_API_VERSION = "UNEXPECTED_API_VERSION",// the function that was called can not be executed with the selected Backend-API version,
|
|
43
44
|
UNEXPECTED_SEARCH_VERSION = "UNEXPECTED_SEARCH_VERSION",// the search-function that was called can not be executed with the selected Backend-API version,
|
|
44
45
|
SSO_USER_CERT = "SSO_USER_CERT",
|
package/core/models/error.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 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.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.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;
|
package/core/models/user.d.ts
CHANGED
|
@@ -16,7 +16,8 @@ export declare enum Role {
|
|
|
16
16
|
catalogAdmin = "catalogAdmin",
|
|
17
17
|
dataManipulator = "dataManipulator",
|
|
18
18
|
dataContributor = "dataContributor",
|
|
19
|
-
dataValidator = "dataValidator"
|
|
19
|
+
dataValidator = "dataValidator",
|
|
20
|
+
enrichmentRequester = "enrichmentRequester"
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* The user-object of the user that is logged in into the SDK.
|
package/core/models/user.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var Role;Object.defineProperty(exports,"__esModule",{value:!0}),exports.User=exports.Role=void 0,function(e){e.admin="admin",e.announcementsEditor="announcementsEditor",e.partiumAnnouncementsEditor="partiumAnnouncementsEditor",e.user="user",e.analyst="dataAnalyst",e.dataInsightAnalyst="dataInsightAnalyst",e.csa="csa",e.factoryWorker="factoryWorker",e.developer="developer",e.catalogAdmin="catalogAdmin",e.dataManipulator="dataManipulator",e.dataContributor="dataContributor",e.dataValidator="dataValidator"}(Role||(exports.Role=Role={}));var User=function(){function e(e,t,r,n){void 0===n&&(n=[]),this.email=e,this.role=t,this.roles=r||new Set([t]),this.groups=n}return e.createFromToken=function(t){var r=t.email||t.preferred_username,n=this.createRoles(t),o=t.groups||[];return new e(r,n.values().next().value,n,o)},e.createRoles=function(e){if(e.role)return new Set([e.role]);if(e.groups){for(var t=new Set,r=0,n=e.groups;r<n.length;r++){var o=n[r],a=this.getRoleFromGroup(o);t.add(a)}return t}return new Set},e.getRoleFromGroup=function(e){var t=this.checkPartiumRoles(e),r=e.slice(e.lastIndexOf("/")+1);return this.getRoleByString(r,t)},e.checkPartiumRoles=function(e){var t=e.split("/"),r="partium"===t[t.length-2],n=t[t.length-1],o=Object.values(Role);return r&&!!o.find((function(e){return e===n}))},e.getRoleByString=function(e,t){if(Object.values(Role).includes(e)){var r=e;return r===Role.announcementsEditor&&t?Role.partiumAnnouncementsEditor:r}return Role.factoryWorker},e}();exports.User=User;
|
|
2
|
+
"use strict";var Role;Object.defineProperty(exports,"__esModule",{value:!0}),exports.User=exports.Role=void 0,function(e){e.admin="admin",e.announcementsEditor="announcementsEditor",e.partiumAnnouncementsEditor="partiumAnnouncementsEditor",e.user="user",e.analyst="dataAnalyst",e.dataInsightAnalyst="dataInsightAnalyst",e.csa="csa",e.factoryWorker="factoryWorker",e.developer="developer",e.catalogAdmin="catalogAdmin",e.dataManipulator="dataManipulator",e.dataContributor="dataContributor",e.dataValidator="dataValidator",e.enrichmentRequester="enrichmentRequester"}(Role||(exports.Role=Role={}));var User=function(){function e(e,t,r,n){void 0===n&&(n=[]),this.email=e,this.role=t,this.roles=r||new Set([t]),this.groups=n}return e.createFromToken=function(t){var r=t.email||t.preferred_username,n=this.createRoles(t),o=t.groups||[];return new e(r,n.values().next().value,n,o)},e.createRoles=function(e){if(e.role)return new Set([e.role]);if(e.groups){for(var t=new Set,r=0,n=e.groups;r<n.length;r++){var o=n[r],a=this.getRoleFromGroup(o);t.add(a)}return t}return new Set},e.getRoleFromGroup=function(e){var t=this.checkPartiumRoles(e),r=e.slice(e.lastIndexOf("/")+1);return this.getRoleByString(r,t)},e.checkPartiumRoles=function(e){var t=e.split("/"),r="partium"===t[t.length-2],n=t[t.length-1],o=Object.values(Role);return r&&!!o.find((function(e){return e===n}))},e.getRoleByString=function(e,t){if(Object.values(Role).includes(e)){var r=e;return r===Role.announcementsEditor&&t?Role.partiumAnnouncementsEditor:r}return Role.factoryWorker},e}();exports.User=User;
|
|
@@ -15,7 +15,8 @@ export declare enum BACKEND_SERVICE {
|
|
|
15
15
|
MANAGEMENT = 7,
|
|
16
16
|
CATALOG = 8,
|
|
17
17
|
DATACURATION = 9,
|
|
18
|
-
DATA_V2 = 10
|
|
18
|
+
DATA_V2 = 10,
|
|
19
|
+
DATA_ENRICHMENT = 11
|
|
19
20
|
}
|
|
20
21
|
export interface BaseUrls {
|
|
21
22
|
partiumApiBaseUrl: string;
|
|
@@ -29,6 +30,7 @@ export interface BaseUrls {
|
|
|
29
30
|
catalogBeBaseUrl: string;
|
|
30
31
|
datacurationBeBaseUrl: string;
|
|
31
32
|
dataV2BeBaseUrl: string;
|
|
33
|
+
dataEnrichmentBeBaseUrl: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Defines the structure of a https-service implementation, which
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 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.FIND=1]="FIND",e[e.DATA=2]="DATA",e[e.CSA=3]="CSA",e[e.LOG=4]="LOG",e[e.USER_DATA=5]="USER_DATA",e[e.OCR=6]="OCR",e[e.MANAGEMENT=7]="MANAGEMENT",e[e.CATALOG=8]="CATALOG",e[e.DATACURATION=9]="DATACURATION",e[e.DATA_V2=10]="DATA_V2"}(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.FIND);e.startsWith("/");)e=e.substring(1);var t;switch(r){case BACKEND_SERVICE.PARTIUM:t=this.baseUrls.partiumApiBaseUrl;break;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.OCR:t=this.baseUrls.ocrBeBaseUrl;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.FIND:default:t=this.baseUrls.findBeBaseUrl}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.FIND=1]="FIND",e[e.DATA=2]="DATA",e[e.CSA=3]="CSA",e[e.LOG=4]="LOG",e[e.USER_DATA=5]="USER_DATA",e[e.OCR=6]="OCR",e[e.MANAGEMENT=7]="MANAGEMENT",e[e.CATALOG=8]="CATALOG",e[e.DATACURATION=9]="DATACURATION",e[e.DATA_V2=10]="DATA_V2",e[e.DATA_ENRICHMENT=11]="DATA_ENRICHMENT"}(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.FIND);e.startsWith("/");)e=e.substring(1);var t;switch(r){case BACKEND_SERVICE.PARTIUM:t=this.baseUrls.partiumApiBaseUrl;break;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.OCR:t=this.baseUrls.ocrBeBaseUrl;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.FIND:default:t=this.baseUrls.findBeBaseUrl}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/datacuration/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from './models/get-image-submissions-response';
|
|
|
7
7
|
export * from './models/image-submission-content-type';
|
|
8
8
|
export * from './models/image-submission-status';
|
|
9
9
|
export * from './models/image-submission';
|
|
10
|
-
export * from './models/image-submission-pagination-context';
|
|
11
10
|
export * from './models/reject-image-submission-request';
|
|
12
11
|
export * from './models/reject-image-submission-response';
|
|
13
12
|
export * from './models/submit-images-request';
|
package/datacuration/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,s,t){void 0===t&&(t=s);var o=Object.getOwnPropertyDescriptor(r,s);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[s]}}),Object.defineProperty(e,t,o)}:function(e,r,s,t){void 0===t&&(t=s),e[t]=r[s]}),__exportStar=this&&this.__exportStar||function(e,r){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(r,s)||__createBinding(r,e,s)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./models/approve-image-submission-request"),exports),__exportStar(require("./models/approve-image-submission-response"),exports),__exportStar(require("./models/base-submission-response"),exports),__exportStar(require("./models/get-image-submissions-request"),exports),__exportStar(require("./models/get-image-submissions-response"),exports),__exportStar(require("./models/image-submission-content-type"),exports),__exportStar(require("./models/image-submission-status"),exports),__exportStar(require("./models/image-submission"),exports),__exportStar(require("./models/
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,s,t){void 0===t&&(t=s);var o=Object.getOwnPropertyDescriptor(r,s);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[s]}}),Object.defineProperty(e,t,o)}:function(e,r,s,t){void 0===t&&(t=s),e[t]=r[s]}),__exportStar=this&&this.__exportStar||function(e,r){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(r,s)||__createBinding(r,e,s)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./models/approve-image-submission-request"),exports),__exportStar(require("./models/approve-image-submission-response"),exports),__exportStar(require("./models/base-submission-response"),exports),__exportStar(require("./models/get-image-submissions-request"),exports),__exportStar(require("./models/get-image-submissions-response"),exports),__exportStar(require("./models/image-submission-content-type"),exports),__exportStar(require("./models/image-submission-status"),exports),__exportStar(require("./models/image-submission"),exports),__exportStar(require("./models/reject-image-submission-request"),exports),__exportStar(require("./models/reject-image-submission-response"),exports),__exportStar(require("./models/submit-images-request"),exports),__exportStar(require("./models/submit-images-response"),exports),__exportStar(require("./models/update-image-submission-request"),exports),__exportStar(require("./models/update-image-submission-response"),exports),__exportStar(require("./services/image-submission.service"),exports);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { BasePaginatedRequest } from "../../core/models/base-paginated-request";
|
|
2
3
|
/**
|
|
3
4
|
* Request for getting image submissions.
|
|
4
5
|
*/
|
|
5
|
-
export interface GetImageSubmissionsRequest {
|
|
6
|
+
export interface GetImageSubmissionsRequest extends BasePaginatedRequest {
|
|
6
7
|
/**
|
|
7
8
|
* The organization name.
|
|
8
9
|
*/
|
|
@@ -15,12 +16,4 @@ export interface GetImageSubmissionsRequest {
|
|
|
15
16
|
* Whether the image submissions are reviewed.
|
|
16
17
|
*/
|
|
17
18
|
reviewed?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* The cursor to get the next page of image submissions.
|
|
20
|
-
*/
|
|
21
|
-
cursor?: string;
|
|
22
|
-
/**
|
|
23
|
-
* The page size of the image submissions.
|
|
24
|
-
*/
|
|
25
|
-
pageSize?: number;
|
|
26
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseService } from '../../core';
|
|
3
|
+
import { BaseService, DefaultGetPaginatedRequestPaginationContext } from '../../core';
|
|
4
4
|
import { SubmitImagesRequest } from '../models/submit-images-request';
|
|
5
5
|
import { SubmitImagesResponse } from '../models/submit-images-response';
|
|
6
6
|
import { GetImageSubmissionsRequest } from '../models/get-image-submissions-request';
|
|
@@ -11,7 +11,6 @@ import { RejectImageSubmissionRequest } from '../models/reject-image-submission-
|
|
|
11
11
|
import { RejectImageSubmissionResponse } from '../models/reject-image-submission-response';
|
|
12
12
|
import { UpdateImageSubmissionRequest } from '../models/update-image-submission-request';
|
|
13
13
|
import { UpdateImageSubmissionResponse } from '../models/update-image-submission-response';
|
|
14
|
-
import { ImageSubmissionPaginationContext } from '../models/image-submission-pagination-context';
|
|
15
14
|
/**
|
|
16
15
|
* Service for submitting images and metadata to the datacuration backend for AI ingestion.
|
|
17
16
|
*/
|
|
@@ -32,7 +31,7 @@ export interface ImageSubmissionService {
|
|
|
32
31
|
*/
|
|
33
32
|
loadInitialSubmissions(request: GetImageSubmissionsRequest): Observable<{
|
|
34
33
|
response: GetImageSubmissionsResponse;
|
|
35
|
-
paginationContext:
|
|
34
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
36
35
|
}>;
|
|
37
36
|
/**
|
|
38
37
|
* Loads more image submissions using the provided pagination context.
|
|
@@ -41,14 +40,14 @@ export interface ImageSubmissionService {
|
|
|
41
40
|
* @returns An Observable that emits the image submissions with updated pagination context.
|
|
42
41
|
* @throws An error if there are no more pages available.
|
|
43
42
|
*/
|
|
44
|
-
loadMoreSubmissions(paginationContext:
|
|
43
|
+
loadMoreSubmissions(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
45
44
|
response: GetImageSubmissionsResponse;
|
|
46
|
-
paginationContext:
|
|
45
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
47
46
|
}>;
|
|
48
47
|
/**
|
|
49
48
|
* Returns true if there are more results available to load based on the pagination context.
|
|
50
49
|
*/
|
|
51
|
-
hasMoreResultsAvailable(paginationContext:
|
|
50
|
+
hasMoreResultsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
52
51
|
/**
|
|
53
52
|
* Approves image submissions.
|
|
54
53
|
*
|
|
@@ -83,16 +82,16 @@ export declare class ImageSubmissionServiceImpl extends BaseService implements I
|
|
|
83
82
|
submit(request: SubmitImagesRequest): Observable<SubmitImagesResponse>;
|
|
84
83
|
loadInitialSubmissions(request: GetImageSubmissionsRequest): Observable<{
|
|
85
84
|
response: GetImageSubmissionsResponse;
|
|
86
|
-
paginationContext:
|
|
85
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
87
86
|
}>;
|
|
88
|
-
loadMoreSubmissions(paginationContext:
|
|
87
|
+
loadMoreSubmissions(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
89
88
|
response: GetImageSubmissionsResponse;
|
|
90
|
-
paginationContext:
|
|
89
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
91
90
|
}>;
|
|
92
91
|
approve(request: ApproveImageSubmissionRequest): Observable<ApproveImageSubmissionResponse>;
|
|
93
92
|
reject(request: RejectImageSubmissionRequest): Observable<RejectImageSubmissionResponse>;
|
|
94
93
|
update(request: UpdateImageSubmissionRequest): Observable<UpdateImageSubmissionResponse>;
|
|
95
|
-
hasMoreResultsAvailable(paginationContext:
|
|
94
|
+
hasMoreResultsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
96
95
|
private fetchSubmissionsPage;
|
|
97
96
|
private extractNextCursor;
|
|
98
97
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
export * from './models/enrichment-job';
|
|
3
|
+
export * from './models/get-enrichment-job-parts-request';
|
|
4
|
+
export * from './models/enrichment-job-part';
|
|
5
|
+
export * from './services/data-enrichment.service';
|
|
6
|
+
export * from './models/create-enrichment-job-request';
|
|
7
|
+
export * from './models/create-enrichment-job-response';
|
|
8
|
+
export * from './models/submit-enrichment-job-request';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=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("./models/enrichment-job"),exports),__exportStar(require("./models/get-enrichment-job-parts-request"),exports),__exportStar(require("./models/enrichment-job-part"),exports),__exportStar(require("./services/data-enrichment.service"),exports),__exportStar(require("./models/create-enrichment-job-request"),exports),__exportStar(require("./models/create-enrichment-job-response"),exports),__exportStar(require("./models/submit-enrichment-job-request"),exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
/**
|
|
3
|
+
* Response for creating a data enrichment job.
|
|
4
|
+
*/
|
|
5
|
+
export interface CreateEnrichmentJobResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The id of the newly created enrichment job.
|
|
8
|
+
*/
|
|
9
|
+
jobId: string;
|
|
10
|
+
partsSummary: {
|
|
11
|
+
/**
|
|
12
|
+
* The total amount of part-ids in the job
|
|
13
|
+
*/
|
|
14
|
+
totalCount: number;
|
|
15
|
+
/**
|
|
16
|
+
* The amount of valid part-ids in the job
|
|
17
|
+
*/
|
|
18
|
+
validCount: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { ImageFromFindAPI, Image } from '../../data';
|
|
3
|
+
export interface EnrichmentJobPartFromAPI {
|
|
4
|
+
partiumId: string;
|
|
5
|
+
id: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
images: ImageFromFindAPI[];
|
|
8
|
+
status: ENRICHMENT_JOB_PART_STATUS;
|
|
9
|
+
}
|
|
10
|
+
export declare enum ENRICHMENT_JOB_PART_STATUS {
|
|
11
|
+
VALID = "valid",
|
|
12
|
+
INVALID = "invalid"
|
|
13
|
+
}
|
|
14
|
+
export interface EnrichmentJobPart {
|
|
15
|
+
partiumId: string;
|
|
16
|
+
externalId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
images: Array<Image>;
|
|
19
|
+
status: ENRICHMENT_JOB_PART_STATUS;
|
|
20
|
+
}
|
|
21
|
+
export declare const enrichmentJobPartFromAPIResponse: (data: EnrichmentJobPartFromAPI) => EnrichmentJobPart;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.enrichmentJobPartFromAPIResponse=exports.ENRICHMENT_JOB_PART_STATUS=void 0;var ENRICHMENT_JOB_PART_STATUS,core_1=require("../../core"),data_1=require("../../data");!function(e){e.VALID="valid",e.INVALID="invalid"}(ENRICHMENT_JOB_PART_STATUS||(exports.ENRICHMENT_JOB_PART_STATUS=ENRICHMENT_JOB_PART_STATUS={}));var enrichmentJobPartFromAPIResponse=function(e){return{partiumId:e.partiumId,externalId:e.id,name:e.name,images:e.images?e.images.map((function(e){return data_1.Image.fromFindAPIResponse(e,core_1.BACKEND_SERVICE.DATA)})):[],status:e.status}};exports.enrichmentJobPartFromAPIResponse=enrichmentJobPartFromAPIResponse;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { Image, ImageFromFindAPI } from '../../data/models/image';
|
|
3
|
+
export declare enum EnrichmentJobStatus {
|
|
4
|
+
SUBMITTED = "submitted",
|
|
5
|
+
IN_PROGRESS = "in_progress",
|
|
6
|
+
COMPLETED = "completed",
|
|
7
|
+
CANCELED = "canceled"
|
|
8
|
+
}
|
|
9
|
+
export interface EnrichmentJobFromAPI {
|
|
10
|
+
jobId: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
thumbnails: (ImageFromFindAPI | undefined)[];
|
|
14
|
+
status: EnrichmentJobStatus;
|
|
15
|
+
}
|
|
16
|
+
export interface EnrichmentJob {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
partImages: (Image | undefined)[];
|
|
21
|
+
status: EnrichmentJobStatus;
|
|
22
|
+
}
|
|
23
|
+
export declare const enrichmentJobFromAPIResponse: (data: EnrichmentJobFromAPI) => EnrichmentJob;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.enrichmentJobFromAPIResponse=exports.EnrichmentJobStatus=void 0;var EnrichmentJobStatus,core_1=require("../../core"),image_1=require("../../data/models/image");!function(e){e.SUBMITTED="submitted",e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.CANCELED="canceled"}(EnrichmentJobStatus||(exports.EnrichmentJobStatus=EnrichmentJobStatus={}));var enrichmentJobFromAPIResponse=function(e){return{id:e.jobId,title:e.title,description:e.description,partImages:e.thumbnails?e.thumbnails.map((function(e){return e?image_1.Image.fromFindAPIResponse(e,core_1.BACKEND_SERVICE.DATA):null})):[],status:e.status}};exports.enrichmentJobFromAPIResponse=enrichmentJobFromAPIResponse;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { BasePaginatedRequest } from "../../core/models/base-paginated-request";
|
|
3
|
+
/**
|
|
4
|
+
* Request for getting data enrichment job parts.
|
|
5
|
+
*/
|
|
6
|
+
export interface GetEnrichmentJobPartsRequest extends BasePaginatedRequest {
|
|
7
|
+
/**
|
|
8
|
+
* The id of the enrichment job.
|
|
9
|
+
*/
|
|
10
|
+
jobId: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
/**
|
|
3
|
+
* Request to add metadata to an enrichment job and set it's status from "draft" to "submitted"
|
|
4
|
+
*/
|
|
5
|
+
export interface SubmitEnrichmentJobRequest {
|
|
6
|
+
/**
|
|
7
|
+
* Enrichment job id.
|
|
8
|
+
*/
|
|
9
|
+
jobId: string;
|
|
10
|
+
/**
|
|
11
|
+
* The title of the enrichment job.
|
|
12
|
+
*/
|
|
13
|
+
title: string;
|
|
14
|
+
/**
|
|
15
|
+
* The description of the enrichment job.
|
|
16
|
+
*/
|
|
17
|
+
description: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { BaseService } from '../../core';
|
|
4
|
+
import { EnrichmentJob } from '../models/enrichment-job';
|
|
5
|
+
import { DefaultGetPaginatedRequestPaginationContext } from '../../core/models/default-get-paginated-request-pagination-context';
|
|
6
|
+
import { EnrichmentJobPart } from '../models/enrichment-job-part';
|
|
7
|
+
import { BasePaginatedRequest } from '../../core/models/base-paginated-request';
|
|
8
|
+
import { GetEnrichmentJobPartsRequest } from '../models/get-enrichment-job-parts-request';
|
|
9
|
+
import { CreateEnrichmentJobRequest } from '../models/create-enrichment-job-request';
|
|
10
|
+
import { CreateEnrichmentJobResponse } from '../models/create-enrichment-job-response';
|
|
11
|
+
import { SubmitEnrichmentJobRequest } from '../models/submit-enrichment-job-request';
|
|
12
|
+
import { GetEnrichmentJobRequest } from '../models/get-enrichment-job-request';
|
|
13
|
+
/**
|
|
14
|
+
* Service for managing data enrichment jobs.
|
|
15
|
+
*/
|
|
16
|
+
export interface DataEnrichmentService {
|
|
17
|
+
/**
|
|
18
|
+
* Load the initial page of data enrichment jobs.
|
|
19
|
+
*
|
|
20
|
+
* @param request - The request containing the parameters for the data enrichment jobs to get.
|
|
21
|
+
* @returns An Observable that emits the data first page of enrichment jobs with pagination context.
|
|
22
|
+
*/
|
|
23
|
+
loadEnrichmentJobs(request: BasePaginatedRequest): Observable<{
|
|
24
|
+
jobs: EnrichmentJob[];
|
|
25
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Load the next page of data enrichment jobs.
|
|
29
|
+
*
|
|
30
|
+
* @param paginationContext - The pagination context from the most recent call.
|
|
31
|
+
* @returns An Observable that emits the data of the next page of enrichment jobs with pagination context.
|
|
32
|
+
*/
|
|
33
|
+
loadMoreEnrichmentJobs(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
34
|
+
jobs: EnrichmentJob[];
|
|
35
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Check if there are more results available to load based on the current pagination context.
|
|
39
|
+
*
|
|
40
|
+
* @param paginationContext - The pagination context from the most recent call.
|
|
41
|
+
* @returns True if there are more results available to load, false otherwise.
|
|
42
|
+
*/
|
|
43
|
+
hasMoreEnrichmentJobsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Fetch the detail info of an enrichment job.
|
|
46
|
+
*
|
|
47
|
+
* @param request - The request containing id of the enrichment job to fetch.
|
|
48
|
+
* @returns An Observable that emits the detail info of the enrichment job.
|
|
49
|
+
*/
|
|
50
|
+
getEnrichmentJob(request: GetEnrichmentJobRequest): Observable<EnrichmentJob>;
|
|
51
|
+
loadEnrichmentJobParts(request: GetEnrichmentJobPartsRequest): Observable<{
|
|
52
|
+
parts: EnrichmentJobPart[];
|
|
53
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Load the next page of enrichment job parts.
|
|
57
|
+
*
|
|
58
|
+
* @param paginationContext - The pagination context from the most recent call.
|
|
59
|
+
* @returns An Observable that emits the data of the next page of enrichment job parts with pagination context.
|
|
60
|
+
*/
|
|
61
|
+
loadMoreEnrichmentJobParts(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
62
|
+
parts: EnrichmentJobPart[];
|
|
63
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
64
|
+
}>;
|
|
65
|
+
hasMoreEnrichmentJobPartsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Create a new data enrichment job based on a CSV file containing the part-ids to enrich.
|
|
68
|
+
*
|
|
69
|
+
* @param request - The request containing the CSV file containing the part-ids to enrich.
|
|
70
|
+
* @returns An Observable that emits the response
|
|
71
|
+
*/
|
|
72
|
+
createEnrichmentJob(request: CreateEnrichmentJobRequest): Observable<CreateEnrichmentJobResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Submit the "draft" enrichment job and cause it's status to change to "submitted"
|
|
75
|
+
* @param request - The request containing the id of the enrichment job to submit.
|
|
76
|
+
* @returns An Observable that emits the response
|
|
77
|
+
*/
|
|
78
|
+
submitEnrichmentJob(request: SubmitEnrichmentJobRequest): Observable<void>;
|
|
79
|
+
}
|
|
80
|
+
export declare class DataEnrichmentServiceImpl extends BaseService implements DataEnrichmentService {
|
|
81
|
+
private httpsService;
|
|
82
|
+
onCreate(): void;
|
|
83
|
+
loadEnrichmentJobs(request: BasePaginatedRequest): Observable<{
|
|
84
|
+
jobs: EnrichmentJob[];
|
|
85
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
86
|
+
}>;
|
|
87
|
+
loadMoreEnrichmentJobs(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
88
|
+
jobs: EnrichmentJob[];
|
|
89
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
90
|
+
}>;
|
|
91
|
+
hasMoreEnrichmentJobsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
92
|
+
getEnrichmentJob(request: GetEnrichmentJobRequest): Observable<EnrichmentJob>;
|
|
93
|
+
loadEnrichmentJobParts(request: GetEnrichmentJobPartsRequest): Observable<{
|
|
94
|
+
parts: EnrichmentJobPart[];
|
|
95
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
96
|
+
}>;
|
|
97
|
+
loadMoreEnrichmentJobParts(paginationContext: DefaultGetPaginatedRequestPaginationContext): Observable<{
|
|
98
|
+
parts: EnrichmentJobPart[];
|
|
99
|
+
paginationContext: DefaultGetPaginatedRequestPaginationContext;
|
|
100
|
+
}>;
|
|
101
|
+
hasMoreEnrichmentJobPartsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
|
|
102
|
+
createEnrichmentJob(request: CreateEnrichmentJobRequest): Observable<CreateEnrichmentJobResponse>;
|
|
103
|
+
submitEnrichmentJob(request: SubmitEnrichmentJobRequest): Observable<void>;
|
|
104
|
+
private fetchEnrichmentJobsPage;
|
|
105
|
+
private fetchEnrichmentJobPartsPage;
|
|
106
|
+
private extractNextCursor;
|
|
107
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},t(r,e)};return function(r,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=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(t,r,e,n){var o,i=arguments.length,s=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,e,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(s=(i<3?o(s):i>3?o(r,e,s):o(r,e))||s);return i>3&&s&&Object.defineProperty(r,e,s),s};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(t){function r(){return null!==t&&t.apply(this,arguments)||this}return __extends(r,t),r.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},r.prototype.loadEnrichmentJobs=function(t){return this.fetchEnrichmentJobsPage(t).pipe((0,rxjs_1.map)((function(r){var e=r.jobs,n=r.nextCursor;return{jobs:e,paginationContext:{initialRequest:t,nextCursor:n}}})))},r.prototype.loadMoreEnrichmentJobs=function(t){if(!t.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 r=__assign(__assign({},t.initialRequest),{cursor:t.nextCursor});return this.fetchEnrichmentJobsPage(r).pipe((0,rxjs_1.map)((function(r){var e=r.jobs,n=r.nextCursor;return{jobs:e,paginationContext:__assign(__assign({},t),{nextCursor:n})}})))},r.prototype.hasMoreEnrichmentJobsAvailable=function(t){return!!t.nextCursor},r.prototype.getEnrichmentJob=function(t){return this.httpsService.get("jobs/".concat(t.jobId),[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(t){return(0,enrichment_job_1.enrichmentJobFromAPIResponse)(t)})))},r.prototype.loadEnrichmentJobParts=function(t){return this.fetchEnrichmentJobPartsPage(t).pipe((0,rxjs_1.map)((function(r){var e=r.parts,n=r.nextCursor;return{parts:e,paginationContext:{initialRequest:t,nextCursor:n}}})))},r.prototype.loadMoreEnrichmentJobParts=function(t){if(!t.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 r=__assign(__assign({},t.initialRequest),{cursor:t.nextCursor});return this.fetchEnrichmentJobPartsPage(r).pipe((0,rxjs_1.map)((function(r){var e=r.parts,n=r.nextCursor;return{parts:e,paginationContext:__assign(__assign({},t),{nextCursor:n})}})))},r.prototype.hasMoreEnrichmentJobPartsAvailable=function(t){return!!t.nextCursor},r.prototype.createEnrichmentJob=function(t){var r=new FormData;return r.append("file",t.csvFile),this.httpsService.post("jobs/upload",r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{"Content-Type":"multipart/form-data"})},r.prototype.submitEnrichmentJob=function(t){return this.httpsService.post("jobs/".concat(t.jobId,"/submit"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.fetchEnrichmentJobsPage=function(t){var r=this,e=Object.entries(t).map((function(t){var r,e=t[0],n=t[1];return(r={})[e]=n,r}));return this.httpsService.get("jobs",e,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(t){var e;return{jobs:null===(e=t.results)||void 0===e?void 0:e.map((function(t){return(0,enrichment_job_1.enrichmentJobFromAPIResponse)(t)})),nextCursor:r.extractNextCursor(t)}})))},r.prototype.fetchEnrichmentJobPartsPage=function(t){var r=this,e=Object.entries(t).map((function(t){var r,e=t[0],n=t[1];return(r={})[e]=n,r}));return this.httpsService.get("jobs/".concat(t.jobId,"/parts"),e,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(t){var e;return{parts:null===(e=t.results)||void 0===e?void 0:e.map((function(t){return(0,enrichment_job_part_1.enrichmentJobPartFromAPIResponse)(t)})),nextCursor:r.extractNextCursor(t)}})))},r.prototype.extractNextCursor=function(t){if(t.next)return new URL(t.next).searchParams.get("cursor")||void 0},r=__decorate([(0,core_1.InjectionIdentifier)("DataEnrichmentService")],r)}(core_1.BaseService);exports.DataEnrichmentServiceImpl=DataEnrichmentServiceImpl;
|
package/gen/sdk-version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
export declare const SDK_VERSION_NUMBER = "14.
|
|
2
|
+
export declare const SDK_VERSION_NUMBER = "14.14.1";
|
package/gen/sdk-version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="14.
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="14.14.1";
|
package/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { ApiKeyService } from './management';
|
|
|
26
26
|
import { PartEnrichmentService } from './data/services/part-enrichment.service';
|
|
27
27
|
import { ImagesService } from './catalog/services/images.service';
|
|
28
28
|
import { ImageSubmissionService } from './datacuration';
|
|
29
|
+
import { DataEnrichmentService } from './enrichment';
|
|
29
30
|
export declare enum INITIALIZATION_STATUS {
|
|
30
31
|
NOT_INITIALIZED = 0,
|
|
31
32
|
INITIALIZING = 1,
|
|
@@ -70,6 +71,7 @@ export declare class Partium {
|
|
|
70
71
|
static get localStorage(): LocalStorageService;
|
|
71
72
|
static get images(): ImagesService;
|
|
72
73
|
static get imageSubmission(): ImageSubmissionService;
|
|
74
|
+
static get dataEnrichment(): DataEnrichmentService;
|
|
73
75
|
/**
|
|
74
76
|
* Initialize the Partium SDK with a given configuration.
|
|
75
77
|
* The configuration defines what Authentication method is used and which
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Copyright © 2022-2025 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");!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.OrganizationService)},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}),e.init=function(r){e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZING),e._serviceProvider||(e._serviceProvider=new service_provider_1.ServiceProvider);var i=[r.partiumApiBaseUrl,r.partiumLoginUrl];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),c=e.getService(local_storage_service_interface_1.LocalStorageService);t.registerLoginInitService(c,1);var n=e.getService(asset_service_1.AssetServiceImpl);t.registerLoginInitService(n,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 _=e.getService(favorite_service_1.FavoriteServiceImpl);t.registerLoginInitService(_,2);var o=e.getService(data_1.CustomerServiceAssistanceServiceImpl);t.registerLoginInitService(o,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)]),findBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_FIND_API_URL]),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]),ocrBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_OCR_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])},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)(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(){return e.ensureInitialized(),e.getService(core_1.OrganizationService).getOrganizations()},e.useOrganization=function(r){return e.ensureInitialized(),e.session.useOrganization(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 c=t[i];r.push(c.replace(/^\/+/,"").replace(/\/+$/,""))}return r.join("/")},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");!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.OrganizationService)},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){e._initializationStatus$.next(INITIALIZATION_STATUS.INITIALIZING),e._serviceProvider||(e._serviceProvider=new service_provider_1.ServiceProvider);var i=[r.partiumApiBaseUrl,r.partiumLoginUrl];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),c=e.getService(local_storage_service_interface_1.LocalStorageService);t.registerLoginInitService(c,1);var n=e.getService(asset_service_1.AssetServiceImpl);t.registerLoginInitService(n,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 _=e.getService(favorite_service_1.FavoriteServiceImpl);t.registerLoginInitService(_,2);var o=e.getService(data_1.CustomerServiceAssistanceServiceImpl);t.registerLoginInitService(o,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)]),findBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_FIND_API_URL]),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]),ocrBeBaseUrl:e.buildUrl([r.partiumApiBaseUrl,"".concat(constants_1.PARTIUM_API_VERSION),constants_1.REL_OCR_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])},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)(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(){return e.ensureInitialized(),e.getService(core_1.OrganizationService).getOrganizations()},e.useOrganization=function(r){return e.ensureInitialized(),e.session.useOrganization(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 c=t[i];r.push(c.replace(/^\/+/,"").replace(/\/+$/,""))}return r.join("/")},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": "14.
|
|
3
|
+
"version": "14.14.1",
|
|
4
4
|
"author": "Partium Inc.",
|
|
5
5
|
"license": "See LICENSE.txt",
|
|
6
6
|
"description": "The Partium Find SDK enables integration of Partium’s parts and materials search capabilities into JavaScript-based applications.",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright © 2022-2025 Partium, Inc. DBA Partium
|
|
2
|
-
import { GetImageSubmissionsRequest } from './get-image-submissions-request';
|
|
3
|
-
/**
|
|
4
|
-
* Pagination context for image submissions, containing the initial request and cursor state.
|
|
5
|
-
*/
|
|
6
|
-
export interface ImageSubmissionPaginationContext {
|
|
7
|
-
/**
|
|
8
|
-
* The original request parameters used for the initial query.
|
|
9
|
-
*/
|
|
10
|
-
initialRequest: GetImageSubmissionsRequest;
|
|
11
|
-
/**
|
|
12
|
-
* The cursor for the next page of results, if available.
|
|
13
|
-
*/
|
|
14
|
-
nextCursor?: string;
|
|
15
|
-
}
|
|
File without changes
|