@d19n/youfibre-odin-sdk 2.0.170 → 2.0.172
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 +2 -1
- package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallBusyDto.d.ts +73 -0
- package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallBusyDto.js +56 -0
- package/dist/actions-v2/UpdateAgentCallLegOnOutboundDialActionDto.d.ts +1 -9
- package/dist/entities-v2/WorkOrder.d.ts +98 -0
- package/dist/entities-v2/WorkOrder.js +2 -0
- package/dist/records-v2/CallLegRecord.d.ts +27 -0
- package/dist/records-v2/CallLegRecord.js +29 -0
- package/dist/records-v2/OfferRecord.d.ts +10 -70
- package/dist/records-v2/OfferRecord.js +17 -116
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -354,7 +354,7 @@ This SDK includes **166** entities across **12** modules.
|
|
|
354
354
|
|
|
355
355
|
## Actions
|
|
356
356
|
|
|
357
|
-
This SDK includes **
|
|
357
|
+
This SDK includes **684** actions.
|
|
358
358
|
|
|
359
359
|
### Action Types
|
|
360
360
|
|
|
@@ -1203,6 +1203,7 @@ This SDK includes **683** actions.
|
|
|
1203
1203
|
| `CreateAgentCallLeg` | CREATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Create.CreateAgentCallLeg |
|
|
1204
1204
|
| `CreateCustomerCallLeg` | CREATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Create.CreateCustomerCallLeg |
|
|
1205
1205
|
| `UpdateAgentCallLegOnIncomingCallAnswered` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallAnswered |
|
|
1206
|
+
| `UpdateAgentCallLegOnIncomingCallBusy` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy |
|
|
1206
1207
|
| `UpdateAgentCallLegOnIncomingCallCanceled` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallCanceled |
|
|
1207
1208
|
| `UpdateAgentCallLegOnIncomingCallCompleted` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallCompleted |
|
|
1208
1209
|
| `UpdateAgentCallLegOnIncomingCallFailed` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallFailed |
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateAgentCallLegOnIncomingCallBusy Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Update agent call leg on incoming call busy
|
|
5
|
+
*
|
|
6
|
+
* @module NotificationModule
|
|
7
|
+
* @entity CallLeg
|
|
8
|
+
* @actionKey UpdateAgentCallLegOnIncomingCallBusy
|
|
9
|
+
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for UpdateAgentCallLegOnIncomingCallBusy updated events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy
|
|
18
|
+
*/
|
|
19
|
+
export interface UpdateAgentCallLegOnIncomingCallBusyMessage extends OdinRecordUpdatedEvent<UpdateAgentCallLegOnIncomingCallBusyDto, UpdateAgentCallLegOnIncomingCallBusyProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for UpdateAgentCallLegOnIncomingCallBusy action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 1
|
|
25
|
+
* @property Optional fields: 0
|
|
26
|
+
*/
|
|
27
|
+
export interface UpdateAgentCallLegOnIncomingCallBusyProperties {
|
|
28
|
+
/**
|
|
29
|
+
* Status
|
|
30
|
+
*
|
|
31
|
+
* Status indicator for CallLeg records. Tracks lifecycle state. Used by Communications team.
|
|
32
|
+
* @type {ENUM}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
Status: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* UpdateAgentCallLegOnIncomingCallBusy
|
|
39
|
+
*
|
|
40
|
+
* Update agent call leg on incoming call busy
|
|
41
|
+
*
|
|
42
|
+
* @actionType UPDATE - Updates an existing CallLeg record
|
|
43
|
+
* @module NotificationModule
|
|
44
|
+
* @entity CallLeg
|
|
45
|
+
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy
|
|
46
|
+
* @permission schema.action.updateagentcalllegonincomingcallbusy.trigger
|
|
47
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
48
|
+
*/
|
|
49
|
+
export declare class UpdateAgentCallLegOnIncomingCallBusyDto extends OdinRecordUpdateDto<UpdateAgentCallLegOnIncomingCallBusyProperties> {
|
|
50
|
+
/** Used by SDK generators to identify action type */
|
|
51
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
52
|
+
static readonly ACTION_KEY = "UpdateAgentCallLegOnIncomingCallBusy";
|
|
53
|
+
static readonly MODULE_NAME = "NotificationModule";
|
|
54
|
+
static readonly ENTITIES: string[];
|
|
55
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy";
|
|
56
|
+
static readonly PERMISSION = "schema.action.updateagentcalllegonincomingcallbusy.trigger";
|
|
57
|
+
/** Step metadata - entity this action targets */
|
|
58
|
+
static readonly STEP_ENTITY = "NotificationModule:CallLeg";
|
|
59
|
+
static readonly STEP_SCHEMA_ID = "75c59745-35fb-44b9-b3f2-7563101fdcec";
|
|
60
|
+
static readonly STEP_SCHEMA_ACTION_ID = "b687ff30-abff-4475-a083-c62a1b4c42fa";
|
|
61
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
62
|
+
readonly actionName: string;
|
|
63
|
+
readonly schemaActionId: string;
|
|
64
|
+
readonly entity: string;
|
|
65
|
+
constructor(record: OdinRecord<any> | {
|
|
66
|
+
id: string;
|
|
67
|
+
entity: string;
|
|
68
|
+
type?: string;
|
|
69
|
+
}, properties: UpdateAgentCallLegOnIncomingCallBusyProperties, options?: {
|
|
70
|
+
journeyId?: string;
|
|
71
|
+
stageKey?: string;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateAgentCallLegOnIncomingCallBusy Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Update agent call leg on incoming call busy
|
|
6
|
+
*
|
|
7
|
+
* @module NotificationModule
|
|
8
|
+
* @entity CallLeg
|
|
9
|
+
* @actionKey UpdateAgentCallLegOnIncomingCallBusy
|
|
10
|
+
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UpdateAgentCallLegOnIncomingCallBusyDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* UpdateAgentCallLegOnIncomingCallBusy
|
|
19
|
+
*
|
|
20
|
+
* Update agent call leg on incoming call busy
|
|
21
|
+
*
|
|
22
|
+
* @actionType UPDATE - Updates an existing CallLeg record
|
|
23
|
+
* @module NotificationModule
|
|
24
|
+
* @entity CallLeg
|
|
25
|
+
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy
|
|
26
|
+
* @permission schema.action.updateagentcalllegonincomingcallbusy.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class UpdateAgentCallLegOnIncomingCallBusyDto extends core_1.OdinRecordUpdateDto {
|
|
30
|
+
constructor(record, properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
id: record.id,
|
|
33
|
+
entity: record.entity,
|
|
34
|
+
type: record.type,
|
|
35
|
+
properties,
|
|
36
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
37
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'UpdateAgentCallLegOnIncomingCallBusy';
|
|
40
|
+
this.schemaActionId = 'b687ff30-abff-4475-a083-c62a1b4c42fa';
|
|
41
|
+
this.entity = 'NotificationModule:CallLeg';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateAgentCallLegOnIncomingCallBusyDto = UpdateAgentCallLegOnIncomingCallBusyDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.ACTION_KEY = 'UpdateAgentCallLegOnIncomingCallBusy';
|
|
48
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.MODULE_NAME = 'NotificationModule';
|
|
49
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.ENTITIES = ['CallLeg'];
|
|
50
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallBusy';
|
|
51
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.PERMISSION = 'schema.action.updateagentcalllegonincomingcallbusy.trigger';
|
|
52
|
+
/** Step metadata - entity this action targets */
|
|
53
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.STEP_ENTITY = 'NotificationModule:CallLeg';
|
|
54
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.STEP_SCHEMA_ID = '75c59745-35fb-44b9-b3f2-7563101fdcec';
|
|
55
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.STEP_SCHEMA_ACTION_ID = 'b687ff30-abff-4475-a083-c62a1b4c42fa';
|
|
56
|
+
UpdateAgentCallLegOnIncomingCallBusyDto.AUTO_LINK_PARENT = false;
|
|
@@ -21,18 +21,10 @@ export interface UpdateAgentCallLegOnOutboundDialActionMessage extends OdinRecor
|
|
|
21
21
|
/**
|
|
22
22
|
* Properties for UpdateAgentCallLegOnOutboundDialAction action
|
|
23
23
|
*
|
|
24
|
-
* @property Required fields:
|
|
24
|
+
* @property Required fields: 1
|
|
25
25
|
* @property Optional fields: 1
|
|
26
26
|
*/
|
|
27
27
|
export interface UpdateAgentCallLegOnOutboundDialActionProperties {
|
|
28
|
-
/**
|
|
29
|
-
* EndedAt
|
|
30
|
-
*
|
|
31
|
-
* Data field for CallLeg records. Used by Communications team.
|
|
32
|
-
* @type {DATE_TIME}
|
|
33
|
-
* @required
|
|
34
|
-
*/
|
|
35
|
-
EndedAt: string;
|
|
36
28
|
/**
|
|
37
29
|
* Status
|
|
38
30
|
*
|
|
@@ -1498,6 +1498,8 @@ export declare enum WorkOrderPropertyKeys {
|
|
|
1498
1498
|
OrderId = "OrderId",
|
|
1499
1499
|
/** Contact information field for WorkOrder. Used by Field Operations team for communication. */
|
|
1500
1500
|
AlternativeAddressPostCode = "AlternativeAddressPostCode",
|
|
1501
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency. */
|
|
1502
|
+
RescheduledCount = "RescheduledCount",
|
|
1501
1503
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis. */
|
|
1502
1504
|
ScheduledForDate = "ScheduledForDate",
|
|
1503
1505
|
/** Deprecated. replaced by native entity types (Field Operations - WorkOrder) */
|
|
@@ -2234,6 +2236,12 @@ export interface WorkOrderProperties {
|
|
|
2234
2236
|
* @type {TEXT}
|
|
2235
2237
|
*/
|
|
2236
2238
|
AlternativeAddressPostCode: string;
|
|
2239
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
2240
|
+
*
|
|
2241
|
+
* @type {NUMBER}
|
|
2242
|
+
* @default
|
|
2243
|
+
*/
|
|
2244
|
+
RescheduledCount: number;
|
|
2237
2245
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
2238
2246
|
*
|
|
2239
2247
|
* @type {DATE}
|
|
@@ -2978,6 +2986,12 @@ export interface CollectionWorkOrderProperties {
|
|
|
2978
2986
|
* @type {TEXT}
|
|
2979
2987
|
*/
|
|
2980
2988
|
AlternativeAddressPostCode: string;
|
|
2989
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
2990
|
+
*
|
|
2991
|
+
* @type {NUMBER}
|
|
2992
|
+
* @default
|
|
2993
|
+
*/
|
|
2994
|
+
RescheduledCount: number;
|
|
2981
2995
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
2982
2996
|
*
|
|
2983
2997
|
* @type {DATE}
|
|
@@ -3722,6 +3736,12 @@ export interface CollectionAmcoWorkOrderProperties {
|
|
|
3722
3736
|
* @type {TEXT}
|
|
3723
3737
|
*/
|
|
3724
3738
|
AlternativeAddressPostCode: string;
|
|
3739
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
3740
|
+
*
|
|
3741
|
+
* @type {NUMBER}
|
|
3742
|
+
* @default
|
|
3743
|
+
*/
|
|
3744
|
+
RescheduledCount: number;
|
|
3725
3745
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
3726
3746
|
*
|
|
3727
3747
|
* @type {DATE}
|
|
@@ -4466,6 +4486,12 @@ export interface DispatchAmcoWorkOrderProperties {
|
|
|
4466
4486
|
* @type {TEXT}
|
|
4467
4487
|
*/
|
|
4468
4488
|
AlternativeAddressPostCode: string;
|
|
4489
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
4490
|
+
*
|
|
4491
|
+
* @type {NUMBER}
|
|
4492
|
+
* @default
|
|
4493
|
+
*/
|
|
4494
|
+
RescheduledCount: number;
|
|
4469
4495
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
4470
4496
|
*
|
|
4471
4497
|
* @type {DATE}
|
|
@@ -5210,6 +5236,12 @@ export interface FinanceWorkOrderProperties {
|
|
|
5210
5236
|
* @type {TEXT}
|
|
5211
5237
|
*/
|
|
5212
5238
|
AlternativeAddressPostCode: string;
|
|
5239
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
5240
|
+
*
|
|
5241
|
+
* @type {NUMBER}
|
|
5242
|
+
* @default
|
|
5243
|
+
*/
|
|
5244
|
+
RescheduledCount: number;
|
|
5213
5245
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
5214
5246
|
*
|
|
5215
5247
|
* @type {DATE}
|
|
@@ -5954,6 +5986,12 @@ export interface InspectionWorkOrderProperties {
|
|
|
5954
5986
|
* @type {TEXT}
|
|
5955
5987
|
*/
|
|
5956
5988
|
AlternativeAddressPostCode: string;
|
|
5989
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
5990
|
+
*
|
|
5991
|
+
* @type {NUMBER}
|
|
5992
|
+
* @default
|
|
5993
|
+
*/
|
|
5994
|
+
RescheduledCount: number;
|
|
5957
5995
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
5958
5996
|
*
|
|
5959
5997
|
* @type {DATE}
|
|
@@ -6698,6 +6736,12 @@ export interface InstallWorkOrderProperties {
|
|
|
6698
6736
|
* @type {TEXT}
|
|
6699
6737
|
*/
|
|
6700
6738
|
AlternativeAddressPostCode: string;
|
|
6739
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
6740
|
+
*
|
|
6741
|
+
* @type {NUMBER}
|
|
6742
|
+
* @default
|
|
6743
|
+
*/
|
|
6744
|
+
RescheduledCount: number;
|
|
6701
6745
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
6702
6746
|
*
|
|
6703
6747
|
* @type {DATE}
|
|
@@ -7442,6 +7486,12 @@ export interface InstallBusinessWorkOrderProperties {
|
|
|
7442
7486
|
* @type {TEXT}
|
|
7443
7487
|
*/
|
|
7444
7488
|
AlternativeAddressPostCode: string;
|
|
7489
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
7490
|
+
*
|
|
7491
|
+
* @type {NUMBER}
|
|
7492
|
+
* @default
|
|
7493
|
+
*/
|
|
7494
|
+
RescheduledCount: number;
|
|
7445
7495
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
7446
7496
|
*
|
|
7447
7497
|
* @type {DATE}
|
|
@@ -8186,6 +8236,12 @@ export interface InstallServiceWorkOrderProperties {
|
|
|
8186
8236
|
* @type {TEXT}
|
|
8187
8237
|
*/
|
|
8188
8238
|
AlternativeAddressPostCode: string;
|
|
8239
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
8240
|
+
*
|
|
8241
|
+
* @type {NUMBER}
|
|
8242
|
+
* @default
|
|
8243
|
+
*/
|
|
8244
|
+
RescheduledCount: number;
|
|
8189
8245
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
8190
8246
|
*
|
|
8191
8247
|
* @type {DATE}
|
|
@@ -8930,6 +8986,12 @@ export interface NetworkAdjustmentWorkOrderProperties {
|
|
|
8930
8986
|
* @type {TEXT}
|
|
8931
8987
|
*/
|
|
8932
8988
|
AlternativeAddressPostCode: string;
|
|
8989
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
8990
|
+
*
|
|
8991
|
+
* @type {NUMBER}
|
|
8992
|
+
* @default
|
|
8993
|
+
*/
|
|
8994
|
+
RescheduledCount: number;
|
|
8933
8995
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
8934
8996
|
*
|
|
8935
8997
|
* @type {DATE}
|
|
@@ -9674,6 +9736,12 @@ export interface PlanningWorkOrderProperties {
|
|
|
9674
9736
|
* @type {TEXT}
|
|
9675
9737
|
*/
|
|
9676
9738
|
AlternativeAddressPostCode: string;
|
|
9739
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
9740
|
+
*
|
|
9741
|
+
* @type {NUMBER}
|
|
9742
|
+
* @default
|
|
9743
|
+
*/
|
|
9744
|
+
RescheduledCount: number;
|
|
9677
9745
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
9678
9746
|
*
|
|
9679
9747
|
* @type {DATE}
|
|
@@ -10418,6 +10486,12 @@ export interface PrePullWorkOrderProperties {
|
|
|
10418
10486
|
* @type {TEXT}
|
|
10419
10487
|
*/
|
|
10420
10488
|
AlternativeAddressPostCode: string;
|
|
10489
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
10490
|
+
*
|
|
10491
|
+
* @type {NUMBER}
|
|
10492
|
+
* @default
|
|
10493
|
+
*/
|
|
10494
|
+
RescheduledCount: number;
|
|
10421
10495
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
10422
10496
|
*
|
|
10423
10497
|
* @type {DATE}
|
|
@@ -11162,6 +11236,12 @@ export interface RemediationWorkOrderProperties {
|
|
|
11162
11236
|
* @type {TEXT}
|
|
11163
11237
|
*/
|
|
11164
11238
|
AlternativeAddressPostCode: string;
|
|
11239
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
11240
|
+
*
|
|
11241
|
+
* @type {NUMBER}
|
|
11242
|
+
* @default
|
|
11243
|
+
*/
|
|
11244
|
+
RescheduledCount: number;
|
|
11165
11245
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
11166
11246
|
*
|
|
11167
11247
|
* @type {DATE}
|
|
@@ -11906,6 +11986,12 @@ export interface ReplacementAmcoWorkOrderProperties {
|
|
|
11906
11986
|
* @type {TEXT}
|
|
11907
11987
|
*/
|
|
11908
11988
|
AlternativeAddressPostCode: string;
|
|
11989
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
11990
|
+
*
|
|
11991
|
+
* @type {NUMBER}
|
|
11992
|
+
* @default
|
|
11993
|
+
*/
|
|
11994
|
+
RescheduledCount: number;
|
|
11909
11995
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
11910
11996
|
*
|
|
11911
11997
|
* @type {DATE}
|
|
@@ -12650,6 +12736,12 @@ export interface ServiceWorkOrderProperties {
|
|
|
12650
12736
|
* @type {TEXT}
|
|
12651
12737
|
*/
|
|
12652
12738
|
AlternativeAddressPostCode: string;
|
|
12739
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
12740
|
+
*
|
|
12741
|
+
* @type {NUMBER}
|
|
12742
|
+
* @default
|
|
12743
|
+
*/
|
|
12744
|
+
RescheduledCount: number;
|
|
12653
12745
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
12654
12746
|
*
|
|
12655
12747
|
* @type {DATE}
|
|
@@ -13394,6 +13486,12 @@ export interface WayleaveWorkOrderProperties {
|
|
|
13394
13486
|
* @type {TEXT}
|
|
13395
13487
|
*/
|
|
13396
13488
|
AlternativeAddressPostCode: string;
|
|
13489
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency.
|
|
13490
|
+
*
|
|
13491
|
+
* @type {NUMBER}
|
|
13492
|
+
* @default
|
|
13493
|
+
*/
|
|
13494
|
+
RescheduledCount: number;
|
|
13397
13495
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis.
|
|
13398
13496
|
*
|
|
13399
13497
|
* @type {DATE}
|
|
@@ -1501,6 +1501,8 @@ var WorkOrderPropertyKeys;
|
|
|
1501
1501
|
WorkOrderPropertyKeys["OrderId"] = "OrderId";
|
|
1502
1502
|
/** Contact information field for WorkOrder. Used by Field Operations team for communication. */
|
|
1503
1503
|
WorkOrderPropertyKeys["AlternativeAddressPostCode"] = "AlternativeAddressPostCode";
|
|
1504
|
+
/** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency. */
|
|
1505
|
+
WorkOrderPropertyKeys["RescheduledCount"] = "RescheduledCount";
|
|
1504
1506
|
/** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis. */
|
|
1505
1507
|
WorkOrderPropertyKeys["ScheduledForDate"] = "ScheduledForDate";
|
|
1506
1508
|
/** Deprecated. replaced by native entity types (Field Operations - WorkOrder) */
|
|
@@ -26,6 +26,7 @@ import { CallLegProperties } from '../entities-v2/CallLeg';
|
|
|
26
26
|
import { CreateAgentCallLegProperties } from '../actions-v2/CreateAgentCallLegDto';
|
|
27
27
|
import { CreateCustomerCallLegProperties } from '../actions-v2/CreateCustomerCallLegDto';
|
|
28
28
|
import { UpdateAgentCallLegOnIncomingCallAnsweredProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallAnsweredDto';
|
|
29
|
+
import { UpdateAgentCallLegOnIncomingCallBusyProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallBusyDto';
|
|
29
30
|
import { UpdateAgentCallLegOnIncomingCallCanceledProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallCanceledDto';
|
|
30
31
|
import { UpdateAgentCallLegOnIncomingCallCompletedProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallCompletedDto';
|
|
31
32
|
import { UpdateAgentCallLegOnIncomingCallFailedProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallFailedDto';
|
|
@@ -293,6 +294,32 @@ export declare class CallLegRecord<TProps = CallLegProperties> {
|
|
|
293
294
|
journeyId?: string;
|
|
294
295
|
stageKey?: string;
|
|
295
296
|
}): ActionBuilder;
|
|
297
|
+
/**
|
|
298
|
+
* UpdateAgentCallLegOnIncomingCallBusy
|
|
299
|
+
*
|
|
300
|
+
* Updates this CallLeg record with the specified properties.
|
|
301
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
302
|
+
*
|
|
303
|
+
* @param properties - Required properties for this action
|
|
304
|
+
* @param options - Optional settings
|
|
305
|
+
* @param options.journeyId - Associate with a journey
|
|
306
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
307
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
308
|
+
* @throws Error if called on a new (unsaved) record
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```typescript
|
|
312
|
+
* const record = await odinClient.callLegs.get(id);
|
|
313
|
+
* await record.updateAgentCallLegOnIncomingCallBusy({ ... }).execute();
|
|
314
|
+
*
|
|
315
|
+
* // Dry run (for debugging)
|
|
316
|
+
* const payload = record.updateAgentCallLegOnIncomingCallBusy({ ... }).dryRun();
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
updateAgentCallLegOnIncomingCallBusy(properties: UpdateAgentCallLegOnIncomingCallBusyProperties, options?: {
|
|
320
|
+
journeyId?: string;
|
|
321
|
+
stageKey?: string;
|
|
322
|
+
}): ActionBuilder;
|
|
296
323
|
/**
|
|
297
324
|
* UpdateAgentCallLegOnIncomingCallCanceled
|
|
298
325
|
*
|
|
@@ -365,6 +365,35 @@ class CallLegRecord {
|
|
|
365
365
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAgentCallLegOnIncomingCallAnswered', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
366
366
|
return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
|
|
367
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* UpdateAgentCallLegOnIncomingCallBusy
|
|
370
|
+
*
|
|
371
|
+
* Updates this CallLeg record with the specified properties.
|
|
372
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
373
|
+
*
|
|
374
|
+
* @param properties - Required properties for this action
|
|
375
|
+
* @param options - Optional settings
|
|
376
|
+
* @param options.journeyId - Associate with a journey
|
|
377
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
378
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
379
|
+
* @throws Error if called on a new (unsaved) record
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* ```typescript
|
|
383
|
+
* const record = await odinClient.callLegs.get(id);
|
|
384
|
+
* await record.updateAgentCallLegOnIncomingCallBusy({ ... }).execute();
|
|
385
|
+
*
|
|
386
|
+
* // Dry run (for debugging)
|
|
387
|
+
* const payload = record.updateAgentCallLegOnIncomingCallBusy({ ... }).dryRun();
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
updateAgentCallLegOnIncomingCallBusy(properties, options) {
|
|
391
|
+
var _a;
|
|
392
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
393
|
+
throw new Error('updateAgentCallLegOnIncomingCallBusy requires an existing record. Use accessor.get() first.');
|
|
394
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAgentCallLegOnIncomingCallBusy', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
395
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
|
|
396
|
+
}
|
|
368
397
|
/**
|
|
369
398
|
* UpdateAgentCallLegOnIncomingCallCanceled
|
|
370
399
|
*
|
|
@@ -25,11 +25,8 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { OfferProperties, RecontractOfferProperties, StandardOfferProperties } from '../entities-v2/Offer';
|
|
26
26
|
import { OfferCreateProperties } from '../actions-v2/OfferCreateDto';
|
|
27
27
|
import { OfferUpdateProperties } from '../actions-v2/OfferUpdateDto';
|
|
28
|
-
import { LeadRecord } from './LeadRecord';
|
|
29
28
|
import { DiscountRecord } from './DiscountRecord';
|
|
30
|
-
import { OrderItemRecord } from './OrderItemRecord';
|
|
31
29
|
import { ProductRecord } from './ProductRecord';
|
|
32
|
-
import { PriceBookRecord } from './PriceBookRecord';
|
|
33
30
|
/** Valid entity types for Offer */
|
|
34
31
|
export declare type OfferType = 'DEFAULT' | 'RECONTRACT' | 'STANDARD';
|
|
35
32
|
/**
|
|
@@ -95,12 +92,9 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
95
92
|
private _provider;
|
|
96
93
|
private _pendingLinks;
|
|
97
94
|
private _preGeneratedId;
|
|
98
|
-
private
|
|
95
|
+
private _offers?;
|
|
99
96
|
private _discounts?;
|
|
100
|
-
private _orderItems?;
|
|
101
97
|
private _products?;
|
|
102
|
-
private _offers?;
|
|
103
|
-
private _priceBooks?;
|
|
104
98
|
/**
|
|
105
99
|
* Create a record wrapper.
|
|
106
100
|
* @param record - The underlying record, or null for create operations
|
|
@@ -174,24 +168,24 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
174
168
|
* @remarks STANDARD
|
|
175
169
|
*/
|
|
176
170
|
isStandard(): this is OfferRecord<StandardOfferProperties>;
|
|
177
|
-
/** Valid labels for
|
|
178
|
-
static readonly
|
|
171
|
+
/** Valid labels for Offer associations */
|
|
172
|
+
static readonly offersLabels: readonly ["Lead__Offer", "OrderItem__Offer", "Offer__Offer", "PriceBook__Offer"];
|
|
179
173
|
/**
|
|
180
|
-
* Access linked
|
|
181
|
-
* @remarks Available labels: Lead__Offer
|
|
174
|
+
* Access linked Offer records
|
|
175
|
+
* @remarks Available labels: Lead__Offer, OrderItem__Offer, Offer__Offer, PriceBook__Offer
|
|
182
176
|
* @throws Error if called on a new (unsaved) record
|
|
183
177
|
*
|
|
184
178
|
* @example
|
|
185
179
|
* ```typescript
|
|
186
|
-
* // Get all linked
|
|
187
|
-
* const items = await record.
|
|
188
|
-
* const first = await record.
|
|
180
|
+
* // Get all linked Offer records
|
|
181
|
+
* const items = await record.offers.list();
|
|
182
|
+
* const first = await record.offers.first();
|
|
189
183
|
*
|
|
190
184
|
* // Filter by label
|
|
191
|
-
* const specific = await record.
|
|
185
|
+
* const specific = await record.offers.first({ label: 'Lead__Offer' });
|
|
192
186
|
* ```
|
|
193
187
|
*/
|
|
194
|
-
get
|
|
188
|
+
get offers(): RecordLinkManager<OfferRecord, typeof OfferRecord['offersLabels'][number]>;
|
|
195
189
|
/** Valid labels for Discount associations */
|
|
196
190
|
static readonly discountsLabels: readonly ["Offer__Discount"];
|
|
197
191
|
/**
|
|
@@ -210,24 +204,6 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
210
204
|
* ```
|
|
211
205
|
*/
|
|
212
206
|
get discounts(): RecordLinkManager<DiscountRecord, typeof OfferRecord['discountsLabels'][number]>;
|
|
213
|
-
/** Valid labels for OrderItem associations */
|
|
214
|
-
static readonly orderItemsLabels: readonly ["OrderItem__Offer"];
|
|
215
|
-
/**
|
|
216
|
-
* Access linked OrderItem records
|
|
217
|
-
* @remarks Available labels: OrderItem__Offer
|
|
218
|
-
* @throws Error if called on a new (unsaved) record
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* ```typescript
|
|
222
|
-
* // Get all linked OrderItem records
|
|
223
|
-
* const items = await record.orderItems.list();
|
|
224
|
-
* const first = await record.orderItems.first();
|
|
225
|
-
*
|
|
226
|
-
* // Filter by label
|
|
227
|
-
* const specific = await record.orderItems.first({ label: 'OrderItem__Offer' });
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
|
-
get orderItems(): RecordLinkManager<OrderItemRecord, typeof OfferRecord['orderItemsLabels'][number]>;
|
|
231
207
|
/** Valid labels for Product associations */
|
|
232
208
|
static readonly productsLabels: readonly ["Offer__Product"];
|
|
233
209
|
/**
|
|
@@ -246,42 +222,6 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
246
222
|
* ```
|
|
247
223
|
*/
|
|
248
224
|
get products(): RecordLinkManager<ProductRecord, typeof OfferRecord['productsLabels'][number]>;
|
|
249
|
-
/** Valid labels for Offer associations */
|
|
250
|
-
static readonly offersLabels: readonly ["Offer__Offer"];
|
|
251
|
-
/**
|
|
252
|
-
* Access linked Offer records
|
|
253
|
-
* @remarks Available labels: Offer__Offer
|
|
254
|
-
* @throws Error if called on a new (unsaved) record
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
* ```typescript
|
|
258
|
-
* // Get all linked Offer records
|
|
259
|
-
* const items = await record.offers.list();
|
|
260
|
-
* const first = await record.offers.first();
|
|
261
|
-
*
|
|
262
|
-
* // Filter by label
|
|
263
|
-
* const specific = await record.offers.first({ label: 'Offer__Offer' });
|
|
264
|
-
* ```
|
|
265
|
-
*/
|
|
266
|
-
get offers(): RecordLinkManager<OfferRecord, typeof OfferRecord['offersLabels'][number]>;
|
|
267
|
-
/** Valid labels for PriceBook associations */
|
|
268
|
-
static readonly priceBooksLabels: readonly ["PriceBook__Offer"];
|
|
269
|
-
/**
|
|
270
|
-
* Access linked PriceBook records
|
|
271
|
-
* @remarks Available labels: PriceBook__Offer
|
|
272
|
-
* @throws Error if called on a new (unsaved) record
|
|
273
|
-
*
|
|
274
|
-
* @example
|
|
275
|
-
* ```typescript
|
|
276
|
-
* // Get all linked PriceBook records
|
|
277
|
-
* const items = await record.priceBooks.list();
|
|
278
|
-
* const first = await record.priceBooks.first();
|
|
279
|
-
*
|
|
280
|
-
* // Filter by label
|
|
281
|
-
* const specific = await record.priceBooks.first({ label: 'PriceBook__Offer' });
|
|
282
|
-
* ```
|
|
283
|
-
*/
|
|
284
|
-
get priceBooks(): RecordLinkManager<PriceBookRecord, typeof OfferRecord['priceBooksLabels'][number]>;
|
|
285
225
|
/**
|
|
286
226
|
* Queue a link to be created with the next action.
|
|
287
227
|
* Works for both create and update actions.
|
|
@@ -32,11 +32,8 @@ exports.isOfferRecord = exports.OfferRecord = void 0;
|
|
|
32
32
|
const uuid_1 = require("uuid");
|
|
33
33
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
34
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
35
|
-
const LeadRecord_1 = require("./LeadRecord");
|
|
36
35
|
const DiscountRecord_1 = require("./DiscountRecord");
|
|
37
|
-
const OrderItemRecord_1 = require("./OrderItemRecord");
|
|
38
36
|
const ProductRecord_1 = require("./ProductRecord");
|
|
39
|
-
const PriceBookRecord_1 = require("./PriceBookRecord");
|
|
40
37
|
/**
|
|
41
38
|
* Builder for action execution with dryRun support
|
|
42
39
|
*
|
|
@@ -199,34 +196,34 @@ class OfferRecord {
|
|
|
199
196
|
*/
|
|
200
197
|
isStandard() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'STANDARD'; }
|
|
201
198
|
/**
|
|
202
|
-
* Access linked
|
|
203
|
-
* @remarks Available labels: Lead__Offer
|
|
199
|
+
* Access linked Offer records
|
|
200
|
+
* @remarks Available labels: Lead__Offer, OrderItem__Offer, Offer__Offer, PriceBook__Offer
|
|
204
201
|
* @throws Error if called on a new (unsaved) record
|
|
205
202
|
*
|
|
206
203
|
* @example
|
|
207
204
|
* ```typescript
|
|
208
|
-
* // Get all linked
|
|
209
|
-
* const items = await record.
|
|
210
|
-
* const first = await record.
|
|
205
|
+
* // Get all linked Offer records
|
|
206
|
+
* const items = await record.offers.list();
|
|
207
|
+
* const first = await record.offers.first();
|
|
211
208
|
*
|
|
212
209
|
* // Filter by label
|
|
213
|
-
* const specific = await record.
|
|
210
|
+
* const specific = await record.offers.first({ label: 'Lead__Offer' });
|
|
214
211
|
* ```
|
|
215
212
|
*/
|
|
216
|
-
get
|
|
213
|
+
get offers() {
|
|
217
214
|
var _a;
|
|
218
215
|
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
219
216
|
throw new Error('Cannot access links on a new (unsaved) record');
|
|
220
|
-
if (!this.
|
|
221
|
-
this.
|
|
217
|
+
if (!this._offers) {
|
|
218
|
+
this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
222
219
|
sourceEntity: 'ProductModule:Offer',
|
|
223
|
-
targetEntity: '
|
|
224
|
-
targetModuleName: '
|
|
225
|
-
targetEntityName: '
|
|
226
|
-
labels: ['Lead__Offer'],
|
|
227
|
-
},
|
|
220
|
+
targetEntity: 'ProductModule:Offer',
|
|
221
|
+
targetModuleName: 'ProductModule',
|
|
222
|
+
targetEntityName: 'Offer',
|
|
223
|
+
labels: ['Lead__Offer', 'OrderItem__Offer', 'Offer__Offer', 'PriceBook__Offer'],
|
|
224
|
+
}, OfferRecord);
|
|
228
225
|
}
|
|
229
|
-
return this.
|
|
226
|
+
return this._offers;
|
|
230
227
|
}
|
|
231
228
|
/**
|
|
232
229
|
* Access linked Discount records
|
|
@@ -258,36 +255,6 @@ class OfferRecord {
|
|
|
258
255
|
}
|
|
259
256
|
return this._discounts;
|
|
260
257
|
}
|
|
261
|
-
/**
|
|
262
|
-
* Access linked OrderItem records
|
|
263
|
-
* @remarks Available labels: OrderItem__Offer
|
|
264
|
-
* @throws Error if called on a new (unsaved) record
|
|
265
|
-
*
|
|
266
|
-
* @example
|
|
267
|
-
* ```typescript
|
|
268
|
-
* // Get all linked OrderItem records
|
|
269
|
-
* const items = await record.orderItems.list();
|
|
270
|
-
* const first = await record.orderItems.first();
|
|
271
|
-
*
|
|
272
|
-
* // Filter by label
|
|
273
|
-
* const specific = await record.orderItems.first({ label: 'OrderItem__Offer' });
|
|
274
|
-
* ```
|
|
275
|
-
*/
|
|
276
|
-
get orderItems() {
|
|
277
|
-
var _a;
|
|
278
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
279
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
280
|
-
if (!this._orderItems) {
|
|
281
|
-
this._orderItems = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
282
|
-
sourceEntity: 'ProductModule:Offer',
|
|
283
|
-
targetEntity: 'OrderModule:OrderItem',
|
|
284
|
-
targetModuleName: 'OrderModule',
|
|
285
|
-
targetEntityName: 'OrderItem',
|
|
286
|
-
labels: ['OrderItem__Offer'],
|
|
287
|
-
}, OrderItemRecord_1.OrderItemRecord);
|
|
288
|
-
}
|
|
289
|
-
return this._orderItems;
|
|
290
|
-
}
|
|
291
258
|
/**
|
|
292
259
|
* Access linked Product records
|
|
293
260
|
* @remarks Available labels: Offer__Product
|
|
@@ -318,66 +285,6 @@ class OfferRecord {
|
|
|
318
285
|
}
|
|
319
286
|
return this._products;
|
|
320
287
|
}
|
|
321
|
-
/**
|
|
322
|
-
* Access linked Offer records
|
|
323
|
-
* @remarks Available labels: Offer__Offer
|
|
324
|
-
* @throws Error if called on a new (unsaved) record
|
|
325
|
-
*
|
|
326
|
-
* @example
|
|
327
|
-
* ```typescript
|
|
328
|
-
* // Get all linked Offer records
|
|
329
|
-
* const items = await record.offers.list();
|
|
330
|
-
* const first = await record.offers.first();
|
|
331
|
-
*
|
|
332
|
-
* // Filter by label
|
|
333
|
-
* const specific = await record.offers.first({ label: 'Offer__Offer' });
|
|
334
|
-
* ```
|
|
335
|
-
*/
|
|
336
|
-
get offers() {
|
|
337
|
-
var _a;
|
|
338
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
339
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
340
|
-
if (!this._offers) {
|
|
341
|
-
this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
342
|
-
sourceEntity: 'ProductModule:Offer',
|
|
343
|
-
targetEntity: 'ProductModule:Offer',
|
|
344
|
-
targetModuleName: 'ProductModule',
|
|
345
|
-
targetEntityName: 'Offer',
|
|
346
|
-
labels: ['Offer__Offer'],
|
|
347
|
-
}, OfferRecord);
|
|
348
|
-
}
|
|
349
|
-
return this._offers;
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* Access linked PriceBook records
|
|
353
|
-
* @remarks Available labels: PriceBook__Offer
|
|
354
|
-
* @throws Error if called on a new (unsaved) record
|
|
355
|
-
*
|
|
356
|
-
* @example
|
|
357
|
-
* ```typescript
|
|
358
|
-
* // Get all linked PriceBook records
|
|
359
|
-
* const items = await record.priceBooks.list();
|
|
360
|
-
* const first = await record.priceBooks.first();
|
|
361
|
-
*
|
|
362
|
-
* // Filter by label
|
|
363
|
-
* const specific = await record.priceBooks.first({ label: 'PriceBook__Offer' });
|
|
364
|
-
* ```
|
|
365
|
-
*/
|
|
366
|
-
get priceBooks() {
|
|
367
|
-
var _a;
|
|
368
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
369
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
370
|
-
if (!this._priceBooks) {
|
|
371
|
-
this._priceBooks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
372
|
-
sourceEntity: 'ProductModule:Offer',
|
|
373
|
-
targetEntity: 'ProductModule:PriceBook',
|
|
374
|
-
targetModuleName: 'ProductModule',
|
|
375
|
-
targetEntityName: 'PriceBook',
|
|
376
|
-
labels: ['PriceBook__Offer'],
|
|
377
|
-
}, PriceBookRecord_1.PriceBookRecord);
|
|
378
|
-
}
|
|
379
|
-
return this._priceBooks;
|
|
380
|
-
}
|
|
381
288
|
// ============================================
|
|
382
289
|
// LINK MANAGEMENT
|
|
383
290
|
// ============================================
|
|
@@ -489,18 +396,12 @@ exports.OfferRecord = OfferRecord;
|
|
|
489
396
|
// ============================================
|
|
490
397
|
// TYPED LINK ACCESSORS
|
|
491
398
|
// ============================================
|
|
492
|
-
/** Valid labels for
|
|
493
|
-
OfferRecord.
|
|
399
|
+
/** Valid labels for Offer associations */
|
|
400
|
+
OfferRecord.offersLabels = ['Lead__Offer', 'OrderItem__Offer', 'Offer__Offer', 'PriceBook__Offer'];
|
|
494
401
|
/** Valid labels for Discount associations */
|
|
495
402
|
OfferRecord.discountsLabels = ['Offer__Discount'];
|
|
496
|
-
/** Valid labels for OrderItem associations */
|
|
497
|
-
OfferRecord.orderItemsLabels = ['OrderItem__Offer'];
|
|
498
403
|
/** Valid labels for Product associations */
|
|
499
404
|
OfferRecord.productsLabels = ['Offer__Product'];
|
|
500
|
-
/** Valid labels for Offer associations */
|
|
501
|
-
OfferRecord.offersLabels = ['Offer__Offer'];
|
|
502
|
-
/** Valid labels for PriceBook associations */
|
|
503
|
-
OfferRecord.priceBooksLabels = ['PriceBook__Offer'];
|
|
504
405
|
/** Type guard to check if an object is a OfferRecord */
|
|
505
406
|
function isOfferRecord(obj) {
|
|
506
407
|
return obj instanceof OfferRecord;
|