@d19n/youfibre-odin-sdk 2.0.376 → 2.0.378

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.
@@ -422,6 +422,7 @@ var CaseCategory;
422
422
  * - `AMEND_MY_ORDER` - Amend my Order
423
423
  * - `AREA_AVAILABILITY_QUERY` - Area Availability Query
424
424
  * - `BAD_CSAT` - Bad CSAT
425
+ * - `BILLING` - Billing
425
426
  * - `CANCEL_APPOINTMENT` - Cancel Appointment
426
427
  * - `CHANGE_CONTACT_DETAILS` - Change contact details
427
428
  * - `CHURN_REQUEST` - Churn Request
@@ -431,9 +432,8 @@ var CaseCategory;
431
432
  * - `COMPLAINT` - Complaint
432
433
  * - `CONTRACT_BUYOUT` - Contract Buyout
433
434
  * - `COPY_OF_INVOICE` - Copy of Invoice
434
- * - `CUSTOMER_DEVICE_ISSUE` - Customer Device Issue
435
- * - `DATA_SUBJECT_ACCESS_REQUEST` - Data Subject Access Request
436
- * - ... and 45 more
435
+ * - `CS_ESCALATIONS` - CS Escalations
436
+ * - ... and 51 more
437
437
  */
438
438
  var CaseSubCategory;
439
439
  (function (CaseSubCategory) {
@@ -441,6 +441,7 @@ var CaseSubCategory;
441
441
  CaseSubCategory["AMEND_MY_ORDER"] = "AMEND_MY_ORDER";
442
442
  CaseSubCategory["AREA_AVAILABILITY_QUERY"] = "AREA_AVAILABILITY_QUERY";
443
443
  CaseSubCategory["BAD_CSAT"] = "BAD_CSAT";
444
+ CaseSubCategory["BILLING"] = "BILLING";
444
445
  CaseSubCategory["CANCEL_APPOINTMENT"] = "CANCEL_APPOINTMENT";
445
446
  CaseSubCategory["CHANGE_CONTACT_DETAILS"] = "CHANGE_CONTACT_DETAILS";
446
447
  CaseSubCategory["CHURN_REQUEST"] = "CHURN_REQUEST";
@@ -450,6 +451,7 @@ var CaseSubCategory;
450
451
  CaseSubCategory["COMPLAINT"] = "COMPLAINT";
451
452
  CaseSubCategory["CONTRACT_BUYOUT"] = "CONTRACT_BUYOUT";
452
453
  CaseSubCategory["COPY_OF_INVOICE"] = "COPY_OF_INVOICE";
454
+ CaseSubCategory["CS_ESCALATIONS"] = "CS_ESCALATIONS";
453
455
  CaseSubCategory["CUSTOMER_DEVICE_ISSUE"] = "CUSTOMER_DEVICE_ISSUE";
454
456
  CaseSubCategory["DATA_SUBJECT_ACCESS_REQUEST"] = "DATA_SUBJECT_ACCESS_REQUEST";
455
457
  CaseSubCategory["DIRECT_DEBIT"] = "DIRECT_DEBIT";
@@ -457,8 +459,10 @@ var CaseSubCategory;
457
459
  CaseSubCategory["EQUIPMENT_RETURN_REFUND"] = "EQUIPMENT_RETURN_REFUND";
458
460
  CaseSubCategory["ESCALATED_COMPLAINT"] = "ESCALATED_COMPLAINT";
459
461
  CaseSubCategory["ETF_CUSTOMER_LEAVING_YF"] = "ETF_CUSTOMER_LEAVING";
462
+ CaseSubCategory["FORMAL_COMPLAINTS"] = "FORMAL_COMPLAINTS";
460
463
  CaseSubCategory["FRUSTRATION_OUTREACH"] = "FRUSTRATION_OUTREACH";
461
464
  CaseSubCategory["GDPR_DATA_BREACH"] = "GDPR_DATA_BREACH";
465
+ CaseSubCategory["HOME_MOVES"] = "HOME_MOVES";
462
466
  CaseSubCategory["INACTIVE_CHAT_NO_CUSTOMER_RESPONSE"] = "INACTIVE_CHAT_NO_CUSTOMER_RESPONSE";
463
467
  CaseSubCategory["INSTALL_APPOINTMENT"] = "INSTALL_APPOINTMENT";
464
468
  CaseSubCategory["INSTALL_REMEDIATION_QUERY"] = "INSTALL_REMEDIATION_QUERY";
@@ -488,6 +492,8 @@ var CaseSubCategory;
488
492
  CaseSubCategory["RECONTRACT_UPGRADE"] = "RECONTRACT_UPGRADE";
489
493
  CaseSubCategory["REFERRAL"] = "REFERRAL";
490
494
  CaseSubCategory["RETENTIONS"] = "RETENTIONS";
495
+ CaseSubCategory["SALES"] = "SALES";
496
+ CaseSubCategory["SALES_CBO"] = "SALES_CBO";
491
497
  CaseSubCategory["SERVICE_VISIT"] = "SERVICE_VISIT";
492
498
  CaseSubCategory["SPAM"] = "SPAM";
493
499
  CaseSubCategory["SPEED_HARD_WIRED"] = "SPEED_HARD_WIRED";
@@ -296,7 +296,7 @@ export declare enum ChangeReasonOwner {
296
296
  * - `ENGINEER_UNABLE_TO_RESOLVE` - Engineer unable to resolve
297
297
  * - `HEALTH_AND_SAFETY_CONCERN_CUSTOMER_PREMISE` - Health and safety concern - customer premise
298
298
  * - `INCORRECT_DATE_BOOKED` - Incorrect date booked
299
- * - ... and 14 more
299
+ * - ... and 15 more
300
300
  */
301
301
  export declare enum ChangeReasonRescheduleReason {
302
302
  ADDITIONAL_WORK_REQ_APPROVAL_NEEDED = "ADDITIONAL_WORKS_REQUIRED_APPROVAL_NEEDED",
@@ -322,6 +322,7 @@ export declare enum ChangeReasonRescheduleReason {
322
322
  SCHEDULE_CHANGED = "SCHEDULE_CHANGED",
323
323
  SCHEDULE_CONTRACTOR_CHANGED = "SCHEDULE_CONTRACTOR_CHANGED",
324
324
  SERVICE_VISIT_NO_LONGER_REQUIRED = "SERVICE_VISIT_NO_LONGER_REQUIRED",
325
+ START_ORDER_SERVICE_VISIT_RESCHEDULED = "START_ORDER_SERVICE_VISIT_RESCHEDULED",
325
326
  SUPPLIER_RESCHEDULED_APPOINTMENT = "SUPPLIER_RESCHEDULED_APPOINTMENT",
326
327
  TIME_BLOCK_CHANGED = "TIME_BLOCK_CHANGED",
327
328
  TLOS_PRIORITISED_NOT_ATTENDED = "TLOS_PRIORITISED_NOT_ATTENDED",
@@ -302,7 +302,7 @@ var ChangeReasonOwner;
302
302
  * - `ENGINEER_UNABLE_TO_RESOLVE` - Engineer unable to resolve
303
303
  * - `HEALTH_AND_SAFETY_CONCERN_CUSTOMER_PREMISE` - Health and safety concern - customer premise
304
304
  * - `INCORRECT_DATE_BOOKED` - Incorrect date booked
305
- * - ... and 14 more
305
+ * - ... and 15 more
306
306
  */
307
307
  var ChangeReasonRescheduleReason;
308
308
  (function (ChangeReasonRescheduleReason) {
@@ -329,6 +329,7 @@ var ChangeReasonRescheduleReason;
329
329
  ChangeReasonRescheduleReason["SCHEDULE_CHANGED"] = "SCHEDULE_CHANGED";
330
330
  ChangeReasonRescheduleReason["SCHEDULE_CONTRACTOR_CHANGED"] = "SCHEDULE_CONTRACTOR_CHANGED";
331
331
  ChangeReasonRescheduleReason["SERVICE_VISIT_NO_LONGER_REQUIRED"] = "SERVICE_VISIT_NO_LONGER_REQUIRED";
332
+ ChangeReasonRescheduleReason["START_ORDER_SERVICE_VISIT_RESCHEDULED"] = "START_ORDER_SERVICE_VISIT_RESCHEDULED";
332
333
  ChangeReasonRescheduleReason["SUPPLIER_RESCHEDULED_APPOINTMENT"] = "SUPPLIER_RESCHEDULED_APPOINTMENT";
333
334
  ChangeReasonRescheduleReason["TIME_BLOCK_CHANGED"] = "TIME_BLOCK_CHANGED";
334
335
  ChangeReasonRescheduleReason["TLOS_PRIORITISED_NOT_ATTENDED"] = "TLOS_PRIORITISED_NOT_ATTENDED";
@@ -14,6 +14,7 @@ import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/co
14
14
  import { FileProperties } from './File';
15
15
  import { DocumentProcessingProperties } from './DocumentProcessing';
16
16
  import { ContractBuyOutProperties } from './ContractBuyOut';
17
+ import { DocumentValueProperties } from './DocumentValue';
17
18
  /**
18
19
  * Available types for Document records
19
20
  */
@@ -46,13 +47,15 @@ export declare enum DocumentEntityTypes {
46
47
  * - `HTML`
47
48
  * - `IMAGE` - Image
48
49
  * - `PDF`
50
+ * - `WORD` - Word
49
51
  */
50
52
  export declare enum DocumentFormat {
51
53
  EMAIL = "EMAIL",
52
54
  FORM_WITH_PHOTOS = "FORM_WITH_PHOTOS",
53
55
  HTML = "HTML",
54
56
  IMAGE = "IMAGE",
55
- PDF = "PDF"
57
+ PDF = "PDF",
58
+ WORD = "WORD"
56
59
  }
57
60
  /**
58
61
  * Valid values for Document.SubmittedVia
@@ -82,6 +85,8 @@ export declare enum DocumentSubmittedVia {
82
85
  *
83
86
  * @remarks Available options:
84
87
  * - `CATALOGUED` - Catalogued
88
+ * - `CLASSIFIED` - Classified
89
+ * - `CLASSIFY_FAILED` - Classify failed
85
90
  * - `DELETED` - Deleted
86
91
  * - `DESCRIBED` - Described
87
92
  * - `DESCRIBE_FAILED` - Describe failed
@@ -95,6 +100,8 @@ export declare enum DocumentSubmittedVia {
95
100
  */
96
101
  export declare enum DocumentCatalogStatus {
97
102
  CATALOGUED = "CATALOGUED",
103
+ CLASSIFIED = "CLASSIFIED",
104
+ CLASSIFY_FAILED = "CLASSIFY_FAILED",
98
105
  DELETED = "DELETED",
99
106
  DESCRIBED = "DESCRIBED",
100
107
  DESCRIBE_FAILED = "DESCRIBE_FAILED",
@@ -191,7 +198,13 @@ export declare enum DocumentPropertyKeys {
191
198
  /** The document's folder in the org files bucket (document-intelligence/<documentId>/), holding sections, fields, vectors and chat history. */
192
199
  FolderKey = "FolderKey",
193
200
  /** How many sections the read step produced; equals the number of vectors. */
194
- SectionCount = "SectionCount"
201
+ SectionCount = "SectionCount",
202
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this. */
203
+ ClassifiedType = "ClassifiedType",
204
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this. */
205
+ ClassifiedSubType = "ClassifiedSubType",
206
+ /** How sure the model was of its classification, 0 to 1. */
207
+ ClassificationConfidence = "ClassificationConfidence"
195
208
  }
196
209
  /**
197
210
  * Properties for Document records
@@ -401,6 +414,24 @@ export interface DocumentProperties {
401
414
  * @default
402
415
  */
403
416
  SectionCount: number;
417
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
418
+ *
419
+ * @type {TEXT}
420
+ * @default
421
+ */
422
+ ClassifiedType: string;
423
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
424
+ *
425
+ * @type {TEXT}
426
+ * @default
427
+ */
428
+ ClassifiedSubType: string;
429
+ /** How sure the model was of its classification, 0 to 1.
430
+ *
431
+ * @type {NUMBER}
432
+ * @default
433
+ */
434
+ ClassificationConfidence: number;
404
435
  }
405
436
  /**
406
437
  * Properties for CONTRACT Document records
@@ -610,6 +641,24 @@ export interface ContractDocumentProperties {
610
641
  * @default
611
642
  */
612
643
  SectionCount: number;
644
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
645
+ *
646
+ * @type {TEXT}
647
+ * @default
648
+ */
649
+ ClassifiedType: string;
650
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
651
+ *
652
+ * @type {TEXT}
653
+ * @default
654
+ */
655
+ ClassifiedSubType: string;
656
+ /** How sure the model was of its classification, 0 to 1.
657
+ *
658
+ * @type {NUMBER}
659
+ * @default
660
+ */
661
+ ClassificationConfidence: number;
613
662
  }
614
663
  /**
615
664
  * Properties for CONTRACT_BUYOUT Document records
@@ -819,6 +868,24 @@ export interface ContractBuyoutDocumentProperties {
819
868
  * @default
820
869
  */
821
870
  SectionCount: number;
871
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
872
+ *
873
+ * @type {TEXT}
874
+ * @default
875
+ */
876
+ ClassifiedType: string;
877
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
878
+ *
879
+ * @type {TEXT}
880
+ * @default
881
+ */
882
+ ClassifiedSubType: string;
883
+ /** How sure the model was of its classification, 0 to 1.
884
+ *
885
+ * @type {NUMBER}
886
+ * @default
887
+ */
888
+ ClassificationConfidence: number;
822
889
  }
823
890
  /**
824
891
  * Properties for CORPORATE_DOCUMENT Document records
@@ -1028,6 +1095,24 @@ export interface CorporateDocumentDocumentProperties {
1028
1095
  * @default
1029
1096
  */
1030
1097
  SectionCount: number;
1098
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
1099
+ *
1100
+ * @type {TEXT}
1101
+ * @default
1102
+ */
1103
+ ClassifiedType: string;
1104
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
1105
+ *
1106
+ * @type {TEXT}
1107
+ * @default
1108
+ */
1109
+ ClassifiedSubType: string;
1110
+ /** How sure the model was of its classification, 0 to 1.
1111
+ *
1112
+ * @type {NUMBER}
1113
+ * @default
1114
+ */
1115
+ ClassificationConfidence: number;
1031
1116
  }
1032
1117
  /**
1033
1118
  * Properties for EMAIL_ATTACHMENT Document records
@@ -1237,6 +1322,24 @@ export interface EmailAttachmentDocumentProperties {
1237
1322
  * @default
1238
1323
  */
1239
1324
  SectionCount: number;
1325
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
1326
+ *
1327
+ * @type {TEXT}
1328
+ * @default
1329
+ */
1330
+ ClassifiedType: string;
1331
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
1332
+ *
1333
+ * @type {TEXT}
1334
+ * @default
1335
+ */
1336
+ ClassifiedSubType: string;
1337
+ /** How sure the model was of its classification, 0 to 1.
1338
+ *
1339
+ * @type {NUMBER}
1340
+ * @default
1341
+ */
1342
+ ClassificationConfidence: number;
1240
1343
  }
1241
1344
  /**
1242
1345
  * Properties for INVOICE Document records
@@ -1446,6 +1549,24 @@ export interface InvoiceDocumentProperties {
1446
1549
  * @default
1447
1550
  */
1448
1551
  SectionCount: number;
1552
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
1553
+ *
1554
+ * @type {TEXT}
1555
+ * @default
1556
+ */
1557
+ ClassifiedType: string;
1558
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
1559
+ *
1560
+ * @type {TEXT}
1561
+ * @default
1562
+ */
1563
+ ClassifiedSubType: string;
1564
+ /** How sure the model was of its classification, 0 to 1.
1565
+ *
1566
+ * @type {NUMBER}
1567
+ * @default
1568
+ */
1569
+ ClassificationConfidence: number;
1449
1570
  }
1450
1571
  /**
1451
1572
  * Properties for OTHER Document records
@@ -1655,6 +1776,24 @@ export interface OtherDocumentProperties {
1655
1776
  * @default
1656
1777
  */
1657
1778
  SectionCount: number;
1779
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
1780
+ *
1781
+ * @type {TEXT}
1782
+ * @default
1783
+ */
1784
+ ClassifiedType: string;
1785
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
1786
+ *
1787
+ * @type {TEXT}
1788
+ * @default
1789
+ */
1790
+ ClassifiedSubType: string;
1791
+ /** How sure the model was of its classification, 0 to 1.
1792
+ *
1793
+ * @type {NUMBER}
1794
+ * @default
1795
+ */
1796
+ ClassificationConfidence: number;
1658
1797
  }
1659
1798
  /**
1660
1799
  * Properties for OUTCOME_FORM Document records
@@ -1864,6 +2003,24 @@ export interface OutcomeFormDocumentProperties {
1864
2003
  * @default
1865
2004
  */
1866
2005
  SectionCount: number;
2006
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this.
2007
+ *
2008
+ * @type {TEXT}
2009
+ * @default
2010
+ */
2011
+ ClassifiedType: string;
2012
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this.
2013
+ *
2014
+ * @type {TEXT}
2015
+ * @default
2016
+ */
2017
+ ClassifiedSubType: string;
2018
+ /** How sure the model was of its classification, 0 to 1.
2019
+ *
2020
+ * @type {NUMBER}
2021
+ * @default
2022
+ */
2023
+ ClassificationConfidence: number;
1867
2024
  }
1868
2025
  /**
1869
2026
  * Document entity from AiModule
@@ -1887,6 +2044,8 @@ export declare class Document extends OdinRecord<DocumentProperties> {
1887
2044
  DocumentProcessing: OdinLink<LinkedOdinRecord<DocumentProcessingProperties>>;
1888
2045
  /** Linked ContractBuyOut records (ContractBuyOut__Document) */
1889
2046
  ContractBuyOut: OdinLink<LinkedOdinRecord<ContractBuyOutProperties>>;
2047
+ /** Linked DocumentValue records (Document__DocumentValue) */
2048
+ DocumentValue: OdinLink<LinkedOdinRecord<DocumentValueProperties>>;
1890
2049
  }
1891
2050
  /**
1892
2051
  * RabbitMQ routing keys for Document events
@@ -1954,3 +2113,7 @@ export declare const ROUTING_KEY_LINK_DOCUMENT_FILE_DELETED = "AiModule.Document
1954
2113
  export declare const ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_CREATED = "AiModule.Document.DocumentProcessing.SubDbRecordAssociationCreated";
1955
2114
  /** Event: Document__DocumentProcessing link deleted */
1956
2115
  export declare const ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_DELETED = "AiModule.Document.DocumentProcessing.SubDbRecordAssociationDeleted";
2116
+ /** Event: Document__DocumentValue link created */
2117
+ export declare const ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_VALUE_CREATED = "AiModule.Document.DocumentValue.SubDbRecordAssociationCreated";
2118
+ /** Event: Document__DocumentValue link deleted */
2119
+ export declare const ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_VALUE_DELETED = "AiModule.Document.DocumentValue.SubDbRecordAssociationDeleted";
@@ -12,7 +12,7 @@
12
12
  * Generated from Odin schema definition
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_DELETED = exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_CREATED = exports.ROUTING_KEY_LINK_DOCUMENT_FILE_DELETED = exports.ROUTING_KEY_LINK_DOCUMENT_FILE_CREATED = exports.ROUTING_KEY_DOCUMENT_OUTCOME_FORM_DELETED = exports.ROUTING_KEY_DOCUMENT_OUTCOME_FORM_UPDATED = exports.ROUTING_KEY_DOCUMENT_OUTCOME_FORM_CREATED = exports.ROUTING_KEY_DOCUMENT_OTHER_DELETED = exports.ROUTING_KEY_DOCUMENT_OTHER_UPDATED = exports.ROUTING_KEY_DOCUMENT_OTHER_CREATED = exports.ROUTING_KEY_DOCUMENT_INVOICE_DELETED = exports.ROUTING_KEY_DOCUMENT_INVOICE_UPDATED = exports.ROUTING_KEY_DOCUMENT_INVOICE_CREATED = exports.ROUTING_KEY_DOCUMENT_EMAIL_ATTACHMENT_DELETED = exports.ROUTING_KEY_DOCUMENT_EMAIL_ATTACHMENT_UPDATED = exports.ROUTING_KEY_DOCUMENT_EMAIL_ATTACHMENT_CREATED = exports.ROUTING_KEY_DOCUMENT_DEFAULT_DELETED = exports.ROUTING_KEY_DOCUMENT_DEFAULT_UPDATED = exports.ROUTING_KEY_DOCUMENT_DEFAULT_CREATED = exports.ROUTING_KEY_DOCUMENT_CORPORATE_DOCUMENT_DELETED = exports.ROUTING_KEY_DOCUMENT_CORPORATE_DOCUMENT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CORPORATE_DOCUMENT_CREATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_BUYOUT_DELETED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_BUYOUT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_BUYOUT_CREATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_DELETED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_CREATED = exports.ROUTING_KEY_DOCUMENT_DELETED = exports.ROUTING_KEY_DOCUMENT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CREATED = exports.Document = exports.DocumentPropertyKeys = exports.DocumentFieldsReviewState = exports.DocumentCatalogStatus = exports.DocumentSubmittedVia = exports.DocumentFormat = exports.DocumentEntityTypes = void 0;
15
+ exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_VALUE_DELETED = exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_VALUE_CREATED = exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_DELETED = exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_CREATED = exports.ROUTING_KEY_LINK_DOCUMENT_FILE_DELETED = exports.ROUTING_KEY_LINK_DOCUMENT_FILE_CREATED = exports.ROUTING_KEY_DOCUMENT_OUTCOME_FORM_DELETED = exports.ROUTING_KEY_DOCUMENT_OUTCOME_FORM_UPDATED = exports.ROUTING_KEY_DOCUMENT_OUTCOME_FORM_CREATED = exports.ROUTING_KEY_DOCUMENT_OTHER_DELETED = exports.ROUTING_KEY_DOCUMENT_OTHER_UPDATED = exports.ROUTING_KEY_DOCUMENT_OTHER_CREATED = exports.ROUTING_KEY_DOCUMENT_INVOICE_DELETED = exports.ROUTING_KEY_DOCUMENT_INVOICE_UPDATED = exports.ROUTING_KEY_DOCUMENT_INVOICE_CREATED = exports.ROUTING_KEY_DOCUMENT_EMAIL_ATTACHMENT_DELETED = exports.ROUTING_KEY_DOCUMENT_EMAIL_ATTACHMENT_UPDATED = exports.ROUTING_KEY_DOCUMENT_EMAIL_ATTACHMENT_CREATED = exports.ROUTING_KEY_DOCUMENT_DEFAULT_DELETED = exports.ROUTING_KEY_DOCUMENT_DEFAULT_UPDATED = exports.ROUTING_KEY_DOCUMENT_DEFAULT_CREATED = exports.ROUTING_KEY_DOCUMENT_CORPORATE_DOCUMENT_DELETED = exports.ROUTING_KEY_DOCUMENT_CORPORATE_DOCUMENT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CORPORATE_DOCUMENT_CREATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_BUYOUT_DELETED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_BUYOUT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_BUYOUT_CREATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_DELETED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CONTRACT_CREATED = exports.ROUTING_KEY_DOCUMENT_DELETED = exports.ROUTING_KEY_DOCUMENT_UPDATED = exports.ROUTING_KEY_DOCUMENT_CREATED = exports.Document = exports.DocumentPropertyKeys = exports.DocumentFieldsReviewState = exports.DocumentCatalogStatus = exports.DocumentSubmittedVia = exports.DocumentFormat = exports.DocumentEntityTypes = void 0;
16
16
  const core_1 = require("@d19n/odin-types/dist/core");
17
17
  /**
18
18
  * Available types for Document records
@@ -47,6 +47,7 @@ var DocumentEntityTypes;
47
47
  * - `HTML`
48
48
  * - `IMAGE` - Image
49
49
  * - `PDF`
50
+ * - `WORD` - Word
50
51
  */
51
52
  var DocumentFormat;
52
53
  (function (DocumentFormat) {
@@ -55,6 +56,7 @@ var DocumentFormat;
55
56
  DocumentFormat["HTML"] = "HTML";
56
57
  DocumentFormat["IMAGE"] = "IMAGE";
57
58
  DocumentFormat["PDF"] = "PDF";
59
+ DocumentFormat["WORD"] = "WORD";
58
60
  })(DocumentFormat = exports.DocumentFormat || (exports.DocumentFormat = {}));
59
61
  /**
60
62
  * Valid values for Document.SubmittedVia
@@ -85,6 +87,8 @@ var DocumentSubmittedVia;
85
87
  *
86
88
  * @remarks Available options:
87
89
  * - `CATALOGUED` - Catalogued
90
+ * - `CLASSIFIED` - Classified
91
+ * - `CLASSIFY_FAILED` - Classify failed
88
92
  * - `DELETED` - Deleted
89
93
  * - `DESCRIBED` - Described
90
94
  * - `DESCRIBE_FAILED` - Describe failed
@@ -99,6 +103,8 @@ var DocumentSubmittedVia;
99
103
  var DocumentCatalogStatus;
100
104
  (function (DocumentCatalogStatus) {
101
105
  DocumentCatalogStatus["CATALOGUED"] = "CATALOGUED";
106
+ DocumentCatalogStatus["CLASSIFIED"] = "CLASSIFIED";
107
+ DocumentCatalogStatus["CLASSIFY_FAILED"] = "CLASSIFY_FAILED";
102
108
  DocumentCatalogStatus["DELETED"] = "DELETED";
103
109
  DocumentCatalogStatus["DESCRIBED"] = "DESCRIBED";
104
110
  DocumentCatalogStatus["DESCRIBE_FAILED"] = "DESCRIBE_FAILED";
@@ -198,6 +204,12 @@ var DocumentPropertyKeys;
198
204
  DocumentPropertyKeys["FolderKey"] = "FolderKey";
199
205
  /** How many sections the read step produced; equals the number of vectors. */
200
206
  DocumentPropertyKeys["SectionCount"] = "SectionCount";
207
+ /** The document type the model chose from the registry (CONTRACT, CORPORATE_DOCUMENT). The uploader's choice is the record type and is never changed by this. */
208
+ DocumentPropertyKeys["ClassifiedType"] = "ClassifiedType";
209
+ /** The sub-type the model chose from the registry (NDA, SUPPLY_AGREEMENT, ARTICLES_OF_ASSOCIATION, OTHER). The uploader's choice is SubType and is never changed by this. */
210
+ DocumentPropertyKeys["ClassifiedSubType"] = "ClassifiedSubType";
211
+ /** How sure the model was of its classification, 0 to 1. */
212
+ DocumentPropertyKeys["ClassificationConfidence"] = "ClassificationConfidence";
201
213
  })(DocumentPropertyKeys = exports.DocumentPropertyKeys || (exports.DocumentPropertyKeys = {}));
202
214
  /**
203
215
  * Document entity from AiModule
@@ -282,3 +294,7 @@ exports.ROUTING_KEY_LINK_DOCUMENT_FILE_DELETED = 'AiModule.Document.File.SubDbRe
282
294
  exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_CREATED = 'AiModule.Document.DocumentProcessing.SubDbRecordAssociationCreated';
283
295
  /** Event: Document__DocumentProcessing link deleted */
284
296
  exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_PROCESSING_DELETED = 'AiModule.Document.DocumentProcessing.SubDbRecordAssociationDeleted';
297
+ /** Event: Document__DocumentValue link created */
298
+ exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_VALUE_CREATED = 'AiModule.Document.DocumentValue.SubDbRecordAssociationCreated';
299
+ /** Event: Document__DocumentValue link deleted */
300
+ exports.ROUTING_KEY_LINK_DOCUMENT_DOCUMENT_VALUE_DELETED = 'AiModule.Document.DocumentValue.SubDbRecordAssociationDeleted';
@@ -28,6 +28,7 @@ export declare enum DocumentProcessingEntityTypes {
28
28
  * @remarks Available options:
29
29
  * - `CBO_FINAL_BILL_CHECK` - CBO final bill check
30
30
  * - `CHAT` - Chat
31
+ * - `CLASSIFY` - Classify
31
32
  * - `DESCRIBE` - Describe
32
33
  * - `EMBED` - Embed
33
34
  * - `EXTRACT_FIELDS` - Extract fields
@@ -38,6 +39,7 @@ export declare enum DocumentProcessingEntityTypes {
38
39
  export declare enum DocumentProcessingUseCase {
39
40
  CBO_FINAL_BILL_CHECK = "CBO_FINAL_BILL_CHECK",
40
41
  CHAT = "CHAT",
42
+ CLASSIFY = "CLASSIFY",
41
43
  DESCRIBE = "DESCRIBE",
42
44
  EMBED = "EMBED",
43
45
  EXTRACT_FIELDS = "EXTRACT_FIELDS",
@@ -30,6 +30,7 @@ var DocumentProcessingEntityTypes;
30
30
  * @remarks Available options:
31
31
  * - `CBO_FINAL_BILL_CHECK` - CBO final bill check
32
32
  * - `CHAT` - Chat
33
+ * - `CLASSIFY` - Classify
33
34
  * - `DESCRIBE` - Describe
34
35
  * - `EMBED` - Embed
35
36
  * - `EXTRACT_FIELDS` - Extract fields
@@ -41,6 +42,7 @@ var DocumentProcessingUseCase;
41
42
  (function (DocumentProcessingUseCase) {
42
43
  DocumentProcessingUseCase["CBO_FINAL_BILL_CHECK"] = "CBO_FINAL_BILL_CHECK";
43
44
  DocumentProcessingUseCase["CHAT"] = "CHAT";
45
+ DocumentProcessingUseCase["CLASSIFY"] = "CLASSIFY";
44
46
  DocumentProcessingUseCase["DESCRIBE"] = "DESCRIBE";
45
47
  DocumentProcessingUseCase["EMBED"] = "EMBED";
46
48
  DocumentProcessingUseCase["EXTRACT_FIELDS"] = "EXTRACT_FIELDS";
@@ -0,0 +1,213 @@
1
+ /**
2
+ * DocumentValue Entity Definition
3
+ *
4
+ * One extracted value of a document: the field, the value, where it came from (section, quote, page), the model's confidence, and its review state. Linked to the Document.
5
+ *
6
+ * @module AiModule
7
+ * @entity DocumentValue
8
+ * @schemaId 96afdaae-fb15-4a46-bb1c-67ef9509e02d
9
+ *
10
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
11
+ * Generated from Odin schema definition
12
+ */
13
+ import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
14
+ import { DocumentProperties } from './Document';
15
+ /**
16
+ * Available types for DocumentValue records
17
+ */
18
+ export declare enum DocumentValueEntityTypes {
19
+ /** This is the default record type */
20
+ DEFAULT = "DEFAULT"
21
+ }
22
+ /**
23
+ * Valid values for DocumentValue.Kind
24
+ *
25
+ * The type of the value, from the field list.
26
+ *
27
+ * @remarks Available options:
28
+ * - `BOOLEAN` - Boolean
29
+ * - `DATE` - Date
30
+ * - `MONEY` - Money
31
+ * - `NUMBER` - Number
32
+ * - `PARTY` - Party
33
+ * - `TEXT` - Text
34
+ */
35
+ export declare enum DocumentValueKind {
36
+ BOOLEAN = "BOOLEAN",
37
+ DATE = "DATE",
38
+ MONEY = "MONEY",
39
+ NUMBER = "NUMBER",
40
+ PARTY = "PARTY",
41
+ TEXT = "TEXT"
42
+ }
43
+ /**
44
+ * Valid values for DocumentValue.ReviewState
45
+ *
46
+ * Where the value stands with a person: needs review, confirmed, corrected, or not found in the document.
47
+ *
48
+ * @remarks Available options:
49
+ * - `CONFIRMED` - Confirmed
50
+ * - `CORRECTED` - Corrected
51
+ * - `NEEDS_REVIEW` - Needs review
52
+ * - `NOT_FOUND` - Not found
53
+ */
54
+ export declare enum DocumentValueReviewState {
55
+ CONFIRMED = "CONFIRMED",
56
+ CORRECTED = "CORRECTED",
57
+ NEEDS_REVIEW = "NEEDS_REVIEW",
58
+ NOT_FOUND = "NOT_FOUND"
59
+ }
60
+ /**
61
+ * Property keys for DocumentValue
62
+ * Use these constants instead of string literals for type safety
63
+ */
64
+ export declare enum DocumentValuePropertyKeys {
65
+ /** The field name from the field list for the document type, e.g. GoverningLaw, PaymentDays. */
66
+ Field = "Field",
67
+ /** The type of the value, from the field list. */
68
+ Kind = "Kind",
69
+ /** The value as text, after any correction. Blank when the document does not state it (see ReviewState NOT_FOUND). */
70
+ Value = "Value",
71
+ /** What the model extracted, kept beside a correction. Equal to Value until a person corrects it. */
72
+ ModelValue = "ModelValue",
73
+ /** The field list the value was extracted with, e.g. NDA. */
74
+ SchemaName = "SchemaName",
75
+ /** The version of that field list. */
76
+ SchemaVersion = "SchemaVersion",
77
+ /** How sure the model was, 0 to 1. */
78
+ Confidence = "Confidence",
79
+ /** The id of the section in sections.json the value was read from. */
80
+ SectionId = "SectionId",
81
+ /** The passage, copied word for word from that section, the value rests on; checked against the stored text before the row is written. */
82
+ Quote = "Quote",
83
+ /** The page of the section. */
84
+ Page = "Page",
85
+ /** Where the value stands with a person: needs review, confirmed, corrected, or not found in the document. */
86
+ ReviewState = "ReviewState",
87
+ /** The user who confirmed or corrected the value. */
88
+ ReviewedBy = "ReviewedBy",
89
+ /** When the value was confirmed or corrected. */
90
+ ReviewedAt = "ReviewedAt"
91
+ }
92
+ /**
93
+ * Properties for DocumentValue records
94
+ *
95
+ * @see AiModule:DocumentValue
96
+ */
97
+ export interface DocumentValueProperties {
98
+ /** The field name from the field list for the document type, e.g. GoverningLaw, PaymentDays.
99
+ *
100
+ * @type {TEXT}
101
+ * @default
102
+ */
103
+ Field: string;
104
+ /** The type of the value, from the field list.
105
+ *
106
+ * @type {ENUM}
107
+ * @default
108
+ * @enum {DocumentValueKind}
109
+ */
110
+ Kind: DocumentValueKind;
111
+ /** The value as text, after any correction. Blank when the document does not state it (see ReviewState NOT_FOUND).
112
+ *
113
+ * @type {TEXT}
114
+ * @default
115
+ */
116
+ Value: string;
117
+ /** What the model extracted, kept beside a correction. Equal to Value until a person corrects it.
118
+ *
119
+ * @type {TEXT}
120
+ * @default
121
+ */
122
+ ModelValue: string;
123
+ /** The field list the value was extracted with, e.g. NDA.
124
+ *
125
+ * @type {TEXT}
126
+ * @default
127
+ */
128
+ SchemaName: string;
129
+ /** The version of that field list.
130
+ *
131
+ * @type {NUMBER}
132
+ * @default
133
+ */
134
+ SchemaVersion: number;
135
+ /** How sure the model was, 0 to 1.
136
+ *
137
+ * @type {NUMBER}
138
+ * @default
139
+ */
140
+ Confidence: number;
141
+ /** The id of the section in sections.json the value was read from.
142
+ *
143
+ * @type {TEXT}
144
+ * @default
145
+ */
146
+ SectionId: string;
147
+ /** The passage, copied word for word from that section, the value rests on; checked against the stored text before the row is written.
148
+ *
149
+ * @type {TEXT_LONG}
150
+ * @default
151
+ */
152
+ Quote: string;
153
+ /** The page of the section.
154
+ *
155
+ * @type {NUMBER}
156
+ * @default
157
+ */
158
+ Page: number;
159
+ /** Where the value stands with a person: needs review, confirmed, corrected, or not found in the document.
160
+ *
161
+ * @type {ENUM}
162
+ * @default NEEDS_REVIEW
163
+ * @enum {DocumentValueReviewState}
164
+ */
165
+ ReviewState: DocumentValueReviewState;
166
+ /** The user who confirmed or corrected the value.
167
+ *
168
+ * @type {TEXT}
169
+ * @default
170
+ */
171
+ ReviewedBy: string;
172
+ /** When the value was confirmed or corrected.
173
+ *
174
+ * @type {DATE_TIME}
175
+ * @default
176
+ */
177
+ ReviewedAt: string;
178
+ }
179
+ /**
180
+ * DocumentValue entity from AiModule
181
+ *
182
+ * One extracted value of a document: the field, the value, where it came from (section, quote, page), the model's confidence, and its review state. Linked to the Document.
183
+ *
184
+ * @module AiModule
185
+ * @entity DocumentValue
186
+ * @schemaId 96afdaae-fb15-4a46-bb1c-67ef9509e02d
187
+ * @recordPrefix DOV
188
+ * @capabilities searchable, updateable, undeletable, triggerable
189
+ */
190
+ export declare class DocumentValue extends OdinRecord<DocumentValueProperties> {
191
+ entity: 'AiModule:DocumentValue';
192
+ type: DocumentValueEntityTypes;
193
+ schemaId: '96afdaae-fb15-4a46-bb1c-67ef9509e02d';
194
+ properties: DocumentValueProperties;
195
+ /** Linked Document records (Document__DocumentValue) */
196
+ Document: OdinLink<LinkedOdinRecord<DocumentProperties>>;
197
+ }
198
+ /**
199
+ * RabbitMQ routing keys for DocumentValue events
200
+ */
201
+ export declare const ROUTING_KEY_DOCUMENT_VALUE_CREATED = "AiModule.DocumentValue.SubDbRecordCreated";
202
+ export declare const ROUTING_KEY_DOCUMENT_VALUE_UPDATED = "AiModule.DocumentValue.SubDbRecordUpdated";
203
+ export declare const ROUTING_KEY_DOCUMENT_VALUE_DELETED = "AiModule.DocumentValue.SubDbRecordDeleted";
204
+ /**
205
+ * Type-specific routing keys for DocumentValue events
206
+ * Subscribe to these for events on specific entity types only
207
+ */
208
+ /** This is the default record type created */
209
+ export declare const ROUTING_KEY_DOCUMENT_VALUE_DEFAULT_CREATED = "AiModule.DocumentValue.DEFAULT.SubDbRecordCreated";
210
+ /** This is the default record type updated */
211
+ export declare const ROUTING_KEY_DOCUMENT_VALUE_DEFAULT_UPDATED = "AiModule.DocumentValue.DEFAULT.SubDbRecordUpdated";
212
+ /** This is the default record type deleted */
213
+ export declare const ROUTING_KEY_DOCUMENT_VALUE_DEFAULT_DELETED = "AiModule.DocumentValue.DEFAULT.SubDbRecordDeleted";