@d19n/youfibre-odin-sdk 2.0.341 → 2.0.343
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/README.md +25 -2
- package/dist/EntityRegistry.d.ts +4 -0
- package/dist/EntityRegistry.js +4 -0
- package/dist/OdinApiClient.d.ts +8 -0
- package/dist/OdinApiClient.js +16 -0
- package/dist/OdinDbClient.d.ts +8 -0
- package/dist/OdinDbClient.js +16 -0
- package/dist/accessors-v2/DocumentAccessor.d.ts +112 -0
- package/dist/accessors-v2/DocumentAccessor.js +191 -0
- package/dist/accessors-v2/DocumentProcessingAccessor.d.ts +112 -0
- package/dist/accessors-v2/DocumentProcessingAccessor.js +191 -0
- package/dist/accessors-v2/index.d.ts +2 -0
- package/dist/accessors-v2/index.js +7 -3
- package/dist/actions-v2/CreateAiRouteRequestDto.d.ts +1 -1
- package/dist/actions-v2/CreateChurnRequestDto.d.ts +2 -0
- package/dist/actions-v2/CreateChurnRequestDto.js +2 -0
- package/dist/actions-v2/CreateDocumentDto.d.ts +235 -0
- package/dist/actions-v2/CreateDocumentDto.js +57 -0
- package/dist/actions-v2/CreateDocumentProcessingDto.d.ts +192 -0
- package/dist/actions-v2/CreateDocumentProcessingDto.js +57 -0
- package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +9 -17
- package/dist/actions-v2/UpdateDocumentDto.d.ts +236 -0
- package/dist/actions-v2/UpdateDocumentDto.js +59 -0
- package/dist/actions-v2/UpdateMessageReadByCustomerDto.d.ts +72 -0
- package/dist/actions-v2/UpdateMessageReadByCustomerDto.js +56 -0
- package/dist/api-sdk-v2/ContractBuyOutApi.d.ts +2 -0
- package/dist/api-sdk-v2/ContractBuyOutApi.js +6 -0
- package/dist/api-sdk-v2/DocumentApi.d.ts +52 -0
- package/dist/api-sdk-v2/DocumentApi.js +167 -0
- package/dist/api-sdk-v2/DocumentProcessingApi.d.ts +50 -0
- package/dist/api-sdk-v2/DocumentProcessingApi.js +161 -0
- package/dist/api-sdk-v2/EquipmentReturnApi.d.ts +45 -0
- package/dist/api-sdk-v2/EquipmentReturnApi.js +151 -0
- package/dist/api-sdk-v2/EquipmentReturnItemApi.d.ts +45 -0
- package/dist/api-sdk-v2/EquipmentReturnItemApi.js +151 -0
- package/dist/api-sdk-v2/FileApi.d.ts +4 -0
- package/dist/api-sdk-v2/FileApi.js +12 -0
- package/dist/db-accessors-v2/DocumentDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/DocumentDbAccessor.js +265 -0
- package/dist/db-accessors-v2/DocumentProcessingDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/DocumentProcessingDbAccessor.js +265 -0
- package/dist/db-accessors-v2/index.d.ts +2 -0
- package/dist/db-accessors-v2/index.js +7 -3
- package/dist/db-sdk-v2/ContractBuyOutDb.d.ts +2 -0
- package/dist/db-sdk-v2/ContractBuyOutDb.js +6 -0
- package/dist/db-sdk-v2/DocumentDb.d.ts +124 -0
- package/dist/db-sdk-v2/DocumentDb.js +216 -0
- package/dist/db-sdk-v2/DocumentProcessingDb.d.ts +122 -0
- package/dist/db-sdk-v2/DocumentProcessingDb.js +210 -0
- package/dist/db-sdk-v2/EquipmentReturnDb.d.ts +117 -0
- package/dist/db-sdk-v2/EquipmentReturnDb.js +200 -0
- package/dist/db-sdk-v2/EquipmentReturnItemDb.d.ts +117 -0
- package/dist/db-sdk-v2/EquipmentReturnItemDb.js +200 -0
- package/dist/db-sdk-v2/FileDb.d.ts +4 -0
- package/dist/db-sdk-v2/FileDb.js +12 -0
- package/dist/entities-v2/AiRouteRequest.d.ts +23 -11
- package/dist/entities-v2/AiRouteRequest.js +15 -3
- package/dist/entities-v2/ContractBuyOut.d.ts +7 -0
- package/dist/entities-v2/ContractBuyOut.js +5 -1
- package/dist/entities-v2/CustomerDeviceOnt.d.ts +1 -0
- package/dist/entities-v2/CustomerDeviceOnt.js +1 -0
- package/dist/entities-v2/Document.d.ts +1145 -0
- package/dist/entities-v2/Document.js +220 -0
- package/dist/entities-v2/DocumentProcessing.d.ts +272 -0
- package/dist/entities-v2/DocumentProcessing.js +156 -0
- package/dist/entities-v2/EquipmentReturn.d.ts +66 -0
- package/dist/entities-v2/EquipmentReturn.js +64 -0
- package/dist/entities-v2/EquipmentReturnItem.d.ts +66 -0
- package/dist/entities-v2/EquipmentReturnItem.js +64 -0
- package/dist/entities-v2/File.d.ts +81 -1
- package/dist/entities-v2/File.js +9 -1
- package/dist/entities-v2/Message.d.ts +27 -1
- package/dist/entities-v2/Message.js +2 -0
- package/dist/entities-v2/Order.d.ts +16 -8
- package/dist/entities-v2/Order.js +4 -2
- package/dist/entities-v2/YfStockCount.d.ts +197 -1
- package/dist/entities-v2/YfStockCount.js +28 -0
- package/dist/records-v2/ContractBuyOutRecord.d.ts +20 -0
- package/dist/records-v2/ContractBuyOutRecord.js +33 -0
- package/dist/records-v2/DocumentProcessingRecord.d.ts +227 -0
- package/dist/records-v2/DocumentProcessingRecord.js +315 -0
- package/dist/records-v2/DocumentRecord.d.ts +355 -0
- package/dist/records-v2/DocumentRecord.js +468 -0
- package/dist/records-v2/FileRecord.d.ts +59 -3
- package/dist/records-v2/FileRecord.js +83 -1
- package/dist/records-v2/MessageRecord.d.ts +28 -0
- package/dist/records-v2/MessageRecord.js +37 -0
- package/dist/records-v2/index.d.ts +2 -0
- package/dist/records-v2/index.js +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ await workOrder.completeWorkOrder({ ... });
|
|
|
124
124
|
|
|
125
125
|
## Entities
|
|
126
126
|
|
|
127
|
-
This SDK includes **
|
|
127
|
+
This SDK includes **196** entities across **13** modules.
|
|
128
128
|
|
|
129
129
|
### CrmModule
|
|
130
130
|
|
|
@@ -256,6 +256,8 @@ This SDK includes **192** entities across **12** modules.
|
|
|
256
256
|
| **Calendar** | Calendar Entity Definition | DEFAULT |
|
|
257
257
|
| **ChangeReason** | ChangeReason Entity Definition | SA_CANCEL, SA_DELAY, SA_INFORM... |
|
|
258
258
|
| **Engineer** | Engineer Entity Definition | DEFAULT |
|
|
259
|
+
| **EquipmentReturn** | EquipmentReturn Entity Definition | DEFAULT |
|
|
260
|
+
| **EquipmentReturnItem** | EquipmentReturnItem Entity Definition | DEFAULT |
|
|
259
261
|
| **FieldServiceDispatchedProduct** | FieldServiceDispatchedProduct Entity Definition | CPE_ROUTER, MESH |
|
|
260
262
|
| **FieldServiceProduct** | FieldServiceProduct Entity Definition | CPE_ROUTER, MESH, MISC... |
|
|
261
263
|
| **InternalInstallAudit** | InternalInstallAudit Entity Definition | OUTCOME_FORM |
|
|
@@ -357,6 +359,13 @@ This SDK includes **192** entities across **12** modules.
|
|
|
357
359
|
| **Restriction** | Restriction Entity Definition | DEFAULT |
|
|
358
360
|
| **Vendor** | Vendor Entity Definition | DEFAULT |
|
|
359
361
|
|
|
362
|
+
### AiModule
|
|
363
|
+
|
|
364
|
+
| Entity | Description | Types |
|
|
365
|
+
|--------|-------------|-------|
|
|
366
|
+
| **Document** | Document Entity Definition | CONTRACT_BUYOUT, EMAIL_ATTACHMENT, INVOICE... |
|
|
367
|
+
| **DocumentProcessing** | DocumentProcessing Entity Definition | DEFAULT |
|
|
368
|
+
|
|
360
369
|
### ProjectModule
|
|
361
370
|
|
|
362
371
|
| Entity | Description | Types |
|
|
@@ -380,7 +389,7 @@ This SDK includes **192** entities across **12** modules.
|
|
|
380
389
|
|
|
381
390
|
## Actions
|
|
382
391
|
|
|
383
|
-
This SDK includes **
|
|
392
|
+
This SDK includes **902** actions.
|
|
384
393
|
|
|
385
394
|
### Action Types
|
|
386
395
|
|
|
@@ -1596,6 +1605,7 @@ This SDK includes **898** actions.
|
|
|
1596
1605
|
| `CreateMessage` | CREATE | k1.t-hEOJjsDb.NotificationModule.Message.Create.CreateMessage |
|
|
1597
1606
|
| `CreateNudgeMessage` | CREATE | k1.t-hEOJjsDb.NotificationModule.Message.Create.CreateNudgeMessage |
|
|
1598
1607
|
| `SyncMessageStateFromTwilio` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Message.Update.SyncMessageStateFromTwilio |
|
|
1608
|
+
| `UpdateMessageReadByCustomer` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Message.Update.UpdateMessageReadByCustomer |
|
|
1599
1609
|
|
|
1600
1610
|
#### Config
|
|
1601
1611
|
|
|
@@ -1649,6 +1659,19 @@ This SDK includes **898** actions.
|
|
|
1649
1659
|
| `CreateCustomerDeviceOnt` | CREATE | k1.t-hEOJjsDb.ServiceModule.CustomerDeviceOnt.Create.CreateCustomerDeviceOnt |
|
|
1650
1660
|
| `UpdateCustomerDeviceOnt` | UPDATE | k1.t-hEOJjsDb.ServiceModule.CustomerDeviceOnt.Update.UpdateCustomerDeviceONT |
|
|
1651
1661
|
|
|
1662
|
+
#### Document
|
|
1663
|
+
|
|
1664
|
+
| Action | Type | Event |
|
|
1665
|
+
|--------|------|-------|
|
|
1666
|
+
| `CreateDocument` | CREATE | k1.t-hEOJjsDb.AiModule.Document.Create.CreateDocument |
|
|
1667
|
+
| `UpdateDocument` | UPDATE | k1.t-hEOJjsDb.AiModule.Document.Update.UpdateDocument |
|
|
1668
|
+
|
|
1669
|
+
#### DocumentProcessing
|
|
1670
|
+
|
|
1671
|
+
| Action | Type | Event |
|
|
1672
|
+
|--------|------|-------|
|
|
1673
|
+
| `CreateDocumentProcessing` | CREATE | k1.t-hEOJjsDb.AiModule.DocumentProcessing.Create.CreateDocumentProcessing |
|
|
1674
|
+
|
|
1652
1675
|
#### EmailSender
|
|
1653
1676
|
|
|
1654
1677
|
| Action | Type | Event |
|
package/dist/EntityRegistry.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ import { CustomerDeviceRouterAccessor } from './accessors-v2/CustomerDeviceRoute
|
|
|
47
47
|
import { CustomerPhonePortingAccessor } from './accessors-v2/CustomerPhonePortingAccessor';
|
|
48
48
|
import { DataIssueAccessor } from './accessors-v2/DataIssueAccessor';
|
|
49
49
|
import { DiscountAccessor } from './accessors-v2/DiscountAccessor';
|
|
50
|
+
import { DocumentAccessor } from './accessors-v2/DocumentAccessor';
|
|
51
|
+
import { DocumentProcessingAccessor } from './accessors-v2/DocumentProcessingAccessor';
|
|
50
52
|
import { EmailAccessor } from './accessors-v2/EmailAccessor';
|
|
51
53
|
import { EmailSenderAccessor } from './accessors-v2/EmailSenderAccessor';
|
|
52
54
|
import { EmailTemplateAccessor } from './accessors-v2/EmailTemplateAccessor';
|
|
@@ -174,6 +176,8 @@ export declare const EntityRegistry: {
|
|
|
174
176
|
readonly CustomerPhonePorting: typeof CustomerPhonePortingAccessor;
|
|
175
177
|
readonly DataIssue: typeof DataIssueAccessor;
|
|
176
178
|
readonly Discount: typeof DiscountAccessor;
|
|
179
|
+
readonly Document: typeof DocumentAccessor;
|
|
180
|
+
readonly DocumentProcessing: typeof DocumentProcessingAccessor;
|
|
177
181
|
readonly Email: typeof EmailAccessor;
|
|
178
182
|
readonly EmailSender: typeof EmailSenderAccessor;
|
|
179
183
|
readonly EmailTemplate: typeof EmailTemplateAccessor;
|
package/dist/EntityRegistry.js
CHANGED
|
@@ -50,6 +50,8 @@ const CustomerDeviceRouterAccessor_1 = require("./accessors-v2/CustomerDeviceRou
|
|
|
50
50
|
const CustomerPhonePortingAccessor_1 = require("./accessors-v2/CustomerPhonePortingAccessor");
|
|
51
51
|
const DataIssueAccessor_1 = require("./accessors-v2/DataIssueAccessor");
|
|
52
52
|
const DiscountAccessor_1 = require("./accessors-v2/DiscountAccessor");
|
|
53
|
+
const DocumentAccessor_1 = require("./accessors-v2/DocumentAccessor");
|
|
54
|
+
const DocumentProcessingAccessor_1 = require("./accessors-v2/DocumentProcessingAccessor");
|
|
53
55
|
const EmailAccessor_1 = require("./accessors-v2/EmailAccessor");
|
|
54
56
|
const EmailSenderAccessor_1 = require("./accessors-v2/EmailSenderAccessor");
|
|
55
57
|
const EmailTemplateAccessor_1 = require("./accessors-v2/EmailTemplateAccessor");
|
|
@@ -177,6 +179,8 @@ exports.EntityRegistry = {
|
|
|
177
179
|
'CustomerPhonePorting': CustomerPhonePortingAccessor_1.CustomerPhonePortingAccessor,
|
|
178
180
|
'DataIssue': DataIssueAccessor_1.DataIssueAccessor,
|
|
179
181
|
'Discount': DiscountAccessor_1.DiscountAccessor,
|
|
182
|
+
'Document': DocumentAccessor_1.DocumentAccessor,
|
|
183
|
+
'DocumentProcessing': DocumentProcessingAccessor_1.DocumentProcessingAccessor,
|
|
180
184
|
'Email': EmailAccessor_1.EmailAccessor,
|
|
181
185
|
'EmailSender': EmailSenderAccessor_1.EmailSenderAccessor,
|
|
182
186
|
'EmailTemplate': EmailTemplateAccessor_1.EmailTemplateAccessor,
|
package/dist/OdinApiClient.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ import { CustomerDeviceRouterAccessor } from './accessors-v2/CustomerDeviceRoute
|
|
|
57
57
|
import { CustomerPhonePortingAccessor } from './accessors-v2/CustomerPhonePortingAccessor';
|
|
58
58
|
import { DataIssueAccessor } from './accessors-v2/DataIssueAccessor';
|
|
59
59
|
import { DiscountAccessor } from './accessors-v2/DiscountAccessor';
|
|
60
|
+
import { DocumentAccessor } from './accessors-v2/DocumentAccessor';
|
|
61
|
+
import { DocumentProcessingAccessor } from './accessors-v2/DocumentProcessingAccessor';
|
|
60
62
|
import { EmailAccessor } from './accessors-v2/EmailAccessor';
|
|
61
63
|
import { EmailSenderAccessor } from './accessors-v2/EmailSenderAccessor';
|
|
62
64
|
import { EmailTemplateAccessor } from './accessors-v2/EmailTemplateAccessor';
|
|
@@ -193,6 +195,8 @@ export declare class OdinApiClient {
|
|
|
193
195
|
private _customerPhonePortings?;
|
|
194
196
|
private _dataIssues?;
|
|
195
197
|
private _discounts?;
|
|
198
|
+
private _documents?;
|
|
199
|
+
private _documentProcessings?;
|
|
196
200
|
private _emails?;
|
|
197
201
|
private _emailSenders?;
|
|
198
202
|
private _emailTemplates?;
|
|
@@ -366,6 +370,10 @@ export declare class OdinApiClient {
|
|
|
366
370
|
get dataIssues(): DataIssueAccessor;
|
|
367
371
|
/** Access Discount records */
|
|
368
372
|
get discounts(): DiscountAccessor;
|
|
373
|
+
/** Access Document records */
|
|
374
|
+
get documents(): DocumentAccessor;
|
|
375
|
+
/** Access DocumentProcessing records */
|
|
376
|
+
get documentProcessings(): DocumentProcessingAccessor;
|
|
369
377
|
/** Access Email records */
|
|
370
378
|
get emails(): EmailAccessor;
|
|
371
379
|
/** Access EmailSender records */
|
package/dist/OdinApiClient.js
CHANGED
|
@@ -68,6 +68,8 @@ const CustomerDeviceRouterAccessor_1 = require("./accessors-v2/CustomerDeviceRou
|
|
|
68
68
|
const CustomerPhonePortingAccessor_1 = require("./accessors-v2/CustomerPhonePortingAccessor");
|
|
69
69
|
const DataIssueAccessor_1 = require("./accessors-v2/DataIssueAccessor");
|
|
70
70
|
const DiscountAccessor_1 = require("./accessors-v2/DiscountAccessor");
|
|
71
|
+
const DocumentAccessor_1 = require("./accessors-v2/DocumentAccessor");
|
|
72
|
+
const DocumentProcessingAccessor_1 = require("./accessors-v2/DocumentProcessingAccessor");
|
|
71
73
|
const EmailAccessor_1 = require("./accessors-v2/EmailAccessor");
|
|
72
74
|
const EmailSenderAccessor_1 = require("./accessors-v2/EmailSenderAccessor");
|
|
73
75
|
const EmailTemplateAccessor_1 = require("./accessors-v2/EmailTemplateAccessor");
|
|
@@ -438,6 +440,20 @@ class OdinApiClient {
|
|
|
438
440
|
}
|
|
439
441
|
return this._discounts;
|
|
440
442
|
}
|
|
443
|
+
/** Access Document records */
|
|
444
|
+
get documents() {
|
|
445
|
+
if (!this._documents) {
|
|
446
|
+
this._documents = new DocumentAccessor_1.DocumentAccessor(this._provider);
|
|
447
|
+
}
|
|
448
|
+
return this._documents;
|
|
449
|
+
}
|
|
450
|
+
/** Access DocumentProcessing records */
|
|
451
|
+
get documentProcessings() {
|
|
452
|
+
if (!this._documentProcessings) {
|
|
453
|
+
this._documentProcessings = new DocumentProcessingAccessor_1.DocumentProcessingAccessor(this._provider);
|
|
454
|
+
}
|
|
455
|
+
return this._documentProcessings;
|
|
456
|
+
}
|
|
441
457
|
/** Access Email records */
|
|
442
458
|
get emails() {
|
|
443
459
|
if (!this._emails) {
|
package/dist/OdinDbClient.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ import { CustomerDeviceRouterDbAccessor } from './db-accessors-v2/CustomerDevice
|
|
|
65
65
|
import { CustomerPhonePortingDbAccessor } from './db-accessors-v2/CustomerPhonePortingDbAccessor';
|
|
66
66
|
import { DataIssueDbAccessor } from './db-accessors-v2/DataIssueDbAccessor';
|
|
67
67
|
import { DiscountDbAccessor } from './db-accessors-v2/DiscountDbAccessor';
|
|
68
|
+
import { DocumentDbAccessor } from './db-accessors-v2/DocumentDbAccessor';
|
|
69
|
+
import { DocumentProcessingDbAccessor } from './db-accessors-v2/DocumentProcessingDbAccessor';
|
|
68
70
|
import { EmailDbAccessor } from './db-accessors-v2/EmailDbAccessor';
|
|
69
71
|
import { EmailSenderDbAccessor } from './db-accessors-v2/EmailSenderDbAccessor';
|
|
70
72
|
import { EmailTemplateDbAccessor } from './db-accessors-v2/EmailTemplateDbAccessor';
|
|
@@ -195,6 +197,8 @@ export declare class OdinDbClient {
|
|
|
195
197
|
private _customerPhonePortings?;
|
|
196
198
|
private _dataIssues?;
|
|
197
199
|
private _discounts?;
|
|
200
|
+
private _documents?;
|
|
201
|
+
private _documentProcessings?;
|
|
198
202
|
private _emails?;
|
|
199
203
|
private _emailSenders?;
|
|
200
204
|
private _emailTemplates?;
|
|
@@ -377,6 +381,10 @@ export declare class OdinDbClient {
|
|
|
377
381
|
get dataIssues(): DataIssueDbAccessor;
|
|
378
382
|
/** Access Discount records */
|
|
379
383
|
get discounts(): DiscountDbAccessor;
|
|
384
|
+
/** Access Document records */
|
|
385
|
+
get documents(): DocumentDbAccessor;
|
|
386
|
+
/** Access DocumentProcessing records */
|
|
387
|
+
get documentProcessings(): DocumentProcessingDbAccessor;
|
|
380
388
|
/** Access Email records */
|
|
381
389
|
get emails(): EmailDbAccessor;
|
|
382
390
|
/** Access EmailSender records */
|
package/dist/OdinDbClient.js
CHANGED
|
@@ -67,6 +67,8 @@ const CustomerDeviceRouterDbAccessor_1 = require("./db-accessors-v2/CustomerDevi
|
|
|
67
67
|
const CustomerPhonePortingDbAccessor_1 = require("./db-accessors-v2/CustomerPhonePortingDbAccessor");
|
|
68
68
|
const DataIssueDbAccessor_1 = require("./db-accessors-v2/DataIssueDbAccessor");
|
|
69
69
|
const DiscountDbAccessor_1 = require("./db-accessors-v2/DiscountDbAccessor");
|
|
70
|
+
const DocumentDbAccessor_1 = require("./db-accessors-v2/DocumentDbAccessor");
|
|
71
|
+
const DocumentProcessingDbAccessor_1 = require("./db-accessors-v2/DocumentProcessingDbAccessor");
|
|
70
72
|
const EmailDbAccessor_1 = require("./db-accessors-v2/EmailDbAccessor");
|
|
71
73
|
const EmailSenderDbAccessor_1 = require("./db-accessors-v2/EmailSenderDbAccessor");
|
|
72
74
|
const EmailTemplateDbAccessor_1 = require("./db-accessors-v2/EmailTemplateDbAccessor");
|
|
@@ -440,6 +442,20 @@ class OdinDbClient {
|
|
|
440
442
|
}
|
|
441
443
|
return this._discounts;
|
|
442
444
|
}
|
|
445
|
+
/** Access Document records */
|
|
446
|
+
get documents() {
|
|
447
|
+
if (!this._documents) {
|
|
448
|
+
this._documents = new DocumentDbAccessor_1.DocumentDbAccessor(this._principal, this._dbService, this._defaultOptions);
|
|
449
|
+
}
|
|
450
|
+
return this._documents;
|
|
451
|
+
}
|
|
452
|
+
/** Access DocumentProcessing records */
|
|
453
|
+
get documentProcessings() {
|
|
454
|
+
if (!this._documentProcessings) {
|
|
455
|
+
this._documentProcessings = new DocumentProcessingDbAccessor_1.DocumentProcessingDbAccessor(this._principal, this._dbService, this._defaultOptions);
|
|
456
|
+
}
|
|
457
|
+
return this._documentProcessings;
|
|
458
|
+
}
|
|
443
459
|
/** Access Email records */
|
|
444
460
|
get emails() {
|
|
445
461
|
if (!this._emails) {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to Document records via API.
|
|
5
|
+
* Returns wrapped records with typed action methods.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Get existing record
|
|
10
|
+
* const record = await accessor.get(id);
|
|
11
|
+
* await record.updateDocument({ ... });
|
|
12
|
+
*
|
|
13
|
+
* // Create new record
|
|
14
|
+
* const newRecord = accessor.new();
|
|
15
|
+
* await newRecord.createDocument({ ... });
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
19
|
+
*/
|
|
20
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
|
|
21
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
22
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
23
|
+
import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
|
|
24
|
+
import { DocumentProperties } from '../entities-v2/Document';
|
|
25
|
+
import { DocumentRecord } from '../records-v2/DocumentRecord';
|
|
26
|
+
/** List response with wrapped records */
|
|
27
|
+
export interface DocumentListResponse {
|
|
28
|
+
data: DocumentRecord[];
|
|
29
|
+
hasMore: boolean;
|
|
30
|
+
totalRecords: number;
|
|
31
|
+
}
|
|
32
|
+
/** Search response with wrapped records */
|
|
33
|
+
export interface DocumentSearchResponse {
|
|
34
|
+
records: DocumentRecord[];
|
|
35
|
+
totalRecords: number;
|
|
36
|
+
hasMore: boolean;
|
|
37
|
+
aggregations?: Record<string, any>;
|
|
38
|
+
}
|
|
39
|
+
export declare class DocumentAccessor {
|
|
40
|
+
private readonly _provider;
|
|
41
|
+
private readonly _moduleName;
|
|
42
|
+
private readonly _entityName;
|
|
43
|
+
constructor(provider: ApiProvider);
|
|
44
|
+
constructor(authParams: OauthParams);
|
|
45
|
+
constructor(authToken: string, host?: string);
|
|
46
|
+
get moduleName(): string;
|
|
47
|
+
get entityName(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Create a new empty Document record instance for create operations.
|
|
50
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
51
|
+
*
|
|
52
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
53
|
+
* @returns A new record wrapper with pre-generated ID
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* // Auto-generated ID
|
|
58
|
+
* const note = odinClient.notes.new();
|
|
59
|
+
* console.log(note.id); // UUID available immediately
|
|
60
|
+
*
|
|
61
|
+
* // Custom ID
|
|
62
|
+
* const order = odinClient.orders.new("custom-id-123");
|
|
63
|
+
*
|
|
64
|
+
* // Reference ID before save
|
|
65
|
+
* const account = odinClient.accounts.new();
|
|
66
|
+
* const contact = odinClient.contacts.new();
|
|
67
|
+
* await contact
|
|
68
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
69
|
+
* .createContact({ FirstName: "John" });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
new(id?: string): DocumentRecord;
|
|
73
|
+
/**
|
|
74
|
+
* Get a single Document record by ID
|
|
75
|
+
*/
|
|
76
|
+
get(id: string): Promise<DocumentRecord>;
|
|
77
|
+
/**
|
|
78
|
+
* Get multiple Document records by IDs
|
|
79
|
+
*/
|
|
80
|
+
getMany(ids: string[]): Promise<DocumentRecord[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Search Document records
|
|
83
|
+
*/
|
|
84
|
+
search(params: Partial<OdinSearchV2>): Promise<DocumentSearchResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Search all Document records with automatic pagination
|
|
87
|
+
*/
|
|
88
|
+
searchAll(params: Partial<OdinSearchV2>): Promise<DocumentRecord[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Async generator for paginating through all matching records.
|
|
91
|
+
* Yields batches of wrapped records.
|
|
92
|
+
*/
|
|
93
|
+
paginate(params: Partial<OdinSearchV2>): AsyncGenerator<DocumentRecord[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Create a fluent query builder for Document records
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const results = await accessor
|
|
100
|
+
* .query()
|
|
101
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
102
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
103
|
+
* .select('id', 'title', 'properties.*')
|
|
104
|
+
* .sortBy('createdAt', 'desc')
|
|
105
|
+
* .limit(100)
|
|
106
|
+
* .execute();
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
query(): QueryBuilder<DocumentProperties, DocumentRecord>;
|
|
110
|
+
/** Access the underlying ApiProvider */
|
|
111
|
+
get provider(): ApiProvider;
|
|
112
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Document Accessor
|
|
4
|
+
*
|
|
5
|
+
* Provides typed access to Document records via API.
|
|
6
|
+
* Returns wrapped records with typed action methods.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // Get existing record
|
|
11
|
+
* const record = await accessor.get(id);
|
|
12
|
+
* await record.updateDocument({ ... });
|
|
13
|
+
*
|
|
14
|
+
* // Create new record
|
|
15
|
+
* const newRecord = accessor.new();
|
|
16
|
+
* await newRecord.createDocument({ ... });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
20
|
+
*/
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
31
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
32
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
33
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
34
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
35
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
36
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
37
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
38
|
+
function fulfill(value) { resume("next", value); }
|
|
39
|
+
function reject(value) { resume("throw", value); }
|
|
40
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.DocumentAccessor = void 0;
|
|
44
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
45
|
+
const query_builder_1 = require("@d19n/odin-sdk-generator/dist/query-builder");
|
|
46
|
+
const DocumentRecord_1 = require("../records-v2/DocumentRecord");
|
|
47
|
+
class DocumentAccessor {
|
|
48
|
+
constructor(providerOrAuth, host) {
|
|
49
|
+
this._moduleName = 'AiModule';
|
|
50
|
+
this._entityName = 'Document';
|
|
51
|
+
if (providerOrAuth instanceof api_provider_1.ApiProvider) {
|
|
52
|
+
this._provider = providerOrAuth;
|
|
53
|
+
}
|
|
54
|
+
else if (typeof providerOrAuth === 'string') {
|
|
55
|
+
// Auth token provided
|
|
56
|
+
this._provider = new api_provider_1.ApiProvider(host ? { host } : undefined, providerOrAuth);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
// OauthParams provided
|
|
60
|
+
this._provider = new api_provider_1.ApiProvider(providerOrAuth);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
get moduleName() { return this._moduleName; }
|
|
64
|
+
get entityName() { return this._entityName; }
|
|
65
|
+
// ============================================
|
|
66
|
+
// RECORD CREATION
|
|
67
|
+
// ============================================
|
|
68
|
+
/**
|
|
69
|
+
* Create a new empty Document record instance for create operations.
|
|
70
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
71
|
+
*
|
|
72
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
73
|
+
* @returns A new record wrapper with pre-generated ID
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* // Auto-generated ID
|
|
78
|
+
* const note = odinClient.notes.new();
|
|
79
|
+
* console.log(note.id); // UUID available immediately
|
|
80
|
+
*
|
|
81
|
+
* // Custom ID
|
|
82
|
+
* const order = odinClient.orders.new("custom-id-123");
|
|
83
|
+
*
|
|
84
|
+
* // Reference ID before save
|
|
85
|
+
* const account = odinClient.accounts.new();
|
|
86
|
+
* const contact = odinClient.contacts.new();
|
|
87
|
+
* await contact
|
|
88
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
89
|
+
* .createContact({ FirstName: "John" });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
new(id) {
|
|
93
|
+
return new DocumentRecord_1.DocumentRecord(null, this._provider, id);
|
|
94
|
+
}
|
|
95
|
+
// ============================================
|
|
96
|
+
// RECORD RETRIEVAL
|
|
97
|
+
// ============================================
|
|
98
|
+
/**
|
|
99
|
+
* Get a single Document record by ID
|
|
100
|
+
*/
|
|
101
|
+
get(id) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const record = yield this._provider._getByPrimaryKey(this._moduleName, this._entityName, id);
|
|
104
|
+
return new DocumentRecord_1.DocumentRecord(record, this._provider);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get multiple Document records by IDs
|
|
109
|
+
*/
|
|
110
|
+
getMany(ids) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
if (ids.length === 0)
|
|
113
|
+
return [];
|
|
114
|
+
const records = yield this._provider._getManyByPrimaryKey(this._moduleName, this._entityName, ids);
|
|
115
|
+
return records.map((r) => new DocumentRecord_1.DocumentRecord(r, this._provider));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// ============================================
|
|
119
|
+
// SEARCH OPERATIONS
|
|
120
|
+
// ============================================
|
|
121
|
+
/**
|
|
122
|
+
* Search Document records
|
|
123
|
+
*/
|
|
124
|
+
search(params) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
const result = yield this._provider._searchRecords(this._moduleName, this._entityName, params);
|
|
127
|
+
return {
|
|
128
|
+
records: result.records.map((r) => new DocumentRecord_1.DocumentRecord(r, this._provider)),
|
|
129
|
+
totalRecords: result.totalRecords,
|
|
130
|
+
hasMore: result.hasMore,
|
|
131
|
+
aggregations: result.aggregations,
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Search all Document records with automatic pagination
|
|
137
|
+
*/
|
|
138
|
+
searchAll(params) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params);
|
|
141
|
+
return result.records.map((r) => new DocumentRecord_1.DocumentRecord(r, this._provider));
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Async generator for paginating through all matching records.
|
|
146
|
+
* Yields batches of wrapped records.
|
|
147
|
+
*/
|
|
148
|
+
paginate(params) {
|
|
149
|
+
var _a;
|
|
150
|
+
return __asyncGenerator(this, arguments, function* paginate_1() {
|
|
151
|
+
let hasMore = true;
|
|
152
|
+
let searchAfter;
|
|
153
|
+
const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
|
|
154
|
+
while (hasMore) {
|
|
155
|
+
const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) })));
|
|
156
|
+
if (result.records.length > 0) {
|
|
157
|
+
yield yield __await(result.records.map((r) => new DocumentRecord_1.DocumentRecord(r, this._provider)));
|
|
158
|
+
const lastRecord = result.records[result.records.length - 1];
|
|
159
|
+
searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
|
|
160
|
+
}
|
|
161
|
+
hasMore = result.hasMore && result.records.length >= query.pageSize;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
// ============================================
|
|
166
|
+
// QUERY BUILDER
|
|
167
|
+
// ============================================
|
|
168
|
+
/**
|
|
169
|
+
* Create a fluent query builder for Document records
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* const results = await accessor
|
|
174
|
+
* .query()
|
|
175
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
176
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
177
|
+
* .select('id', 'title', 'properties.*')
|
|
178
|
+
* .sortBy('createdAt', 'desc')
|
|
179
|
+
* .limit(100)
|
|
180
|
+
* .execute();
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
query() {
|
|
184
|
+
return (0, query_builder_1.createQueryBuilder)(this);
|
|
185
|
+
}
|
|
186
|
+
/** Access the underlying ApiProvider */
|
|
187
|
+
get provider() {
|
|
188
|
+
return this._provider;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.DocumentAccessor = DocumentAccessor;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocumentProcessing Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to DocumentProcessing records via API.
|
|
5
|
+
* Returns wrapped records with typed action methods.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Get existing record
|
|
10
|
+
* const record = await accessor.get(id);
|
|
11
|
+
* await record.updateDocumentProcessing({ ... });
|
|
12
|
+
*
|
|
13
|
+
* // Create new record
|
|
14
|
+
* const newRecord = accessor.new();
|
|
15
|
+
* await newRecord.createDocumentProcessing({ ... });
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
19
|
+
*/
|
|
20
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
|
|
21
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
22
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
23
|
+
import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
|
|
24
|
+
import { DocumentProcessingProperties } from '../entities-v2/DocumentProcessing';
|
|
25
|
+
import { DocumentProcessingRecord } from '../records-v2/DocumentProcessingRecord';
|
|
26
|
+
/** List response with wrapped records */
|
|
27
|
+
export interface DocumentProcessingListResponse {
|
|
28
|
+
data: DocumentProcessingRecord[];
|
|
29
|
+
hasMore: boolean;
|
|
30
|
+
totalRecords: number;
|
|
31
|
+
}
|
|
32
|
+
/** Search response with wrapped records */
|
|
33
|
+
export interface DocumentProcessingSearchResponse {
|
|
34
|
+
records: DocumentProcessingRecord[];
|
|
35
|
+
totalRecords: number;
|
|
36
|
+
hasMore: boolean;
|
|
37
|
+
aggregations?: Record<string, any>;
|
|
38
|
+
}
|
|
39
|
+
export declare class DocumentProcessingAccessor {
|
|
40
|
+
private readonly _provider;
|
|
41
|
+
private readonly _moduleName;
|
|
42
|
+
private readonly _entityName;
|
|
43
|
+
constructor(provider: ApiProvider);
|
|
44
|
+
constructor(authParams: OauthParams);
|
|
45
|
+
constructor(authToken: string, host?: string);
|
|
46
|
+
get moduleName(): string;
|
|
47
|
+
get entityName(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Create a new empty DocumentProcessing record instance for create operations.
|
|
50
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
51
|
+
*
|
|
52
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
53
|
+
* @returns A new record wrapper with pre-generated ID
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* // Auto-generated ID
|
|
58
|
+
* const note = odinClient.notes.new();
|
|
59
|
+
* console.log(note.id); // UUID available immediately
|
|
60
|
+
*
|
|
61
|
+
* // Custom ID
|
|
62
|
+
* const order = odinClient.orders.new("custom-id-123");
|
|
63
|
+
*
|
|
64
|
+
* // Reference ID before save
|
|
65
|
+
* const account = odinClient.accounts.new();
|
|
66
|
+
* const contact = odinClient.contacts.new();
|
|
67
|
+
* await contact
|
|
68
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
69
|
+
* .createContact({ FirstName: "John" });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
new(id?: string): DocumentProcessingRecord;
|
|
73
|
+
/**
|
|
74
|
+
* Get a single DocumentProcessing record by ID
|
|
75
|
+
*/
|
|
76
|
+
get(id: string): Promise<DocumentProcessingRecord>;
|
|
77
|
+
/**
|
|
78
|
+
* Get multiple DocumentProcessing records by IDs
|
|
79
|
+
*/
|
|
80
|
+
getMany(ids: string[]): Promise<DocumentProcessingRecord[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Search DocumentProcessing records
|
|
83
|
+
*/
|
|
84
|
+
search(params: Partial<OdinSearchV2>): Promise<DocumentProcessingSearchResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Search all DocumentProcessing records with automatic pagination
|
|
87
|
+
*/
|
|
88
|
+
searchAll(params: Partial<OdinSearchV2>): Promise<DocumentProcessingRecord[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Async generator for paginating through all matching records.
|
|
91
|
+
* Yields batches of wrapped records.
|
|
92
|
+
*/
|
|
93
|
+
paginate(params: Partial<OdinSearchV2>): AsyncGenerator<DocumentProcessingRecord[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Create a fluent query builder for DocumentProcessing records
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const results = await accessor
|
|
100
|
+
* .query()
|
|
101
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
102
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
103
|
+
* .select('id', 'title', 'properties.*')
|
|
104
|
+
* .sortBy('createdAt', 'desc')
|
|
105
|
+
* .limit(100)
|
|
106
|
+
* .execute();
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
query(): QueryBuilder<DocumentProcessingProperties, DocumentProcessingRecord>;
|
|
110
|
+
/** Access the underlying ApiProvider */
|
|
111
|
+
get provider(): ApiProvider;
|
|
112
|
+
}
|