@ballerine/common
Advanced tools
Comparing version 0.7.26 to 0.7.27
@@ -63,2 +63,3 @@ /** | ||
exports.getDocumentId = index.getDocumentId; | ||
exports.getDocumentSchemaByCountry = index.getDocumentSchemaByCountry; | ||
exports.getDocumentsByCountry = index.getDocumentsByCountry; | ||
@@ -65,0 +66,0 @@ exports.CommonWorkflowEvent = index$1.CommonWorkflowEvent; |
@@ -30,2 +30,7 @@ /** | ||
}; | ||
var getDocumentSchemaByCountry = function getDocumentSchemaByCountry(countryCode, documentsSchema) { | ||
return (documentsSchema == null ? void 0 : documentsSchema.filter(function (documentSchema) { | ||
return documentSchema.issuer.country === countryCode; | ||
})) || []; | ||
}; | ||
var getDocumentId = function getDocumentId(document, useUuid) { | ||
@@ -45,3 +50,4 @@ var _document$issuer; | ||
exports.getDocumentId = getDocumentId; | ||
exports.getDocumentSchemaByCountry = getDocumentSchemaByCountry; | ||
exports.getDocumentsByCountry = getDocumentsByCountry; | ||
//# sourceMappingURL=index.js.map |
@@ -32,4 +32,4 @@ /** | ||
export { getGhanaDocuments } from './schemas/documents/workflow/documents/schemas/GH.js'; | ||
export { getDocumentId, getDocumentsByCountry } from './schemas/documents/workflow/documents/schemas/index.js'; | ||
export { getDocumentId, getDocumentSchemaByCountry, getDocumentsByCountry } from './schemas/documents/workflow/documents/schemas/index.js'; | ||
export { CommonWorkflowEvent, CommonWorkflowStates, StateTag, StateTags } from './consts/index.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -26,2 +26,7 @@ /** | ||
}; | ||
var getDocumentSchemaByCountry = function getDocumentSchemaByCountry(countryCode, documentsSchema) { | ||
return (documentsSchema == null ? void 0 : documentsSchema.filter(function (documentSchema) { | ||
return documentSchema.issuer.country === countryCode; | ||
})) || []; | ||
}; | ||
var getDocumentId = function getDocumentId(document, useUuid) { | ||
@@ -40,3 +45,3 @@ var _document$issuer; | ||
export { getDocumentId, getDocumentsByCountry }; | ||
export { getDocumentId, getDocumentSchemaByCountry, getDocumentsByCountry }; | ||
//# sourceMappingURL=index.js.map |
@@ -196,2 +196,6 @@ /** | ||
}; | ||
type TAvailableDocuments = Array<{ | ||
category: string; | ||
type: string; | ||
}>; | ||
@@ -201,2 +205,3 @@ declare const getGhanaDocuments: () => TDocument[]; | ||
declare const getDocumentsByCountry: (countryCode: (typeof countryCodes)[number]) => TDocument[]; | ||
declare const getDocumentSchemaByCountry: (countryCode: (typeof countryCodes)[number], documentsSchema: TDocument[] | undefined) => TDocument[]; | ||
declare const getDocumentId: (document: TDocument | DefaultContextSchema$1['documents'][number], useUuid?: boolean) => string; | ||
@@ -232,2 +237,2 @@ | ||
export { AnyRecord, CommonWorkflowEvent, CommonWorkflowStates, DefaultContextSchema, IErrorWithMessage, Serializable, StateTag, StateTags, TDefaultSchemaDocumentPage, TDocument, TStateTag, TStateTags, defaultContextSchema, dump, everyDocumentDecisionStatus, getDocumentId, getDocumentsByCountry, getGhanaDocuments, handlePromise, isEmptyObject, isErrorWithCode, isErrorWithMessage, isErrorWithName, isFunction, isNullish, isObject, log, noNullish, raise, safeEvery, sleep, someDocumentDecisionStatus, uniqueArray, zodErrorToReadable }; | ||
export { AnyRecord, CommonWorkflowEvent, CommonWorkflowStates, DefaultContextSchema, IErrorWithMessage, Serializable, StateTag, StateTags, TAvailableDocuments, TDefaultSchemaDocumentPage, TDocument, TStateTag, TStateTags, defaultContextSchema, dump, everyDocumentDecisionStatus, getDocumentId, getDocumentSchemaByCountry, getDocumentsByCountry, getGhanaDocuments, handlePromise, isEmptyObject, isErrorWithCode, isErrorWithMessage, isErrorWithName, isFunction, isNullish, isObject, log, noNullish, raise, safeEvery, sleep, someDocumentDecisionStatus, uniqueArray, zodErrorToReadable }; |
@@ -5,3 +5,3 @@ { | ||
"author": "Ballerine <dev@ballerine.com>", | ||
"version": "0.7.26", | ||
"version": "0.7.27", | ||
"description": "common", | ||
@@ -8,0 +8,0 @@ "module": "./dist/esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1263582
9440