@d19n/youfibre-odin-sdk 2.0.122 → 2.0.124
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 +6 -2
- package/dist/EntityRegistry.d.ts +2 -0
- package/dist/EntityRegistry.js +2 -0
- package/dist/OdinApiClient.d.ts +4 -0
- package/dist/OdinApiClient.js +8 -0
- package/dist/OdinDbClient.d.ts +4 -0
- package/dist/OdinDbClient.js +8 -0
- package/dist/accessors-v2/YfFieldServiceVisitAccessor.d.ts +111 -0
- package/dist/accessors-v2/YfFieldServiceVisitAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +3 -1
- package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.d.ts +1026 -3
- package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.js +115 -2
- package/dist/actions-v2/CreateContactDto.d.ts +7 -7
- package/dist/actions-v2/CreateInboundCallDto.d.ts +33 -1
- package/dist/actions-v2/CreateLeadFromAddressDto.d.ts +7 -7
- package/dist/actions-v2/MoveCaseToClosedWithAdditionalNoteDto.d.ts +172 -0
- package/dist/actions-v2/MoveCaseToClosedWithAdditionalNoteDto.js +122 -0
- package/dist/actions-v2/UpdateAdditionalCareDto.d.ts +28 -29
- package/dist/actions-v2/UpdateAdditionalNoteDto.d.ts +73 -0
- package/dist/actions-v2/UpdateAdditionalNoteDto.js +56 -0
- package/dist/actions-v2/UpdateContactDto.d.ts +28 -29
- package/dist/api-sdk-v2/AddressApi.d.ts +2 -0
- package/dist/api-sdk-v2/AddressApi.js +6 -0
- package/dist/api-sdk-v2/ContactApi.d.ts +2 -2
- package/dist/api-sdk-v2/ContactApi.js +6 -6
- package/dist/api-sdk-v2/YfFieldServiceVisitApi.d.ts +2 -0
- package/dist/api-sdk-v2/YfFieldServiceVisitApi.js +6 -0
- package/dist/db-accessors-v2/YfFieldServiceVisitDbAccessor.d.ts +149 -0
- package/dist/db-accessors-v2/YfFieldServiceVisitDbAccessor.js +227 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +3 -1
- package/dist/db-sdk-v2/AddressDb.d.ts +2 -0
- package/dist/db-sdk-v2/AddressDb.js +6 -0
- package/dist/db-sdk-v2/ContactDb.d.ts +2 -2
- package/dist/db-sdk-v2/ContactDb.js +6 -6
- package/dist/db-sdk-v2/YfFieldServiceVisitDb.d.ts +2 -0
- package/dist/db-sdk-v2/YfFieldServiceVisitDb.js +6 -0
- package/dist/entities-v2/Address.d.ts +3 -0
- package/dist/entities-v2/Contact.d.ts +88 -89
- package/dist/entities-v2/Contact.js +58 -59
- package/dist/entities-v2/YfFieldServiceVisit.d.ts +20 -13
- package/dist/entities-v2/YfFieldServiceVisit.js +7 -3
- package/dist/records-v2/AddressRecord.d.ts +20 -0
- package/dist/records-v2/AddressRecord.js +33 -0
- package/dist/records-v2/CaseRecord.d.ts +113 -0
- package/dist/records-v2/CaseRecord.js +164 -1
- package/dist/records-v2/ContactRecord.d.ts +20 -20
- package/dist/records-v2/ContactRecord.js +33 -33
- package/dist/records-v2/FileRecord.d.ts +20 -0
- package/dist/records-v2/FileRecord.js +33 -0
- package/dist/records-v2/NoteRecord.d.ts +20 -0
- package/dist/records-v2/NoteRecord.js +33 -0
- package/dist/records-v2/WorkOrderRecord.d.ts +98 -8
- package/dist/records-v2/WorkOrderRecord.js +169 -10
- package/dist/records-v2/YfFieldServiceVisitRecord.d.ts +265 -0
- package/dist/records-v2/YfFieldServiceVisitRecord.js +379 -0
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +8 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -353,7 +353,7 @@ This SDK includes **165** entities across **12** modules.
|
|
|
353
353
|
|
|
354
354
|
## Actions
|
|
355
355
|
|
|
356
|
-
This SDK includes **
|
|
356
|
+
This SDK includes **652** actions.
|
|
357
357
|
|
|
358
358
|
### Action Types
|
|
359
359
|
|
|
@@ -448,7 +448,7 @@ This SDK includes **650** actions.
|
|
|
448
448
|
| `CompletePrePullWorkOrder` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.CompletePrePullWorkOrder |
|
|
449
449
|
| `CompleteRemediationWorkOrder` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.CompleteRemediationWorkOrder |
|
|
450
450
|
| `CompleteServiceWorkOrder` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.CompleteServiceWorkOrder |
|
|
451
|
-
| `CompleteServiceWorkOrderFlow` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.
|
|
451
|
+
| `CompleteServiceWorkOrderFlow` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.CompleteServiceWorkOrder |
|
|
452
452
|
| `CreateCancelCollectionAmco` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Create.CreateCancelCollectionAmco |
|
|
453
453
|
| `CreateCollectionAmcoReplacementWorkOrder` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Create.CreateCollectionAmcoReplacementWorkOrder |
|
|
454
454
|
| `CreateCollectionAmcoReplacementWorkOrderFromWorkOrder` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Create.CreateCollectionAmcoReplacementWorkOrder |
|
|
@@ -782,6 +782,7 @@ This SDK includes **650** actions.
|
|
|
782
782
|
| `MoveCaseOutageToSolvedTransition` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Transition.MoveCaseOutageToSolvedTransition |
|
|
783
783
|
| `MoveCaseToBlockedAction` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.MoveCaseToBlockedAction |
|
|
784
784
|
| `MoveCaseToBlockedTransition` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Update.MoveCaseToBlockedAction |
|
|
785
|
+
| `MoveCaseToClosedWithAdditionalNote` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Update.UpdateAdditionalNote |
|
|
785
786
|
| `MoveCaseToPendingAgentTransition` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Transition.MoveCaseToPendingAgentTransition |
|
|
786
787
|
| `MoveCaseToSolvedAction` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.MoveCaseToSolvedAction |
|
|
787
788
|
| `MoveCaseToSolvedTransition` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Transition.MoveCaseToSolvedTransition |
|
|
@@ -790,6 +791,7 @@ This SDK includes **650** actions.
|
|
|
790
791
|
| `MoveDefaultCaseFromOpenToClosed` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Update.MarkCaseClosed |
|
|
791
792
|
| `MovetoClosed` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Transition.MovetoClosed |
|
|
792
793
|
| `RemoveAssignmentFromCase` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.RemoveAssignmentFromCase |
|
|
794
|
+
| `UpdateAdditionalNote` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.UpdateAdditionalNote |
|
|
793
795
|
| `UpdateCaseCsat` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat |
|
|
794
796
|
| `UpdateFormalComplaint` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.UpdateFormalComplaint |
|
|
795
797
|
| `UpdateSentiment` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.UpdateSentiment |
|
|
@@ -827,6 +829,8 @@ This SDK includes **650** actions.
|
|
|
827
829
|
|
|
828
830
|
**MoveCaseToBlockedTransition Target Stages:** `CaseDefaultStageBlocked`
|
|
829
831
|
|
|
832
|
+
**MoveCaseToClosedWithAdditionalNote Target Stages:** `CaseDefaultStageClosed`
|
|
833
|
+
|
|
830
834
|
**MoveCaseToPendingAgentTransition Target Stages:** `CaseDefaultStagePendingAgent`
|
|
831
835
|
|
|
832
836
|
**MoveCaseToSolvedTransition Target Stages:** `CaseDefaultStageSolved`
|
package/dist/EntityRegistry.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ import { VoiceConfigurationAccessor } from './accessors-v2/VoiceConfigurationAcc
|
|
|
115
115
|
import { WayleaveAuditAccessor } from './accessors-v2/WayleaveAuditAccessor';
|
|
116
116
|
import { WorkOrderAccessor } from './accessors-v2/WorkOrderAccessor';
|
|
117
117
|
import { WorkOrderStatusUpdateAccessor } from './accessors-v2/WorkOrderStatusUpdateAccessor';
|
|
118
|
+
import { YfFieldServiceVisitAccessor } from './accessors-v2/YfFieldServiceVisitAccessor';
|
|
118
119
|
export declare const EntityRegistry: {
|
|
119
120
|
readonly Account: typeof AccountAccessor;
|
|
120
121
|
readonly AccountCredit: typeof AccountCreditAccessor;
|
|
@@ -220,6 +221,7 @@ export declare const EntityRegistry: {
|
|
|
220
221
|
readonly WayleaveAudit: typeof WayleaveAuditAccessor;
|
|
221
222
|
readonly WorkOrder: typeof WorkOrderAccessor;
|
|
222
223
|
readonly WorkOrderStatusUpdate: typeof WorkOrderStatusUpdateAccessor;
|
|
224
|
+
readonly YfFieldServiceVisit: typeof YfFieldServiceVisitAccessor;
|
|
223
225
|
};
|
|
224
226
|
export declare type EntityName = keyof typeof EntityRegistry;
|
|
225
227
|
export declare function getAccessor<T extends EntityName>(entityName: T, provider: any): InstanceType<(typeof EntityRegistry)[T]>;
|
package/dist/EntityRegistry.js
CHANGED
|
@@ -118,6 +118,7 @@ const VoiceConfigurationAccessor_1 = require("./accessors-v2/VoiceConfigurationA
|
|
|
118
118
|
const WayleaveAuditAccessor_1 = require("./accessors-v2/WayleaveAuditAccessor");
|
|
119
119
|
const WorkOrderAccessor_1 = require("./accessors-v2/WorkOrderAccessor");
|
|
120
120
|
const WorkOrderStatusUpdateAccessor_1 = require("./accessors-v2/WorkOrderStatusUpdateAccessor");
|
|
121
|
+
const YfFieldServiceVisitAccessor_1 = require("./accessors-v2/YfFieldServiceVisitAccessor");
|
|
121
122
|
exports.EntityRegistry = {
|
|
122
123
|
'Account': AccountAccessor_1.AccountAccessor,
|
|
123
124
|
'AccountCredit': AccountCreditAccessor_1.AccountCreditAccessor,
|
|
@@ -223,6 +224,7 @@ exports.EntityRegistry = {
|
|
|
223
224
|
'WayleaveAudit': WayleaveAuditAccessor_1.WayleaveAuditAccessor,
|
|
224
225
|
'WorkOrder': WorkOrderAccessor_1.WorkOrderAccessor,
|
|
225
226
|
'WorkOrderStatusUpdate': WorkOrderStatusUpdateAccessor_1.WorkOrderStatusUpdateAccessor,
|
|
227
|
+
'YfFieldServiceVisit': YfFieldServiceVisitAccessor_1.YfFieldServiceVisitAccessor,
|
|
226
228
|
};
|
|
227
229
|
function getAccessor(entityName, provider) {
|
|
228
230
|
const Accessor = exports.EntityRegistry[entityName];
|
package/dist/OdinApiClient.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ import { VoiceConfigurationAccessor } from './accessors-v2/VoiceConfigurationAcc
|
|
|
125
125
|
import { WayleaveAuditAccessor } from './accessors-v2/WayleaveAuditAccessor';
|
|
126
126
|
import { WorkOrderAccessor } from './accessors-v2/WorkOrderAccessor';
|
|
127
127
|
import { WorkOrderStatusUpdateAccessor } from './accessors-v2/WorkOrderStatusUpdateAccessor';
|
|
128
|
+
import { YfFieldServiceVisitAccessor } from './accessors-v2/YfFieldServiceVisitAccessor';
|
|
128
129
|
export interface OdinApiClientConfig {
|
|
129
130
|
/** ODIN API host (e.g., 'api.yourdomain.com') */
|
|
130
131
|
host: string;
|
|
@@ -239,6 +240,7 @@ export declare class OdinApiClient {
|
|
|
239
240
|
private _wayleaveAudits?;
|
|
240
241
|
private _workOrders?;
|
|
241
242
|
private _workOrderStatusUpdates?;
|
|
243
|
+
private _yfFieldServiceVisits?;
|
|
242
244
|
/**
|
|
243
245
|
* Create a new OdinApiClient
|
|
244
246
|
*
|
|
@@ -458,6 +460,8 @@ export declare class OdinApiClient {
|
|
|
458
460
|
get workOrders(): WorkOrderAccessor;
|
|
459
461
|
/** Access WorkOrderStatusUpdate records */
|
|
460
462
|
get workOrderStatusUpdates(): WorkOrderStatusUpdateAccessor;
|
|
463
|
+
/** Access YfFieldServiceVisit records */
|
|
464
|
+
get yfFieldServiceVisits(): YfFieldServiceVisitAccessor;
|
|
461
465
|
/** Access the underlying ApiProvider for advanced operations */
|
|
462
466
|
get provider(): ApiProvider;
|
|
463
467
|
/** Manually authenticate (usually not needed, handled automatically) */
|
package/dist/OdinApiClient.js
CHANGED
|
@@ -136,6 +136,7 @@ const VoiceConfigurationAccessor_1 = require("./accessors-v2/VoiceConfigurationA
|
|
|
136
136
|
const WayleaveAuditAccessor_1 = require("./accessors-v2/WayleaveAuditAccessor");
|
|
137
137
|
const WorkOrderAccessor_1 = require("./accessors-v2/WorkOrderAccessor");
|
|
138
138
|
const WorkOrderStatusUpdateAccessor_1 = require("./accessors-v2/WorkOrderStatusUpdateAccessor");
|
|
139
|
+
const YfFieldServiceVisitAccessor_1 = require("./accessors-v2/YfFieldServiceVisitAccessor");
|
|
139
140
|
class OdinApiClient {
|
|
140
141
|
// ============================================
|
|
141
142
|
// CONSTRUCTOR
|
|
@@ -892,6 +893,13 @@ class OdinApiClient {
|
|
|
892
893
|
}
|
|
893
894
|
return this._workOrderStatusUpdates;
|
|
894
895
|
}
|
|
896
|
+
/** Access YfFieldServiceVisit records */
|
|
897
|
+
get yfFieldServiceVisits() {
|
|
898
|
+
if (!this._yfFieldServiceVisits) {
|
|
899
|
+
this._yfFieldServiceVisits = new YfFieldServiceVisitAccessor_1.YfFieldServiceVisitAccessor(this._provider);
|
|
900
|
+
}
|
|
901
|
+
return this._yfFieldServiceVisits;
|
|
902
|
+
}
|
|
895
903
|
// ============================================
|
|
896
904
|
// PROVIDER ACCESS
|
|
897
905
|
// ============================================
|
package/dist/OdinDbClient.d.ts
CHANGED
|
@@ -132,6 +132,7 @@ import { VoiceConfigurationDbAccessor } from './db-accessors-v2/VoiceConfigurati
|
|
|
132
132
|
import { WayleaveAuditDbAccessor } from './db-accessors-v2/WayleaveAuditDbAccessor';
|
|
133
133
|
import { WorkOrderDbAccessor } from './db-accessors-v2/WorkOrderDbAccessor';
|
|
134
134
|
import { WorkOrderStatusUpdateDbAccessor } from './db-accessors-v2/WorkOrderStatusUpdateDbAccessor';
|
|
135
|
+
import { YfFieldServiceVisitDbAccessor } from './db-accessors-v2/YfFieldServiceVisitDbAccessor';
|
|
135
136
|
export declare class OdinDbClient {
|
|
136
137
|
private readonly _principal;
|
|
137
138
|
private readonly _dbService;
|
|
@@ -240,6 +241,7 @@ export declare class OdinDbClient {
|
|
|
240
241
|
private _wayleaveAudits?;
|
|
241
242
|
private _workOrders?;
|
|
242
243
|
private _workOrderStatusUpdates?;
|
|
244
|
+
private _yfFieldServiceVisits?;
|
|
243
245
|
/**
|
|
244
246
|
* Create a new OdinDbClient
|
|
245
247
|
*
|
|
@@ -468,6 +470,8 @@ export declare class OdinDbClient {
|
|
|
468
470
|
get workOrders(): WorkOrderDbAccessor;
|
|
469
471
|
/** Access WorkOrderStatusUpdate records */
|
|
470
472
|
get workOrderStatusUpdates(): WorkOrderStatusUpdateDbAccessor;
|
|
473
|
+
/** Access YfFieldServiceVisit records */
|
|
474
|
+
get yfFieldServiceVisits(): YfFieldServiceVisitDbAccessor;
|
|
471
475
|
/** Get the current principal */
|
|
472
476
|
get principal(): any;
|
|
473
477
|
/** Get the database service */
|
package/dist/OdinDbClient.js
CHANGED
|
@@ -134,6 +134,7 @@ const VoiceConfigurationDbAccessor_1 = require("./db-accessors-v2/VoiceConfigura
|
|
|
134
134
|
const WayleaveAuditDbAccessor_1 = require("./db-accessors-v2/WayleaveAuditDbAccessor");
|
|
135
135
|
const WorkOrderDbAccessor_1 = require("./db-accessors-v2/WorkOrderDbAccessor");
|
|
136
136
|
const WorkOrderStatusUpdateDbAccessor_1 = require("./db-accessors-v2/WorkOrderStatusUpdateDbAccessor");
|
|
137
|
+
const YfFieldServiceVisitDbAccessor_1 = require("./db-accessors-v2/YfFieldServiceVisitDbAccessor");
|
|
137
138
|
class OdinDbClient {
|
|
138
139
|
// ============================================
|
|
139
140
|
// CONSTRUCTOR
|
|
@@ -893,6 +894,13 @@ class OdinDbClient {
|
|
|
893
894
|
}
|
|
894
895
|
return this._workOrderStatusUpdates;
|
|
895
896
|
}
|
|
897
|
+
/** Access YfFieldServiceVisit records */
|
|
898
|
+
get yfFieldServiceVisits() {
|
|
899
|
+
if (!this._yfFieldServiceVisits) {
|
|
900
|
+
this._yfFieldServiceVisits = new YfFieldServiceVisitDbAccessor_1.YfFieldServiceVisitDbAccessor(this._principal, this._dbService, this._defaultOptions);
|
|
901
|
+
}
|
|
902
|
+
return this._yfFieldServiceVisits;
|
|
903
|
+
}
|
|
896
904
|
// ============================================
|
|
897
905
|
// CONTEXT ACCESS
|
|
898
906
|
// ============================================
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YfFieldServiceVisit Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to YfFieldServiceVisit 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.updateYfFieldServiceVisit({ ... });
|
|
12
|
+
*
|
|
13
|
+
* // Create new record
|
|
14
|
+
* const newRecord = accessor.new();
|
|
15
|
+
* await newRecord.createYfFieldServiceVisit({ ... });
|
|
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 { YfFieldServiceVisitProperties } from '../entities-v2/YfFieldServiceVisit';
|
|
25
|
+
import { YfFieldServiceVisitRecord } from '../records-v2/YfFieldServiceVisitRecord';
|
|
26
|
+
/** List response with wrapped records */
|
|
27
|
+
export interface YfFieldServiceVisitListResponse {
|
|
28
|
+
data: YfFieldServiceVisitRecord[];
|
|
29
|
+
hasMore: boolean;
|
|
30
|
+
totalRecords: number;
|
|
31
|
+
}
|
|
32
|
+
/** Search response with wrapped records */
|
|
33
|
+
export interface YfFieldServiceVisitSearchResponse {
|
|
34
|
+
records: YfFieldServiceVisitRecord[];
|
|
35
|
+
totalRecords: number;
|
|
36
|
+
hasMore: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare class YfFieldServiceVisitAccessor {
|
|
39
|
+
private readonly _provider;
|
|
40
|
+
private readonly _moduleName;
|
|
41
|
+
private readonly _entityName;
|
|
42
|
+
constructor(provider: ApiProvider);
|
|
43
|
+
constructor(authParams: OauthParams);
|
|
44
|
+
constructor(authToken: string, host?: string);
|
|
45
|
+
get moduleName(): string;
|
|
46
|
+
get entityName(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Create a new empty YfFieldServiceVisit record instance for create operations.
|
|
49
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
50
|
+
*
|
|
51
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
52
|
+
* @returns A new record wrapper with pre-generated ID
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* // Auto-generated ID
|
|
57
|
+
* const note = odinClient.notes.new();
|
|
58
|
+
* console.log(note.id); // UUID available immediately
|
|
59
|
+
*
|
|
60
|
+
* // Custom ID
|
|
61
|
+
* const order = odinClient.orders.new("custom-id-123");
|
|
62
|
+
*
|
|
63
|
+
* // Reference ID before save
|
|
64
|
+
* const account = odinClient.accounts.new();
|
|
65
|
+
* const contact = odinClient.contacts.new();
|
|
66
|
+
* await contact
|
|
67
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
68
|
+
* .createContact({ FirstName: "John" });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
new(id?: string): YfFieldServiceVisitRecord;
|
|
72
|
+
/**
|
|
73
|
+
* Get a single YfFieldServiceVisit record by ID
|
|
74
|
+
*/
|
|
75
|
+
get(id: string): Promise<YfFieldServiceVisitRecord>;
|
|
76
|
+
/**
|
|
77
|
+
* Get multiple YfFieldServiceVisit records by IDs
|
|
78
|
+
*/
|
|
79
|
+
getMany(ids: string[]): Promise<YfFieldServiceVisitRecord[]>;
|
|
80
|
+
/**
|
|
81
|
+
* Search YfFieldServiceVisit records
|
|
82
|
+
*/
|
|
83
|
+
search(params: Partial<OdinSearchV2>): Promise<YfFieldServiceVisitSearchResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Search all YfFieldServiceVisit records with automatic pagination
|
|
86
|
+
*/
|
|
87
|
+
searchAll(params: Partial<OdinSearchV2>): Promise<YfFieldServiceVisitRecord[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Async generator for paginating through all matching records.
|
|
90
|
+
* Yields batches of wrapped records.
|
|
91
|
+
*/
|
|
92
|
+
paginate(params: Partial<OdinSearchV2>): AsyncGenerator<YfFieldServiceVisitRecord[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Create a fluent query builder for YfFieldServiceVisit records
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const results = await accessor
|
|
99
|
+
* .query()
|
|
100
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
101
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
102
|
+
* .select('id', 'title', 'properties.*')
|
|
103
|
+
* .sortBy('createdAt', 'desc')
|
|
104
|
+
* .limit(100)
|
|
105
|
+
* .execute();
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
query(): QueryBuilder<YfFieldServiceVisitProperties, YfFieldServiceVisitRecord>;
|
|
109
|
+
/** Access the underlying ApiProvider */
|
|
110
|
+
get provider(): ApiProvider;
|
|
111
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* YfFieldServiceVisit Accessor
|
|
4
|
+
*
|
|
5
|
+
* Provides typed access to YfFieldServiceVisit 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.updateYfFieldServiceVisit({ ... });
|
|
13
|
+
*
|
|
14
|
+
* // Create new record
|
|
15
|
+
* const newRecord = accessor.new();
|
|
16
|
+
* await newRecord.createYfFieldServiceVisit({ ... });
|
|
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.YfFieldServiceVisitAccessor = 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 YfFieldServiceVisitRecord_1 = require("../records-v2/YfFieldServiceVisitRecord");
|
|
47
|
+
class YfFieldServiceVisitAccessor {
|
|
48
|
+
constructor(providerOrAuth, host) {
|
|
49
|
+
this._moduleName = 'FieldServiceModule';
|
|
50
|
+
this._entityName = 'YfFieldServiceVisit';
|
|
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 YfFieldServiceVisit 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 YfFieldServiceVisitRecord_1.YfFieldServiceVisitRecord(null, this._provider, id);
|
|
94
|
+
}
|
|
95
|
+
// ============================================
|
|
96
|
+
// RECORD RETRIEVAL
|
|
97
|
+
// ============================================
|
|
98
|
+
/**
|
|
99
|
+
* Get a single YfFieldServiceVisit 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 YfFieldServiceVisitRecord_1.YfFieldServiceVisitRecord(record, this._provider);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get multiple YfFieldServiceVisit 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 YfFieldServiceVisitRecord_1.YfFieldServiceVisitRecord(r, this._provider));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// ============================================
|
|
119
|
+
// SEARCH OPERATIONS
|
|
120
|
+
// ============================================
|
|
121
|
+
/**
|
|
122
|
+
* Search YfFieldServiceVisit 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 YfFieldServiceVisitRecord_1.YfFieldServiceVisitRecord(r, this._provider)),
|
|
129
|
+
totalRecords: result.totalRecords,
|
|
130
|
+
hasMore: result.hasMore,
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Search all YfFieldServiceVisit records with automatic pagination
|
|
136
|
+
*/
|
|
137
|
+
searchAll(params) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params);
|
|
140
|
+
return result.records.map((r) => new YfFieldServiceVisitRecord_1.YfFieldServiceVisitRecord(r, this._provider));
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Async generator for paginating through all matching records.
|
|
145
|
+
* Yields batches of wrapped records.
|
|
146
|
+
*/
|
|
147
|
+
paginate(params) {
|
|
148
|
+
var _a;
|
|
149
|
+
return __asyncGenerator(this, arguments, function* paginate_1() {
|
|
150
|
+
let hasMore = true;
|
|
151
|
+
let searchAfter;
|
|
152
|
+
const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
|
|
153
|
+
while (hasMore) {
|
|
154
|
+
const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) })));
|
|
155
|
+
if (result.records.length > 0) {
|
|
156
|
+
yield yield __await(result.records.map((r) => new YfFieldServiceVisitRecord_1.YfFieldServiceVisitRecord(r, this._provider)));
|
|
157
|
+
const lastRecord = result.records[result.records.length - 1];
|
|
158
|
+
searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
|
|
159
|
+
}
|
|
160
|
+
hasMore = result.hasMore && result.records.length >= query.pageSize;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// ============================================
|
|
165
|
+
// QUERY BUILDER
|
|
166
|
+
// ============================================
|
|
167
|
+
/**
|
|
168
|
+
* Create a fluent query builder for YfFieldServiceVisit records
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* const results = await accessor
|
|
173
|
+
* .query()
|
|
174
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
175
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
176
|
+
* .select('id', 'title', 'properties.*')
|
|
177
|
+
* .sortBy('createdAt', 'desc')
|
|
178
|
+
* .limit(100)
|
|
179
|
+
* .execute();
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
query() {
|
|
183
|
+
return (0, query_builder_1.createQueryBuilder)(this);
|
|
184
|
+
}
|
|
185
|
+
/** Access the underlying ApiProvider */
|
|
186
|
+
get provider() {
|
|
187
|
+
return this._provider;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.YfFieldServiceVisitAccessor = YfFieldServiceVisitAccessor;
|
|
@@ -110,3 +110,4 @@ export { VoiceConfigurationAccessor, VoiceConfigurationSearchResponse, VoiceConf
|
|
|
110
110
|
export { WayleaveAuditAccessor, WayleaveAuditSearchResponse, WayleaveAuditListResponse } from './WayleaveAuditAccessor';
|
|
111
111
|
export { WorkOrderAccessor, WorkOrderSearchResponse, WorkOrderListResponse } from './WorkOrderAccessor';
|
|
112
112
|
export { WorkOrderStatusUpdateAccessor, WorkOrderStatusUpdateSearchResponse, WorkOrderStatusUpdateListResponse } from './WorkOrderStatusUpdateAccessor';
|
|
113
|
+
export { YfFieldServiceVisitAccessor, YfFieldServiceVisitSearchResponse, YfFieldServiceVisitListResponse } from './YfFieldServiceVisitAccessor';
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.OfferTemplateAccessor = exports.OfferAccessor = exports.NoteAccessor = exports.NetworkDeviceAccessor = exports.MessageAccessor = exports.LeadAccessor = exports.KnowledgeArticleAccessor = exports.InvoiceAccessor = exports.InvoiceItemAccessor = exports.ImpersonationTrackerAccessor = exports.FileAccessor = exports.FieldServiceProductAccessor = exports.FieldServiceDispatchedProductAccessor = exports.ExchangeAccessor = exports.EmailTemplateAccessor = exports.EmailSenderAccessor = exports.EmailAccessor = exports.DiscountAccessor = exports.CustomerPhonePortingAccessor = exports.CustomerDeviceRouterAccessor = exports.CustomerDeviceOntAccessor = exports.CustomerDeviceConfigurationAccessor = exports.CustomerDeviceAtaAccessor = exports.CrmDatasetAccessor = exports.CreditNoteAccessor = exports.ConversationAccessor = exports.ContractBuyOutAccessor = exports.ContactAccessor = exports.ContactIdentityAccessor = exports.ConfigAccessor = exports.ChurnRequestAccessor = exports.ChangeReasonAccessor = exports.CaseAccessor = exports.CampaignAccessor = exports.CallTransferAccessor = exports.CallAccessor = exports.CallLegAccessor = exports.CallEventAccessor = exports.BrskEntityMigrationErrorAccessor = exports.BngProvisionAccessor = exports.BillingRequestAccessor = exports.BillingAdjustmentAccessor = exports.AppointmentAccessor = exports.AffiliateCodeAccessor = exports.AddressAccessor = exports.AddressInteractionAccessor = exports.ActivityAccessor = exports.ActivityLogAccessor = exports.AccountAccessor = exports.AccountCreditAccessor = void 0;
|
|
12
12
|
exports.VisitAccessor = exports.UserAccessor = exports.UgExternalAuditAccessor = exports.TwilioUserUpdateAccessor = exports.TwilioTaskQueueAccessor = exports.TransactionAccessor = exports.TimeSlotAccessor = exports.TeamAccessor = exports.SmsMessageAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormAccessor = exports.ServiceAccessor = exports.ServiceAppointmentAccessor = exports.ServiceAppointmentConfigAccessor = exports.ScheduleSlotAccessor = exports.SalesTerritoryAccessor = exports.RewardAccessor = exports.ReturnsAccessor = exports.RemediationRequiredReasonAccessor = exports.RemediationOutcomeFormAccessor = exports.RegionAccessor = exports.ReferralAccessor = exports.PushNotificationAccessor = exports.ProductAccessor = exports.PriceBookAccessor = exports.PgWebhookAccessor = exports.PgWebhookAttemptAccessor = exports.PgVocalinkAccessor = exports.PgTransactionAccessor = exports.PgSortCodeSubstitutionAccessor = exports.PgPaymentMethodAccessor = exports.PgLogAccessor = exports.PgFileAllocationAccessor = exports.PgDisputeAccessor = exports.PgDirectDebitFileAccessor = exports.PgContactAccessor = exports.PgAccountValidationAccessor = exports.PermissionToFailAccessor = exports.PaymentAccessor = exports.PaymentMethodRefundAccessor = exports.PaymentMethodAccessor = exports.PICRequestAccessor = exports.OverlayRealA55Accessor = exports.OutageAccessor = exports.OrderAccessor = exports.OrderKciAccessor = exports.OrderItemAccessor = exports.OrderCheckAccessor = exports.OntReplacementApprovalAccessor = exports.OneTouchSwitchAccessor = exports.OhExternalAuditAccessor = void 0;
|
|
13
|
-
exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = void 0;
|
|
13
|
+
exports.YfFieldServiceVisitAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = void 0;
|
|
14
14
|
var AccountCreditAccessor_1 = require("./AccountCreditAccessor");
|
|
15
15
|
Object.defineProperty(exports, "AccountCreditAccessor", { enumerable: true, get: function () { return AccountCreditAccessor_1.AccountCreditAccessor; } });
|
|
16
16
|
var AccountAccessor_1 = require("./AccountAccessor");
|
|
@@ -219,3 +219,5 @@ var WorkOrderAccessor_1 = require("./WorkOrderAccessor");
|
|
|
219
219
|
Object.defineProperty(exports, "WorkOrderAccessor", { enumerable: true, get: function () { return WorkOrderAccessor_1.WorkOrderAccessor; } });
|
|
220
220
|
var WorkOrderStatusUpdateAccessor_1 = require("./WorkOrderStatusUpdateAccessor");
|
|
221
221
|
Object.defineProperty(exports, "WorkOrderStatusUpdateAccessor", { enumerable: true, get: function () { return WorkOrderStatusUpdateAccessor_1.WorkOrderStatusUpdateAccessor; } });
|
|
222
|
+
var YfFieldServiceVisitAccessor_1 = require("./YfFieldServiceVisitAccessor");
|
|
223
|
+
Object.defineProperty(exports, "YfFieldServiceVisitAccessor", { enumerable: true, get: function () { return YfFieldServiceVisitAccessor_1.YfFieldServiceVisitAccessor; } });
|