@d19n/youfibre-odin-sdk 2.0.354 → 2.0.355
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 +4 -1
- package/dist/actions-v2/MoveCollectionAmcoToNonReturnedDto.d.ts +68 -0
- package/dist/actions-v2/MoveCollectionAmcoToNonReturnedDto.js +60 -0
- package/dist/api-sdk-v2/FileApi.d.ts +132 -132
- package/dist/api-sdk-v2/FileApi.js +268 -268
- package/dist/api-sdk-v2/InvoiceApi.d.ts +2 -2
- package/dist/api-sdk-v2/InvoiceApi.js +6 -6
- package/dist/db-sdk-v2/InvoiceDb.d.ts +2 -2
- package/dist/db-sdk-v2/InvoiceDb.js +6 -6
- package/dist/entities-v2/Case.d.ts +2 -0
- package/dist/entities-v2/Case.js +2 -0
- package/dist/entities-v2/Contact.d.ts +65 -1
- package/dist/entities-v2/Contact.js +38 -2
- package/dist/entities-v2/File.d.ts +0 -6
- package/dist/entities-v2/File.js +1 -5
- package/dist/entities-v2/Invoice.d.ts +7 -7
- package/dist/entities-v2/Invoice.js +5 -5
- package/dist/entities-v2/QaReport.d.ts +49 -1
- package/dist/entities-v2/QaReport.js +25 -1
- package/dist/entities-v2/QaRubric.d.ts +17 -1
- package/dist/entities-v2/QaRubric.js +4 -0
- package/dist/records-v2/FileRecord.d.ts +833 -12
- package/dist/records-v2/FileRecord.js +1386 -32
- package/dist/records-v2/InvoiceRecord.d.ts +20 -20
- package/dist/records-v2/InvoiceRecord.js +33 -33
- package/dist/records-v2/WorkOrderRecord.d.ts +25 -0
- package/dist/records-v2/WorkOrderRecord.js +29 -0
- package/package.json +1 -1
|
@@ -36,7 +36,6 @@ import { FileRecord } from './FileRecord';
|
|
|
36
36
|
import { NoteRecord } from './NoteRecord';
|
|
37
37
|
import { AccountRecord } from './AccountRecord';
|
|
38
38
|
import { OrderRecord } from './OrderRecord';
|
|
39
|
-
import { BillingAdjustmentRecord } from './BillingAdjustmentRecord';
|
|
40
39
|
import { ContactRecord } from './ContactRecord';
|
|
41
40
|
import { AccountCreditRecord } from './AccountCreditRecord';
|
|
42
41
|
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
@@ -50,6 +49,7 @@ import { SmsMessageRecord } from './SmsMessageRecord';
|
|
|
50
49
|
import { OneTouchSwitchRecord } from './OneTouchSwitchRecord';
|
|
51
50
|
import { CreditNoteRecord } from './CreditNoteRecord';
|
|
52
51
|
import { PaymentRecord } from './PaymentRecord';
|
|
52
|
+
import { BillingAdjustmentRecord } from './BillingAdjustmentRecord';
|
|
53
53
|
/** Valid entity types for Invoice */
|
|
54
54
|
export declare type InvoiceType = 'DEFAULT' | 'EQUIPMENT' | 'ETF';
|
|
55
55
|
/**
|
|
@@ -119,7 +119,6 @@ export declare class InvoiceRecord<TProps = InvoiceProperties> {
|
|
|
119
119
|
private _notes?;
|
|
120
120
|
private _accounts?;
|
|
121
121
|
private _orders?;
|
|
122
|
-
private _billingAdjustments?;
|
|
123
122
|
private _contacts?;
|
|
124
123
|
private _accountCredits?;
|
|
125
124
|
private _workOrders?;
|
|
@@ -133,6 +132,7 @@ export declare class InvoiceRecord<TProps = InvoiceProperties> {
|
|
|
133
132
|
private _oneTouchSwitches?;
|
|
134
133
|
private _creditNotes?;
|
|
135
134
|
private _payments?;
|
|
135
|
+
private _billingAdjustments?;
|
|
136
136
|
/**
|
|
137
137
|
* Create a record wrapper.
|
|
138
138
|
* @param record - The underlying record, or null for create operations
|
|
@@ -280,24 +280,6 @@ export declare class InvoiceRecord<TProps = InvoiceProperties> {
|
|
|
280
280
|
* ```
|
|
281
281
|
*/
|
|
282
282
|
get orders(): RecordLinkManager<OrderRecord, typeof InvoiceRecord['ordersLabels'][number]>;
|
|
283
|
-
/** Valid labels for BillingAdjustment associations */
|
|
284
|
-
static readonly billingAdjustmentsLabels: readonly ["Invoice__BillingAdjustment"];
|
|
285
|
-
/**
|
|
286
|
-
* Access linked BillingAdjustment records
|
|
287
|
-
* @remarks Available labels: Invoice__BillingAdjustment
|
|
288
|
-
* @throws Error if called on a new (unsaved) record
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
* ```typescript
|
|
292
|
-
* // Get all linked BillingAdjustment records
|
|
293
|
-
* const items = await record.billingAdjustments.list();
|
|
294
|
-
* const first = await record.billingAdjustments.first();
|
|
295
|
-
*
|
|
296
|
-
* // Filter by label
|
|
297
|
-
* const specific = await record.billingAdjustments.first({ label: 'Invoice__BillingAdjustment' });
|
|
298
|
-
* ```
|
|
299
|
-
*/
|
|
300
|
-
get billingAdjustments(): RecordLinkManager<BillingAdjustmentRecord, typeof InvoiceRecord['billingAdjustmentsLabels'][number]>;
|
|
301
283
|
/** Valid labels for Contact associations */
|
|
302
284
|
static readonly contactsLabels: readonly ["Invoice__Contact"];
|
|
303
285
|
/**
|
|
@@ -532,6 +514,24 @@ export declare class InvoiceRecord<TProps = InvoiceProperties> {
|
|
|
532
514
|
* ```
|
|
533
515
|
*/
|
|
534
516
|
get payments(): RecordLinkManager<PaymentRecord, typeof InvoiceRecord['paymentsLabels'][number]>;
|
|
517
|
+
/** Valid labels for BillingAdjustment associations */
|
|
518
|
+
static readonly billingAdjustmentsLabels: readonly ["Invoice__BillingAdjustment"];
|
|
519
|
+
/**
|
|
520
|
+
* Access linked BillingAdjustment records
|
|
521
|
+
* @remarks Available labels: Invoice__BillingAdjustment
|
|
522
|
+
* @throws Error if called on a new (unsaved) record
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* ```typescript
|
|
526
|
+
* // Get all linked BillingAdjustment records
|
|
527
|
+
* const items = await record.billingAdjustments.list();
|
|
528
|
+
* const first = await record.billingAdjustments.first();
|
|
529
|
+
*
|
|
530
|
+
* // Filter by label
|
|
531
|
+
* const specific = await record.billingAdjustments.first({ label: 'Invoice__BillingAdjustment' });
|
|
532
|
+
* ```
|
|
533
|
+
*/
|
|
534
|
+
get billingAdjustments(): RecordLinkManager<BillingAdjustmentRecord, typeof InvoiceRecord['billingAdjustmentsLabels'][number]>;
|
|
535
535
|
/**
|
|
536
536
|
* Queue a link to be created with the next action.
|
|
537
537
|
* Works for both create and update actions.
|
|
@@ -36,7 +36,6 @@ const FileRecord_1 = require("./FileRecord");
|
|
|
36
36
|
const NoteRecord_1 = require("./NoteRecord");
|
|
37
37
|
const AccountRecord_1 = require("./AccountRecord");
|
|
38
38
|
const OrderRecord_1 = require("./OrderRecord");
|
|
39
|
-
const BillingAdjustmentRecord_1 = require("./BillingAdjustmentRecord");
|
|
40
39
|
const ContactRecord_1 = require("./ContactRecord");
|
|
41
40
|
const AccountCreditRecord_1 = require("./AccountCreditRecord");
|
|
42
41
|
const WorkOrderRecord_1 = require("./WorkOrderRecord");
|
|
@@ -50,6 +49,7 @@ const SmsMessageRecord_1 = require("./SmsMessageRecord");
|
|
|
50
49
|
const OneTouchSwitchRecord_1 = require("./OneTouchSwitchRecord");
|
|
51
50
|
const CreditNoteRecord_1 = require("./CreditNoteRecord");
|
|
52
51
|
const PaymentRecord_1 = require("./PaymentRecord");
|
|
52
|
+
const BillingAdjustmentRecord_1 = require("./BillingAdjustmentRecord");
|
|
53
53
|
/**
|
|
54
54
|
* Builder for action execution with dryRun support
|
|
55
55
|
*
|
|
@@ -333,36 +333,6 @@ class InvoiceRecord {
|
|
|
333
333
|
}
|
|
334
334
|
return this._orders;
|
|
335
335
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Access linked BillingAdjustment records
|
|
338
|
-
* @remarks Available labels: Invoice__BillingAdjustment
|
|
339
|
-
* @throws Error if called on a new (unsaved) record
|
|
340
|
-
*
|
|
341
|
-
* @example
|
|
342
|
-
* ```typescript
|
|
343
|
-
* // Get all linked BillingAdjustment records
|
|
344
|
-
* const items = await record.billingAdjustments.list();
|
|
345
|
-
* const first = await record.billingAdjustments.first();
|
|
346
|
-
*
|
|
347
|
-
* // Filter by label
|
|
348
|
-
* const specific = await record.billingAdjustments.first({ label: 'Invoice__BillingAdjustment' });
|
|
349
|
-
* ```
|
|
350
|
-
*/
|
|
351
|
-
get billingAdjustments() {
|
|
352
|
-
var _a;
|
|
353
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
354
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
355
|
-
if (!this._billingAdjustments) {
|
|
356
|
-
this._billingAdjustments = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
357
|
-
sourceEntity: 'BillingModule:Invoice',
|
|
358
|
-
targetEntity: 'OrderModule:BillingAdjustment',
|
|
359
|
-
targetModuleName: 'OrderModule',
|
|
360
|
-
targetEntityName: 'BillingAdjustment',
|
|
361
|
-
labels: ['Invoice__BillingAdjustment'],
|
|
362
|
-
}, BillingAdjustmentRecord_1.BillingAdjustmentRecord);
|
|
363
|
-
}
|
|
364
|
-
return this._billingAdjustments;
|
|
365
|
-
}
|
|
366
336
|
/**
|
|
367
337
|
* Access linked Contact records
|
|
368
338
|
* @remarks Available labels: Invoice__Contact
|
|
@@ -753,6 +723,36 @@ class InvoiceRecord {
|
|
|
753
723
|
}
|
|
754
724
|
return this._payments;
|
|
755
725
|
}
|
|
726
|
+
/**
|
|
727
|
+
* Access linked BillingAdjustment records
|
|
728
|
+
* @remarks Available labels: Invoice__BillingAdjustment
|
|
729
|
+
* @throws Error if called on a new (unsaved) record
|
|
730
|
+
*
|
|
731
|
+
* @example
|
|
732
|
+
* ```typescript
|
|
733
|
+
* // Get all linked BillingAdjustment records
|
|
734
|
+
* const items = await record.billingAdjustments.list();
|
|
735
|
+
* const first = await record.billingAdjustments.first();
|
|
736
|
+
*
|
|
737
|
+
* // Filter by label
|
|
738
|
+
* const specific = await record.billingAdjustments.first({ label: 'Invoice__BillingAdjustment' });
|
|
739
|
+
* ```
|
|
740
|
+
*/
|
|
741
|
+
get billingAdjustments() {
|
|
742
|
+
var _a;
|
|
743
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
744
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
745
|
+
if (!this._billingAdjustments) {
|
|
746
|
+
this._billingAdjustments = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
747
|
+
sourceEntity: 'BillingModule:Invoice',
|
|
748
|
+
targetEntity: 'OrderModule:BillingAdjustment',
|
|
749
|
+
targetModuleName: 'OrderModule',
|
|
750
|
+
targetEntityName: 'BillingAdjustment',
|
|
751
|
+
labels: ['Invoice__BillingAdjustment'],
|
|
752
|
+
}, BillingAdjustmentRecord_1.BillingAdjustmentRecord);
|
|
753
|
+
}
|
|
754
|
+
return this._billingAdjustments;
|
|
755
|
+
}
|
|
756
756
|
// ============================================
|
|
757
757
|
// LINK MANAGEMENT
|
|
758
758
|
// ============================================
|
|
@@ -1107,8 +1107,6 @@ InvoiceRecord.notesLabels = ['Invoice__Note'];
|
|
|
1107
1107
|
InvoiceRecord.accountsLabels = ['Account__Invoice'];
|
|
1108
1108
|
/** Valid labels for Order associations */
|
|
1109
1109
|
InvoiceRecord.ordersLabels = ['Order__Invoice'];
|
|
1110
|
-
/** Valid labels for BillingAdjustment associations */
|
|
1111
|
-
InvoiceRecord.billingAdjustmentsLabels = ['Invoice__BillingAdjustment'];
|
|
1112
1110
|
/** Valid labels for Contact associations */
|
|
1113
1111
|
InvoiceRecord.contactsLabels = ['Invoice__Contact'];
|
|
1114
1112
|
/** Valid labels for AccountCredit associations */
|
|
@@ -1135,6 +1133,8 @@ InvoiceRecord.oneTouchSwitchesLabels = ['OneTouchSwitch__Invoice'];
|
|
|
1135
1133
|
InvoiceRecord.creditNotesLabels = ['Invoice__CreditNote'];
|
|
1136
1134
|
/** Valid labels for Payment associations */
|
|
1137
1135
|
InvoiceRecord.paymentsLabels = ['Payment_Invoice'];
|
|
1136
|
+
/** Valid labels for BillingAdjustment associations */
|
|
1137
|
+
InvoiceRecord.billingAdjustmentsLabels = ['Invoice__BillingAdjustment'];
|
|
1138
1138
|
/** Type guard to check if an object is a InvoiceRecord */
|
|
1139
1139
|
function isInvoiceRecord(obj) {
|
|
1140
1140
|
return obj instanceof InvoiceRecord;
|
|
@@ -5857,6 +5857,31 @@ export declare class WorkOrderRecord<TProps = WorkOrderProperties> {
|
|
|
5857
5857
|
moveCollectionAmcoToFailedInspection(options?: {
|
|
5858
5858
|
journeyId?: string;
|
|
5859
5859
|
}): ActionBuilder;
|
|
5860
|
+
/**
|
|
5861
|
+
* MoveCollectionAmcoToNonReturned
|
|
5862
|
+
*
|
|
5863
|
+
* Transitions this WorkOrder record to a new pipeline stage.
|
|
5864
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
5865
|
+
*
|
|
5866
|
+
* @remarks Transitions to stage: CollectionAmcoStageNonReturned
|
|
5867
|
+
*
|
|
5868
|
+
* @param options - Optional settings
|
|
5869
|
+
* @param options.journeyId - Associate with a journey
|
|
5870
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
5871
|
+
* @throws Error if called on a new (unsaved) record
|
|
5872
|
+
*
|
|
5873
|
+
* @example
|
|
5874
|
+
* ```typescript
|
|
5875
|
+
* const record = await odinClient.workOrders.get(id);
|
|
5876
|
+
* await record.moveCollectionAmcoToNonReturned().execute();
|
|
5877
|
+
*
|
|
5878
|
+
* // Dry run (for debugging)
|
|
5879
|
+
* const payload = record.moveCollectionAmcoToNonReturned().dryRun();
|
|
5880
|
+
* ```
|
|
5881
|
+
*/
|
|
5882
|
+
moveCollectionAmcoToNonReturned(options?: {
|
|
5883
|
+
journeyId?: string;
|
|
5884
|
+
}): ActionBuilder;
|
|
5860
5885
|
/**
|
|
5861
5886
|
* MoveCollectionAmcoToOverridden
|
|
5862
5887
|
*
|
|
@@ -8716,6 +8716,35 @@ class WorkOrderRecord {
|
|
|
8716
8716
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCollectionAmcoToFailedInspection', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CollectionAmcoStageFailedInspection' }, options);
|
|
8717
8717
|
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
8718
8718
|
}
|
|
8719
|
+
/**
|
|
8720
|
+
* MoveCollectionAmcoToNonReturned
|
|
8721
|
+
*
|
|
8722
|
+
* Transitions this WorkOrder record to a new pipeline stage.
|
|
8723
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
8724
|
+
*
|
|
8725
|
+
* @remarks Transitions to stage: CollectionAmcoStageNonReturned
|
|
8726
|
+
*
|
|
8727
|
+
* @param options - Optional settings
|
|
8728
|
+
* @param options.journeyId - Associate with a journey
|
|
8729
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
8730
|
+
* @throws Error if called on a new (unsaved) record
|
|
8731
|
+
*
|
|
8732
|
+
* @example
|
|
8733
|
+
* ```typescript
|
|
8734
|
+
* const record = await odinClient.workOrders.get(id);
|
|
8735
|
+
* await record.moveCollectionAmcoToNonReturned().execute();
|
|
8736
|
+
*
|
|
8737
|
+
* // Dry run (for debugging)
|
|
8738
|
+
* const payload = record.moveCollectionAmcoToNonReturned().dryRun();
|
|
8739
|
+
* ```
|
|
8740
|
+
*/
|
|
8741
|
+
moveCollectionAmcoToNonReturned(options) {
|
|
8742
|
+
var _a;
|
|
8743
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
8744
|
+
throw new Error('moveCollectionAmcoToNonReturned requires an existing record. Use accessor.get() first.');
|
|
8745
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCollectionAmcoToNonReturned', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CollectionAmcoStageNonReturned' }, options);
|
|
8746
|
+
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
8747
|
+
}
|
|
8719
8748
|
/**
|
|
8720
8749
|
* MoveCollectionAmcoToOverridden
|
|
8721
8750
|
*
|