@bisondesk/documents-sdk 1.0.549 → 1.0.551
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/lib/constants/search.d.ts.map +1 -1
- package/lib/constants/search.js +3 -0
- package/lib/constants/search.js.map +1 -1
- package/lib/types/document-categories.d.ts +1 -0
- package/lib/types/document-categories.d.ts.map +1 -1
- package/lib/types/document-categories.js.map +1 -1
- package/lib/types/search.d.ts +1 -0
- package/lib/types/search.d.ts.map +1 -1
- package/lib/types/search.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/search.ts +3 -0
- package/src/types/document-categories.ts +1 -0
- package/src/types/search.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"/","sources":["constants/search.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,EACZ,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"/","sources":["constants/search.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,WAAW,EACZ,MAAM,uCAAuC,CAAC;AAgI/C,eAAO,MAAM,wBAAwB,EAAE;IACrC,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAKtC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;IACxC,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;CAwDhC,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAAO,wBAuD9C,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,0BAc/C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAMxC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,gBAI1C,CAAC"}
|
package/lib/constants/search.js
CHANGED
|
@@ -38,6 +38,9 @@ const BASE_DOC_DRAFT_MAPPING_FIELDS = {
|
|
|
38
38
|
'custom.validationRulesStatus': {
|
|
39
39
|
esMapping: { type: 'keyword' },
|
|
40
40
|
},
|
|
41
|
+
'custom.businessValidationAt': {
|
|
42
|
+
esMapping: { type: 'date' },
|
|
43
|
+
},
|
|
41
44
|
};
|
|
42
45
|
const FINANCE_DOC_DRAFT_MAPPING_FIELDS = {
|
|
43
46
|
'doc.type': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"/","sources":["constants/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAStE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE/E,MAAM,6BAA6B,GAE/B;IACF,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,yBAAyB,EAAE;KACjE;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B;IACD,kBAAkB,EAAE;QAClB,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B;IACD,cAAc,EAAE;QACd,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B;IACD,cAAc,EAAE;QACd,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B;IACD,gBAAgB,EAAE;QAChB,S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CAAC,KAAK;QAC3B,MAAM,EAAE;YACN;gBACE,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;gBACtC,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aAC1E;SACF;KACF;IACD;QACE,MAAM,EAAE,mBAAmB,CAAC,iCAAiC,CAAC;QAC9D,OAAO,EAAE,6BAA6B;QACtC,SAAS,EAAE,UAAU,CAAC,IAAI;QAC1B,IAAI,EAAE,eAAe,CAAC,IAAI;QAC1B,OAAO,EAAE,OAAO;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAA+B;IAE3E,GAAG,EAAE,CAAC,QAAQ;IACd,GAAG,EAAE,CAAC,eAAe;IACrB,GAAG,EAAE,CAAC,UAAU;IAChB,GAAG,EAAE,CAAC,6BAA6B;IAEnC,GAAG,EAAE,CAAC,UAAU;IAChB,GAAG,EAAE,CAAC,uBAAuB;IAE7B,GAAG,EAAE,CAAC,8BAA8B;IACpC,GAAG,EAAE,CAAC,4BAA4B;IAClC,GAAG,EAAE,CAAC,8BAA8B;IACpC,GAAG,EAAE,CAAC,mCAAmC;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAiB;IACtD,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE,EAAE;IACjB,MAAM,EAAE;QACN,GAAG,wBAAwB;KAC5B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAqB;IAC5D,MAAM,EAAE;QACN,GAAG,2BAA2B;KAC/B;CACF,CAAC","sourcesContent":["import { DEFAULT_EXACT_MATCH_BOOST } from '@bisondesk/commons/es';\nimport { getTranslatedTitles } from '@bisondesk/commons/translations';\nimport {\n EsAggregationsDefinition,\n EsDefinition,\n EsDefinitionField,\n EsFullTextSearchDefinition,\n SearchDefinition,\n SearchField,\n} from '@bisondesk/core-sdk/types/definitions';\nimport { DateGranularity, FieldTypes } from '@bisondesk/core-sdk/types/fields';\nimport { AggregationType } from '@bisondesk/core-sdk/types/search';\nimport { UTCDate } from '@date-fns/utc';\nimport { getTime, parseISO, setHours, setMinutes, setSeconds } from 'date-fns';\n\nconst BASE_DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n 'doc.id': {\n esMapping: { type: 'keyword', boost: DEFAULT_EXACT_MATCH_BOOST },\n },\n 'doc.status': {\n esMapping: { type: 'keyword' },\n },\n 'doc.documentType': {\n esMapping: { type: 'keyword' },\n },\n 'doc.category': {\n esMapping: { type: 'keyword' },\n },\n 'doc.branchId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.attachment': {\n esMapping: { type: 'object', enabled: false },\n },\n 'doc.createdAt': {\n esMapping: { type: 'date' },\n },\n 'doc.createdBy': {\n esMapping: { type: 'keyword' },\n },\n 'custom.stage': {\n esMapping: { type: 'keyword' },\n },\n 'custom.rejected': {\n esMapping: { type: 'boolean' },\n },\n 'custom.validationRulesStatus': {\n esMapping: { type: 'keyword' },\n },\n};\n\nconst FINANCE_DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n 'doc.type': {\n esMapping: { type: 'keyword' },\n },\n 'doc.subtype': {\n esMapping: { type: 'keyword' },\n },\n 'doc.reference': {\n esMapping: { type: 'keyword', boost: DEFAULT_EXACT_MATCH_BOOST },\n },\n 'doc.issueDate': {\n esMapping: { type: 'date', ignore_malformed: true },\n },\n 'doc.dueDate': {\n esMapping: { type: 'date', ignore_malformed: true },\n },\n\n 'doc.organizationSummary.name': {\n esMapping: { type: 'text' },\n },\n 'doc.organizationSummary.id': {\n esMapping: { type: 'keyword' },\n },\n 'doc.organizationSummary.code': {\n esMapping: { type: 'keyword' },\n },\n 'doc.organizationSummary.vatNumber': {\n esMapping: { type: 'text' },\n },\n\n 'doc.lines.associations.businessEntityId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.lines.associations.recordId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.lines.associations.title': {\n esMapping: { type: 'text' },\n },\n 'doc.lines.associations.description': {\n esMapping: { type: 'text' },\n },\n 'doc.lines.associations.tags': {\n esMapping: { type: 'keyword' },\n },\n 'doc.invoiceId': {\n esMapping: { type: 'keyword' },\n },\n 'custom.validators': {\n esMapping: { type: 'keyword' },\n },\n 'custom.restrictedDraftUsers': {\n esMapping: { type: 'keyword' },\n },\n};\n\nconst ADMIN_DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n 'doc.tags': {\n esMapping: { type: 'text' },\n },\n 'doc.associations.businessEntityId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.associations.recordId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.associations.title': {\n esMapping: { type: 'text' },\n },\n 'doc.associations.description': {\n esMapping: { type: 'text' },\n },\n 'doc.associations.tags': {\n esMapping: { type: 'keyword' },\n },\n};\n\nexport const DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n ...BASE_DOC_DRAFT_MAPPING_FIELDS,\n ...FINANCE_DOC_DRAFT_MAPPING_FIELDS,\n ...ADMIN_DOC_DRAFT_MAPPING_FIELDS,\n};\n\nexport const DOC_DRAFT_DEFINITION_FIELDS: {\n [fieldId: string]: SearchField;\n} = {\n 'doc.id': {\n id: 'doc.id',\n titles: getTranslatedTitles('id'),\n type: FieldTypes.text,\n },\n 'custom.stage': {\n id: 'custom.stage',\n titles: getTranslatedTitles('aggs.draft.stage'),\n type: FieldTypes.text,\n },\n 'doc.documentType': {\n id: 'doc.documentType',\n titles: getTranslatedTitles('aggs.draft.documentType'),\n type: FieldTypes.text,\n },\n 'doc.branchId': {\n id: 'doc.branchId',\n titles: getTranslatedTitles('branch'),\n type: FieldTypes.text,\n },\n 'doc.createdAt': {\n id: 'doc.createdAt',\n titles: getTranslatedTitles('aggs.creationDate'),\n type: FieldTypes.date,\n meta: {\n granularity: DateGranularity.yearMonthDayTime,\n },\n },\n 'custom.validationRulesStatus': {\n id: 'custom.validationRulesStatus',\n titles: getTranslatedTitles('aggs.draft.validationRules'),\n type: FieldTypes.text,\n },\n 'doc.createdBy': {\n id: 'doc.createdBy',\n titles: getTranslatedTitles('aggs.createdBy'),\n type: FieldTypes.collaborator,\n },\n // Finance fields\n 'doc.subtype': {\n id: 'doc.subtype',\n titles: getTranslatedTitles('type'),\n type: FieldTypes.text,\n },\n 'custom.rejected': {\n id: 'custom.rejected',\n titles: getTranslatedTitles('aggs.draft.rejected'),\n type: FieldTypes.checkbox,\n },\n 'custom.restrictedDraftUsers': {\n id: 'custom.restrictedDraftUsers',\n titles: getTranslatedTitles('agg.drafts.restrictedDraftUsers'),\n type: FieldTypes.text,\n },\n};\n\nexport const getSearchDocumentDraftsAggs = (): EsAggregationsDefinition => [\n {\n titles: getTranslatedTitles('aggs.draft.stage'),\n fieldId: 'custom.stage',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.draft.documentType'),\n fieldId: 'doc.documentType',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('type'),\n fieldId: 'doc.subtype',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.draft.rejected'),\n fieldId: 'custom.rejected',\n fieldType: FieldTypes.checkbox,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.draft.validationRules'),\n fieldId: 'custom.validationRulesStatus',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.creationDate'),\n fieldId: 'doc.createdAt',\n step: 1,\n type: AggregationType.range,\n ranges: [\n {\n start: getTime(parseISO('2015-01-01')),\n end: getTime(setSeconds(setMinutes(setHours(new UTCDate(), 23), 59), 59)),\n },\n ],\n },\n {\n titles: getTranslatedTitles('aggs.draft.restrictedDraftUsers'),\n fieldId: 'custom.restrictedDraftUsers',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n];\n\nexport const SEARCH_DOC_DRAFT_FULL_TEXT_FIELDS: EsFullTextSearchDefinition = [\n // finance fields\n () => 'doc.id',\n () => 'doc.reference',\n () => 'doc.tags',\n () => 'doc.lines.associations.tags',\n // administrative fields\n () => 'doc.tags',\n () => 'doc.associations.tags',\n // OrgSummary fields\n () => 'doc.organizationSummary.name',\n () => 'doc.organizationSummary.id',\n () => 'doc.organizationSummary.code',\n () => 'doc.organizationSummary.vatNumber',\n];\n\nexport const SEARCH_DOC_DRAFTS_MAPPINGS: EsDefinition = {\n name: 'document_drafts',\n nestedEsPaths: [],\n fields: {\n ...DOC_DRAFT_MAPPING_FIELDS,\n },\n};\n\nexport const SEARCH_DOC_DRAFTS_DEFINITION: SearchDefinition = {\n fields: {\n ...DOC_DRAFT_DEFINITION_FIELDS,\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"/","sources":["constants/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAStE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE/E,MAAM,6BAA6B,GAE/B;IACF,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,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AC1C,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAiB;IACtD,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE,EAAE;IACjB,MAAM,EAAE;QACN,GAAG,wBAAwB;KAC5B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAqB;IAC5D,MAAM,EAAE;QACN,GAAG,2BAA2B;KAC/B;CACF,CAAC","sourcesContent":["import { DEFAULT_EXACT_MATCH_BOOST } from '@bisondesk/commons/es';\nimport { getTranslatedTitles } from '@bisondesk/commons/translations';\nimport {\n EsAggregationsDefinition,\n EsDefinition,\n EsDefinitionField,\n EsFullTextSearchDefinition,\n SearchDefinition,\n SearchField,\n} from '@bisondesk/core-sdk/types/definitions';\nimport { DateGranularity, FieldTypes } from '@bisondesk/core-sdk/types/fields';\nimport { AggregationType } from '@bisondesk/core-sdk/types/search';\nimport { UTCDate } from '@date-fns/utc';\nimport { getTime, parseISO, setHours, setMinutes, setSeconds } from 'date-fns';\n\nconst BASE_DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n 'doc.id': {\n esMapping: { type: 'keyword', boost: DEFAULT_EXACT_MATCH_BOOST },\n },\n 'doc.status': {\n esMapping: { type: 'keyword' },\n },\n 'doc.documentType': {\n esMapping: { type: 'keyword' },\n },\n 'doc.category': {\n esMapping: { type: 'keyword' },\n },\n 'doc.branchId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.attachment': {\n esMapping: { type: 'object', enabled: false },\n },\n 'doc.createdAt': {\n esMapping: { type: 'date' },\n },\n 'doc.createdBy': {\n esMapping: { type: 'keyword' },\n },\n 'custom.stage': {\n esMapping: { type: 'keyword' },\n },\n 'custom.rejected': {\n esMapping: { type: 'boolean' },\n },\n 'custom.validationRulesStatus': {\n esMapping: { type: 'keyword' },\n },\n 'custom.businessValidationAt': {\n esMapping: { type: 'date' },\n },\n};\n\nconst FINANCE_DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n 'doc.type': {\n esMapping: { type: 'keyword' },\n },\n 'doc.subtype': {\n esMapping: { type: 'keyword' },\n },\n 'doc.reference': {\n esMapping: { type: 'keyword', boost: DEFAULT_EXACT_MATCH_BOOST },\n },\n 'doc.issueDate': {\n esMapping: { type: 'date', ignore_malformed: true },\n },\n 'doc.dueDate': {\n esMapping: { type: 'date', ignore_malformed: true },\n },\n\n 'doc.organizationSummary.name': {\n esMapping: { type: 'text' },\n },\n 'doc.organizationSummary.id': {\n esMapping: { type: 'keyword' },\n },\n 'doc.organizationSummary.code': {\n esMapping: { type: 'keyword' },\n },\n 'doc.organizationSummary.vatNumber': {\n esMapping: { type: 'text' },\n },\n\n 'doc.lines.associations.businessEntityId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.lines.associations.recordId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.lines.associations.title': {\n esMapping: { type: 'text' },\n },\n 'doc.lines.associations.description': {\n esMapping: { type: 'text' },\n },\n 'doc.lines.associations.tags': {\n esMapping: { type: 'keyword' },\n },\n 'doc.invoiceId': {\n esMapping: { type: 'keyword' },\n },\n 'custom.validators': {\n esMapping: { type: 'keyword' },\n },\n 'custom.restrictedDraftUsers': {\n esMapping: { type: 'keyword' },\n },\n};\n\nconst ADMIN_DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n 'doc.tags': {\n esMapping: { type: 'text' },\n },\n 'doc.associations.businessEntityId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.associations.recordId': {\n esMapping: { type: 'keyword' },\n },\n 'doc.associations.title': {\n esMapping: { type: 'text' },\n },\n 'doc.associations.description': {\n esMapping: { type: 'text' },\n },\n 'doc.associations.tags': {\n esMapping: { type: 'keyword' },\n },\n};\n\nexport const DOC_DRAFT_MAPPING_FIELDS: {\n [fieldId: string]: EsDefinitionField;\n} = {\n ...BASE_DOC_DRAFT_MAPPING_FIELDS,\n ...FINANCE_DOC_DRAFT_MAPPING_FIELDS,\n ...ADMIN_DOC_DRAFT_MAPPING_FIELDS,\n};\n\nexport const DOC_DRAFT_DEFINITION_FIELDS: {\n [fieldId: string]: SearchField;\n} = {\n 'doc.id': {\n id: 'doc.id',\n titles: getTranslatedTitles('id'),\n type: FieldTypes.text,\n },\n 'custom.stage': {\n id: 'custom.stage',\n titles: getTranslatedTitles('aggs.draft.stage'),\n type: FieldTypes.text,\n },\n 'doc.documentType': {\n id: 'doc.documentType',\n titles: getTranslatedTitles('aggs.draft.documentType'),\n type: FieldTypes.text,\n },\n 'doc.branchId': {\n id: 'doc.branchId',\n titles: getTranslatedTitles('branch'),\n type: FieldTypes.text,\n },\n 'doc.createdAt': {\n id: 'doc.createdAt',\n titles: getTranslatedTitles('aggs.creationDate'),\n type: FieldTypes.date,\n meta: {\n granularity: DateGranularity.yearMonthDayTime,\n },\n },\n 'custom.validationRulesStatus': {\n id: 'custom.validationRulesStatus',\n titles: getTranslatedTitles('aggs.draft.validationRules'),\n type: FieldTypes.text,\n },\n 'doc.createdBy': {\n id: 'doc.createdBy',\n titles: getTranslatedTitles('aggs.createdBy'),\n type: FieldTypes.collaborator,\n },\n // Finance fields\n 'doc.subtype': {\n id: 'doc.subtype',\n titles: getTranslatedTitles('type'),\n type: FieldTypes.text,\n },\n 'custom.rejected': {\n id: 'custom.rejected',\n titles: getTranslatedTitles('aggs.draft.rejected'),\n type: FieldTypes.checkbox,\n },\n 'custom.restrictedDraftUsers': {\n id: 'custom.restrictedDraftUsers',\n titles: getTranslatedTitles('agg.drafts.restrictedDraftUsers'),\n type: FieldTypes.text,\n },\n};\n\nexport const getSearchDocumentDraftsAggs = (): EsAggregationsDefinition => [\n {\n titles: getTranslatedTitles('aggs.draft.stage'),\n fieldId: 'custom.stage',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.draft.documentType'),\n fieldId: 'doc.documentType',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('type'),\n fieldId: 'doc.subtype',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.draft.rejected'),\n fieldId: 'custom.rejected',\n fieldType: FieldTypes.checkbox,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.draft.validationRules'),\n fieldId: 'custom.validationRulesStatus',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n {\n titles: getTranslatedTitles('aggs.creationDate'),\n fieldId: 'doc.createdAt',\n step: 1,\n type: AggregationType.range,\n ranges: [\n {\n start: getTime(parseISO('2015-01-01')),\n end: getTime(setSeconds(setMinutes(setHours(new UTCDate(), 23), 59), 59)),\n },\n ],\n },\n {\n titles: getTranslatedTitles('aggs.draft.restrictedDraftUsers'),\n fieldId: 'custom.restrictedDraftUsers',\n fieldType: FieldTypes.text,\n type: AggregationType.term,\n orderBy: 'count',\n },\n];\n\nexport const SEARCH_DOC_DRAFT_FULL_TEXT_FIELDS: EsFullTextSearchDefinition = [\n // finance fields\n () => 'doc.id',\n () => 'doc.reference',\n () => 'doc.tags',\n () => 'doc.lines.associations.tags',\n // administrative fields\n () => 'doc.tags',\n () => 'doc.associations.tags',\n // OrgSummary fields\n () => 'doc.organizationSummary.name',\n () => 'doc.organizationSummary.id',\n () => 'doc.organizationSummary.code',\n () => 'doc.organizationSummary.vatNumber',\n];\n\nexport const SEARCH_DOC_DRAFTS_MAPPINGS: EsDefinition = {\n name: 'document_drafts',\n nestedEsPaths: [],\n fields: {\n ...DOC_DRAFT_MAPPING_FIELDS,\n },\n};\n\nexport const SEARCH_DOC_DRAFTS_DEFINITION: SearchDefinition = {\n fields: {\n ...DOC_DRAFT_DEFINITION_FIELDS,\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-categories.d.ts","sourceRoot":"/","sources":["types/document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MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,SAAS,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-categories.js","sourceRoot":"/","sources":["types/document-categories.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,mDAAqB,CAAA;IACrB,iDAAmB,CAAA;AACrB,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AAED,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,yDAAiC,CAAA;IACjC,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import { TransactionType } from '@bisondesk/commons-sdk/types';\nimport { ValidationRulesConfigs } from './rules.js';\n\nexport enum DocumentCategoryVisibility {\n Standard = 'standard',\n Private = 'private',\n}\n\nexport enum DocumentCategoryType {\n Administrative = 'administrative',\n Finance = 'finance',\n}\n\ntype BaseDocumentCategory = {\n createdAt: string;\n branchId: string;\n id: string;\n type: DocumentCategoryType;\n title: string;\n};\n\nexport type AdministrativeDocumentCategory = BaseDocumentCategory & {\n type: DocumentCategoryType.Administrative;\n subtype: 'generic' | 'deal';\n validators?: undefined;\n};\n\nexport type FinanceDocumentCategory = BaseDocumentCategory & {\n type: DocumentCategoryType.Finance;\n journal: string;\n visibility: DocumentCategoryVisibility;\n transactionType: TransactionType;\n validators?: string[];\n bankAccounts?: string[];\n};\n\nexport type DocumentCategory = AdministrativeDocumentCategory | FinanceDocumentCategory;\n\nexport type NewDocumentCategory = (\n | Omit<FinanceDocumentCategory, 'id' | 'createdAt'>\n | Omit<AdministrativeDocumentCategory, 'id' | 'createdAt'>\n) & {\n createdAt?: undefined;\n id?: undefined;\n};\n\nexport type FinanceDocumentLineCategory = {\n createdAt: string;\n branchId: string;\n categoryId: string;\n costCenterId?: string;\n id: string;\n title: string;\n description: string;\n associationMandatory: boolean;\n glAccount: string;\n externalId?: string;\n\n isVehicleCategory?: boolean;\n validationRulesConfigs?: ValidationRulesConfigs;\n};\n\nexport type NewFinanceDocumentLineCategory = Omit<FinanceDocumentLineCategory, 'id' | 'createdAt'>;\n\ntype BaseCostCenter = {\n branchId: string;\n name: string;\n accountingCode?: string;\n};\n\nexport type CostCenter = BaseCostCenter & {\n createdAt: string;\n createdBy: string;\n id: string;\n};\n\nexport type NewCostCenter = BaseCostCenter & {\n createdAt?: undefined;\n createdBy?: string;\n id?: undefined;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"document-categories.js","sourceRoot":"/","sources":["types/document-categories.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,mDAAqB,CAAA;IACrB,iDAAmB,CAAA;AACrB,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AAED,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,yDAAiC,CAAA;IACjC,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import { TransactionType } from '@bisondesk/commons-sdk/types';\nimport { ValidationRulesConfigs } from './rules.js';\n\nexport enum DocumentCategoryVisibility {\n Standard = 'standard',\n Private = 'private',\n}\n\nexport enum DocumentCategoryType {\n Administrative = 'administrative',\n Finance = 'finance',\n}\n\ntype BaseDocumentCategory = {\n createdAt: string;\n branchId: string;\n id: string;\n type: DocumentCategoryType;\n title: string;\n};\n\nexport type AdministrativeDocumentCategory = BaseDocumentCategory & {\n type: DocumentCategoryType.Administrative;\n subtype: 'generic' | 'deal';\n validators?: undefined;\n};\n\nexport type FinanceDocumentCategory = BaseDocumentCategory & {\n type: DocumentCategoryType.Finance;\n journal: string;\n visibility: DocumentCategoryVisibility;\n transactionType: TransactionType;\n validators?: string[];\n bankAccounts?: string[];\n};\n\nexport type DocumentCategory = AdministrativeDocumentCategory | FinanceDocumentCategory;\n\nexport type NewDocumentCategory = (\n | Omit<FinanceDocumentCategory, 'id' | 'createdAt'>\n | Omit<AdministrativeDocumentCategory, 'id' | 'createdAt'>\n) & {\n createdAt?: undefined;\n id?: undefined;\n};\n\nexport type FinanceDocumentLineCategory = {\n createdAt: string;\n branchId: string;\n categoryId: string;\n costCenterId?: string;\n id: string;\n title: string;\n description: string;\n associationMandatory: boolean;\n glAccount: string;\n externalId?: string;\n defaultVatCodeId?: string;\n\n isVehicleCategory?: boolean;\n validationRulesConfigs?: ValidationRulesConfigs;\n};\n\nexport type NewFinanceDocumentLineCategory = Omit<FinanceDocumentLineCategory, 'id' | 'createdAt'>;\n\ntype BaseCostCenter = {\n branchId: string;\n name: string;\n accountingCode?: string;\n};\n\nexport type CostCenter = BaseCostCenter & {\n createdAt: string;\n createdBy: string;\n id: string;\n};\n\nexport type NewCostCenter = BaseCostCenter & {\n createdAt?: undefined;\n createdBy?: string;\n id?: undefined;\n};\n"]}
|
package/lib/types/search.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"/","sources":["types/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,gBA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AAqB,CAAA;IACrB,gDAAuB,CAAA;AACzB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,8CAAyB,CAAA;IACzB,kCAAa,CAAA;IACb,gCAAW,CAAA;AACb,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["import { BusinessEntityIds } from '@bisondesk/commons-sdk/constants';\nimport { SearchRequest } from '@bisondesk/commons-sdk/search';\nimport { PaginatedRequest, SearchPermissions } from '@bisondesk/commons-sdk/types';\nimport { Organization } from '@bisondesk/core-sdk/types/crm';\nimport { PublicSearchDefinition } from '@bisondesk/core-sdk/types/definitions';\nimport { FinanceBooking } from './booking.js';\nimport {\n AdministrativeDocument,\n DocumentDraft,\n DocumentType,\n DraftProcessStage,\n FinanceDocType,\n FinanceDocument,\n} from './documents.js';\n\nexport type SearchDocumentVehicleRef = {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n};\n\nexport type InputSearchFinanceDocument = SearchFinanceDocument & {\n permissions: SearchPermissions;\n};\n\nexport type InputSearchAdministrativeDocument = SearchAdministrativeDocument;\n\nexport type DocsSearchDefinitions = {\n searchFinanceDoc: PublicSearchDefinition;\n};\n\nexport type AdministrativeDocsSearchDefinitions = {\n searchAdministrativeDoc: PublicSearchDefinition;\n};\n\nexport enum FinanceDocumentSource {\n HyperDMS = 'HyperDMS',\n Bisondesk = 'Bisondesk',\n}\n\nexport enum AutoValidatedInfo {\n Business = 'business',\n Accounting = 'accounting',\n None = 'none',\n All = 'all',\n}\n\nexport type SearchFinanceDocument = {\n permissions: SearchPermissions;\n org?: Organization;\n doc: FinanceDocument;\n booking?: FinanceBooking;\n vehicle?: SearchDocumentVehicleRef[];\n custom: {\n autoValidated?: AutoValidatedInfo[];\n isBooked: boolean;\n inStorecove?: boolean;\n source: FinanceDocumentSource;\n };\n};\n\nexport type SearchAdministrativeDocument = {\n doc: AdministrativeDocument;\n custom: {\n categorySubtype: 'generic' | 'deal';\n };\n};\n\nexport type RelatedDocumentsRequest = {\n businessEntityId: BusinessEntityIds;\n recordId: string;\n docTypes?: DocumentType[];\n financeDocType?: FinanceDocType;\n subtype?: 'generic' | 'deal';\n} & PaginatedRequest;\n\nexport type SearchDocumentDraftDefinitions = {\n document: PublicSearchDefinition;\n};\n\nexport type SearchDocumentDraft = {\n doc: DocumentDraft;\n permissions: SearchPermissions;\n custom: {\n stage: DraftProcessStage;\n rejected?: boolean;\n validators?: string[];\n restrictedDraftUsers?: string[];\n validationRulesStatus?: ('passed' | 'failed' | 'skipped')[];\n };\n};\n\nexport type CheckDraftDuplicatesRequest = {\n draftId: string;\n reference: string;\n};\n\nexport type ReindexDraftEvent = {\n id: string;\n tenantId: string;\n};\n\nexport type NextAvailableDraftsRequest = {\n draftId: string;\n createdAt: string;\n searchRequest: SearchRequest;\n};\n\nexport type NextAvailableDraftsResponse = {\n prev: string | undefined;\n next: string | undefined;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"/","sources":["types/search.ts"],"names":[],"mappings":"AAmCA,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,gDAAuB,CAAA;AACzB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,8CAAyB,CAAA;IACzB,kCAAa,CAAA;IACb,gCAAW,CAAA;AACb,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["import { BusinessEntityIds } from '@bisondesk/commons-sdk/constants';\nimport { SearchRequest } from '@bisondesk/commons-sdk/search';\nimport { PaginatedRequest, SearchPermissions } from '@bisondesk/commons-sdk/types';\nimport { Organization } from '@bisondesk/core-sdk/types/crm';\nimport { PublicSearchDefinition } from '@bisondesk/core-sdk/types/definitions';\nimport { FinanceBooking } from './booking.js';\nimport {\n AdministrativeDocument,\n DocumentDraft,\n DocumentType,\n DraftProcessStage,\n FinanceDocType,\n FinanceDocument,\n} from './documents.js';\n\nexport type SearchDocumentVehicleRef = {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n};\n\nexport type InputSearchFinanceDocument = SearchFinanceDocument & {\n permissions: SearchPermissions;\n};\n\nexport type InputSearchAdministrativeDocument = SearchAdministrativeDocument;\n\nexport type DocsSearchDefinitions = {\n searchFinanceDoc: PublicSearchDefinition;\n};\n\nexport type AdministrativeDocsSearchDefinitions = {\n searchAdministrativeDoc: PublicSearchDefinition;\n};\n\nexport enum FinanceDocumentSource {\n HyperDMS = 'HyperDMS',\n Bisondesk = 'Bisondesk',\n}\n\nexport enum AutoValidatedInfo {\n Business = 'business',\n Accounting = 'accounting',\n None = 'none',\n All = 'all',\n}\n\nexport type SearchFinanceDocument = {\n permissions: SearchPermissions;\n org?: Organization;\n doc: FinanceDocument;\n booking?: FinanceBooking;\n vehicle?: SearchDocumentVehicleRef[];\n custom: {\n autoValidated?: AutoValidatedInfo[];\n isBooked: boolean;\n inStorecove?: boolean;\n source: FinanceDocumentSource;\n };\n};\n\nexport type SearchAdministrativeDocument = {\n doc: AdministrativeDocument;\n custom: {\n categorySubtype: 'generic' | 'deal';\n };\n};\n\nexport type RelatedDocumentsRequest = {\n businessEntityId: BusinessEntityIds;\n recordId: string;\n docTypes?: DocumentType[];\n financeDocType?: FinanceDocType;\n subtype?: 'generic' | 'deal';\n} & PaginatedRequest;\n\nexport type SearchDocumentDraftDefinitions = {\n document: PublicSearchDefinition;\n};\n\nexport type SearchDocumentDraft = {\n doc: DocumentDraft;\n permissions: SearchPermissions;\n custom: {\n stage: DraftProcessStage;\n rejected?: boolean;\n validators?: string[];\n restrictedDraftUsers?: string[];\n validationRulesStatus?: ('passed' | 'failed' | 'skipped')[];\n businessValidationAt?: string;\n };\n};\n\nexport type CheckDraftDuplicatesRequest = {\n draftId: string;\n reference: string;\n};\n\nexport type ReindexDraftEvent = {\n id: string;\n tenantId: string;\n};\n\nexport type NextAvailableDraftsRequest = {\n draftId: string;\n createdAt: string;\n searchRequest: SearchRequest;\n};\n\nexport type NextAvailableDraftsResponse = {\n prev: string | undefined;\n next: string | undefined;\n};\n"]}
|
package/package.json
CHANGED
package/src/constants/search.ts
CHANGED