@d19n/youfibre-odin-sdk 2.0.338 → 2.0.339
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 -2
- package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +1 -1
- package/dist/actions-v2/UpdateAppointmentSalesAppDto.d.ts +129 -0
- package/dist/actions-v2/UpdateAppointmentSalesAppDto.js +56 -0
- package/dist/api-sdk-v2/AiRouteRequestApi.d.ts +45 -0
- package/dist/api-sdk-v2/AiRouteRequestApi.js +151 -0
- package/dist/db-sdk-v2/AiRouteRequestDb.d.ts +117 -0
- package/dist/db-sdk-v2/AiRouteRequestDb.js +200 -0
- package/dist/entities-v2/AiRouteRequest.d.ts +248 -0
- package/dist/entities-v2/AiRouteRequest.js +162 -0
- package/dist/entities-v2/Appointment.d.ts +16 -16
- package/dist/entities-v2/Appointment.js +4 -4
- package/dist/entities-v2/Lead.d.ts +2 -0
- package/dist/entities-v2/Lead.js +2 -0
- package/dist/entities-v2/Order.d.ts +23 -1
- package/dist/entities-v2/Order.js +18 -2
- package/dist/records-v2/AppointmentRecord.d.ts +28 -0
- package/dist/records-v2/AppointmentRecord.js +40 -0
- package/package.json +1 -1
|
@@ -46,8 +46,6 @@ var AppointmentPropertyKeys;
|
|
|
46
46
|
AppointmentPropertyKeys["Longitude"] = "Longitude";
|
|
47
47
|
/** email address (Sales - Appointment) */
|
|
48
48
|
AppointmentPropertyKeys["EmailAddress"] = "EmailAddress";
|
|
49
|
-
/** Contact information field for Appointment. Used by Sales team for communication. */
|
|
50
|
-
AppointmentPropertyKeys["Address"] = "Address";
|
|
51
49
|
/** Reference identifier for Appointment relationships. Used for data integrity. */
|
|
52
50
|
AppointmentPropertyKeys["AddressId"] = "AddressId";
|
|
53
51
|
/** Contact information field for Appointment. Used by Sales team for communication. */
|
|
@@ -58,8 +56,6 @@ var AppointmentPropertyKeys;
|
|
|
58
56
|
AppointmentPropertyKeys["ImportId"] = "ImportId";
|
|
59
57
|
/** Date field for Appointment records. Used by Sales team. */
|
|
60
58
|
AppointmentPropertyKeys["Date"] = "Date";
|
|
61
|
-
/** The title of the appointment (Sales - Appointment) */
|
|
62
|
-
AppointmentPropertyKeys["MeetingTitle"] = "MeetingTitle";
|
|
63
59
|
/** Additional appointment information (Sales - Appointment) */
|
|
64
60
|
AppointmentPropertyKeys["Comment"] = "Comment";
|
|
65
61
|
/** Display name/title for Appointment records. Primary identifier for Sales team. */
|
|
@@ -68,6 +64,10 @@ var AppointmentPropertyKeys;
|
|
|
68
64
|
AppointmentPropertyKeys["LastName"] = "LastName";
|
|
69
65
|
/** Appointment type (Sales - Appointment) */
|
|
70
66
|
AppointmentPropertyKeys["Type"] = "Type";
|
|
67
|
+
/** Contact information field for Appointment. Used by Sales team for communication. */
|
|
68
|
+
AppointmentPropertyKeys["Address"] = "Address";
|
|
69
|
+
/** The title of the appointment (Sales - Appointment) */
|
|
70
|
+
AppointmentPropertyKeys["MeetingTitle"] = "MeetingTitle";
|
|
71
71
|
})(AppointmentPropertyKeys = exports.AppointmentPropertyKeys || (exports.AppointmentPropertyKeys = {}));
|
|
72
72
|
/**
|
|
73
73
|
* Appointment entity from CrmModule
|
|
@@ -78,6 +78,7 @@ export declare enum DefaultLeadStageKeys {
|
|
|
78
78
|
* - `FIELDSALES` - Field sales
|
|
79
79
|
* - `GBVS`
|
|
80
80
|
* - `NETOMNIA` - Netomnia
|
|
81
|
+
* - `ODIN_MOBILE_APP` - Odin Mobile App
|
|
81
82
|
* - `PAN_MONY` - PAN-MONY
|
|
82
83
|
* - `PHONE` - Phone
|
|
83
84
|
* - `REFERRAL` - Referral
|
|
@@ -93,6 +94,7 @@ export declare enum LeadSource {
|
|
|
93
94
|
FIELD_SALES = "FIELDSALES",
|
|
94
95
|
GBVS = "GBVS",
|
|
95
96
|
NETOMNIA = "NETOMNIA",
|
|
97
|
+
ODIN_MOBILE_APP = "ODIN_MOBILE_APP",
|
|
96
98
|
PAN_MONY = "PAN_MONY",
|
|
97
99
|
PHONE = "PHONE",
|
|
98
100
|
REFERRAL = "REFERRAL",
|
package/dist/entities-v2/Lead.js
CHANGED
|
@@ -68,6 +68,7 @@ var DefaultLeadStageKeys;
|
|
|
68
68
|
* - `FIELDSALES` - Field sales
|
|
69
69
|
* - `GBVS`
|
|
70
70
|
* - `NETOMNIA` - Netomnia
|
|
71
|
+
* - `ODIN_MOBILE_APP` - Odin Mobile App
|
|
71
72
|
* - `PAN_MONY` - PAN-MONY
|
|
72
73
|
* - `PHONE` - Phone
|
|
73
74
|
* - `REFERRAL` - Referral
|
|
@@ -84,6 +85,7 @@ var LeadSource;
|
|
|
84
85
|
LeadSource["FIELD_SALES"] = "FIELDSALES";
|
|
85
86
|
LeadSource["GBVS"] = "GBVS";
|
|
86
87
|
LeadSource["NETOMNIA"] = "NETOMNIA";
|
|
88
|
+
LeadSource["ODIN_MOBILE_APP"] = "ODIN_MOBILE_APP";
|
|
87
89
|
LeadSource["PAN_MONY"] = "PAN_MONY";
|
|
88
90
|
LeadSource["PHONE"] = "PHONE";
|
|
89
91
|
LeadSource["REFERRAL"] = "REFERRAL";
|
|
@@ -364,6 +364,19 @@ export declare enum OrderActivationStatus {
|
|
|
364
364
|
PROVISIONING = "PROVISIONING",
|
|
365
365
|
SUSPENDED = "SUSPENDED"
|
|
366
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Valid values for Order.BatteryBackupAnswersSource
|
|
369
|
+
*
|
|
370
|
+
* Front end that last saved the battery backup answers. Set by the customer portal API, copied to the dispatch work order Source by the orders module, then cleared (PORTAPP-3276).
|
|
371
|
+
*
|
|
372
|
+
* @remarks Available options:
|
|
373
|
+
* - `CUSTOMER_APP` - Customer App
|
|
374
|
+
* - `CUSTOMER_PORTAL` - Customer Portal
|
|
375
|
+
*/
|
|
376
|
+
export declare enum OrderBatteryBackupAnswersSource {
|
|
377
|
+
CUSTOMER_APP = "CUSTOMER_APP",
|
|
378
|
+
CUSTOMER_PORTAL = "CUSTOMER_PORTAL"
|
|
379
|
+
}
|
|
367
380
|
/**
|
|
368
381
|
* Property keys for Order
|
|
369
382
|
* Use these constants instead of string literals for type safety
|
|
@@ -576,7 +589,9 @@ export declare enum OrderPropertyKeys {
|
|
|
576
589
|
/** Date the order was recontracted (in place). Discriminator + event date. */
|
|
577
590
|
RecontractDate = "RecontractDate",
|
|
578
591
|
/** status of the order (must be activated for billing) (Sales - Order) */
|
|
579
|
-
ActivationStatus = "ActivationStatus"
|
|
592
|
+
ActivationStatus = "ActivationStatus",
|
|
593
|
+
/** Front end that last saved the battery backup answers. Set by the customer portal API, copied to the dispatch work order Source by the orders module, then cleared (PORTAPP-3276). */
|
|
594
|
+
BatteryBackupAnswersSource = "BatteryBackupAnswersSource"
|
|
580
595
|
}
|
|
581
596
|
/**
|
|
582
597
|
* Properties for Order records
|
|
@@ -1227,6 +1242,13 @@ export interface OrderProperties {
|
|
|
1227
1242
|
* @hidden This field is hidden in the UI
|
|
1228
1243
|
*/
|
|
1229
1244
|
ActivationStatus: OrderActivationStatus;
|
|
1245
|
+
/** Front end that last saved the battery backup answers. Set by the customer portal API, copied to the dispatch work order Source by the orders module, then cleared (PORTAPP-3276).
|
|
1246
|
+
*
|
|
1247
|
+
* @type {ENUM}
|
|
1248
|
+
* @default
|
|
1249
|
+
* @enum {OrderBatteryBackupAnswersSource}
|
|
1250
|
+
*/
|
|
1251
|
+
BatteryBackupAnswersSource: OrderBatteryBackupAnswersSource;
|
|
1230
1252
|
}
|
|
1231
1253
|
/**
|
|
1232
1254
|
* Order entity from OrderModule
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* Generated from Odin schema definition
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.ROUTING_KEY_LINK_ORDER_EMAIL_DELETED = exports.ROUTING_KEY_LINK_ORDER_EMAIL_CREATED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_CREATED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_CREATED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_CREATED = exports.ROUTING_KEY_LINK_ORDER_VISIT_DELETED = exports.ROUTING_KEY_LINK_ORDER_VISIT_CREATED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_DELETED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_CREATED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_DELETED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_CREATED = void 0;
|
|
15
|
+
exports.ROUTING_KEY_LINK_ORDER_APPOINTMENT_CREATED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ROUTER_DELETED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ROUTER_CREATED = exports.ROUTING_KEY_LINK_ORDER_SMS_MESSAGE_DELETED = exports.ROUTING_KEY_LINK_ORDER_SMS_MESSAGE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CREATED = exports.ROUTING_KEY_LINK_ORDER_FILE_DELETED = exports.ROUTING_KEY_LINK_ORDER_FILE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_ITEM_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_ITEM_CREATED = exports.ROUTING_KEY_LINK_ORDER_BILLING_ADJUSTMENT_DELETED = exports.ROUTING_KEY_LINK_ORDER_BILLING_ADJUSTMENT_CREATED = exports.ROUTING_KEY_LINK_ORDER_PUSH_NOTIFICATION_DELETED = exports.ROUTING_KEY_LINK_ORDER_PUSH_NOTIFICATION_CREATED = exports.ROUTING_KEY_LINK_ORDER_DISCOUNT_DELETED = exports.ROUTING_KEY_LINK_ORDER_DISCOUNT_CREATED = exports.ROUTING_KEY_LINK_ORDER_ADDRESS_DELETED = exports.ROUTING_KEY_LINK_ORDER_ADDRESS_CREATED = exports.ROUTING_KEY_LINK_ORDER_PHONE_NUMBER_DELETED = exports.ROUTING_KEY_LINK_ORDER_PHONE_NUMBER_CREATED = exports.ROUTING_KEY_LINK_ORDER_NOTE_DELETED = exports.ROUTING_KEY_LINK_ORDER_NOTE_CREATED = exports.ROUTING_KEY_ORDER_DEFAULT_DELETED = exports.ROUTING_KEY_ORDER_DEFAULT_UPDATED = exports.ROUTING_KEY_ORDER_DEFAULT_CREATED = exports.ROUTING_KEY_ORDER_DELETED = exports.ROUTING_KEY_ORDER_UPDATED = exports.ROUTING_KEY_ORDER_CREATED = exports.Order = exports.OrderPropertyKeys = exports.OrderBatteryBackupAnswersSource = exports.OrderActivationStatus = exports.OrderSupplierOrderType = exports.OrderOtsNotRequiredReason = exports.OrderBatteryPackRequired = exports.OrderMobileCoverage = exports.OrderAltContactMethod = exports.OrderProvider = exports.OrderBillingTerms = exports.OrderDeactivationReason = exports.OrderDiscountType = exports.OrderWithholdCommissionReason = exports.OrderDiscountUnit = exports.OrderTrialUnit = exports.OrderContractType = exports.OrderCurrencyCode = exports.DefaultOrderStageKeys = exports.DefaultOrderStageNames = exports.OrderEntityTypes = void 0;
|
|
16
|
+
exports.ROUTING_KEY_LINK_ORDER_EMAIL_DELETED = exports.ROUTING_KEY_LINK_ORDER_EMAIL_CREATED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_CREATED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_CREATED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_CREATED = exports.ROUTING_KEY_LINK_ORDER_VISIT_DELETED = exports.ROUTING_KEY_LINK_ORDER_VISIT_CREATED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_DELETED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_CREATED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_DELETED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_CREATED = exports.ROUTING_KEY_LINK_ORDER_APPOINTMENT_DELETED = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
18
|
/**
|
|
19
19
|
* Available types for Order records
|
|
@@ -346,6 +346,20 @@ var OrderActivationStatus;
|
|
|
346
346
|
OrderActivationStatus["PROVISIONING"] = "PROVISIONING";
|
|
347
347
|
OrderActivationStatus["SUSPENDED"] = "SUSPENDED";
|
|
348
348
|
})(OrderActivationStatus = exports.OrderActivationStatus || (exports.OrderActivationStatus = {}));
|
|
349
|
+
/**
|
|
350
|
+
* Valid values for Order.BatteryBackupAnswersSource
|
|
351
|
+
*
|
|
352
|
+
* Front end that last saved the battery backup answers. Set by the customer portal API, copied to the dispatch work order Source by the orders module, then cleared (PORTAPP-3276).
|
|
353
|
+
*
|
|
354
|
+
* @remarks Available options:
|
|
355
|
+
* - `CUSTOMER_APP` - Customer App
|
|
356
|
+
* - `CUSTOMER_PORTAL` - Customer Portal
|
|
357
|
+
*/
|
|
358
|
+
var OrderBatteryBackupAnswersSource;
|
|
359
|
+
(function (OrderBatteryBackupAnswersSource) {
|
|
360
|
+
OrderBatteryBackupAnswersSource["CUSTOMER_APP"] = "CUSTOMER_APP";
|
|
361
|
+
OrderBatteryBackupAnswersSource["CUSTOMER_PORTAL"] = "CUSTOMER_PORTAL";
|
|
362
|
+
})(OrderBatteryBackupAnswersSource = exports.OrderBatteryBackupAnswersSource || (exports.OrderBatteryBackupAnswersSource = {}));
|
|
349
363
|
/**
|
|
350
364
|
* Property keys for Order
|
|
351
365
|
* Use these constants instead of string literals for type safety
|
|
@@ -560,6 +574,8 @@ var OrderPropertyKeys;
|
|
|
560
574
|
OrderPropertyKeys["RecontractDate"] = "RecontractDate";
|
|
561
575
|
/** status of the order (must be activated for billing) (Sales - Order) */
|
|
562
576
|
OrderPropertyKeys["ActivationStatus"] = "ActivationStatus";
|
|
577
|
+
/** Front end that last saved the battery backup answers. Set by the customer portal API, copied to the dispatch work order Source by the orders module, then cleared (PORTAPP-3276). */
|
|
578
|
+
OrderPropertyKeys["BatteryBackupAnswersSource"] = "BatteryBackupAnswersSource";
|
|
563
579
|
})(OrderPropertyKeys = exports.OrderPropertyKeys || (exports.OrderPropertyKeys = {}));
|
|
564
580
|
/**
|
|
565
581
|
* Order entity from OrderModule
|
|
@@ -22,6 +22,7 @@ import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
|
22
22
|
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
23
23
|
import { AppointmentProperties } from '../entities-v2/Appointment';
|
|
24
24
|
import { CreateAppointmentProperties } from '../actions-v2/CreateAppointmentDto';
|
|
25
|
+
import { UpdateAppointmentSalesAppProperties } from '../actions-v2/UpdateAppointmentSalesAppDto';
|
|
25
26
|
import { FileRecord } from './FileRecord';
|
|
26
27
|
import { NoteRecord } from './NoteRecord';
|
|
27
28
|
import { LeadRecord } from './LeadRecord';
|
|
@@ -301,6 +302,33 @@ export declare class AppointmentRecord<TProps = AppointmentProperties> {
|
|
|
301
302
|
journeyId?: string;
|
|
302
303
|
stageKey?: string;
|
|
303
304
|
}): ActionBuilder;
|
|
305
|
+
/**
|
|
306
|
+
* UpdateAppointmentSalesApp
|
|
307
|
+
*
|
|
308
|
+
* Updates this Appointment record.
|
|
309
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
310
|
+
*
|
|
311
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
312
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
313
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
314
|
+
* @throws Error if called on a new (unsaved) record
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```typescript
|
|
318
|
+
* const record = await odinClient.appointments.get(id);
|
|
319
|
+
* await record.updateAppointmentSalesApp({ ... }).execute();
|
|
320
|
+
*
|
|
321
|
+
* // Dry run (for debugging)
|
|
322
|
+
* const payload = record.updateAppointmentSalesApp({ ... }).dryRun();
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
updateAppointmentSalesApp(propertiesOrOptions?: UpdateAppointmentSalesAppProperties | {
|
|
326
|
+
journeyId?: string;
|
|
327
|
+
stageKey?: string;
|
|
328
|
+
}, options?: {
|
|
329
|
+
journeyId?: string;
|
|
330
|
+
stageKey?: string;
|
|
331
|
+
}): ActionBuilder;
|
|
304
332
|
}
|
|
305
333
|
/** Type guard to check if an object is a AppointmentRecord */
|
|
306
334
|
export declare function isAppointmentRecord(obj: any): obj is AppointmentRecord;
|
|
@@ -433,6 +433,46 @@ class AppointmentRecord {
|
|
|
433
433
|
};
|
|
434
434
|
return new ActionBuilder(this._provider, 'CrmModule', 'Appointment', payload, () => { this._pendingLinks = []; });
|
|
435
435
|
}
|
|
436
|
+
// ============================================
|
|
437
|
+
// UPDATE ACTIONS (require existing record)
|
|
438
|
+
// ============================================
|
|
439
|
+
/**
|
|
440
|
+
* UpdateAppointmentSalesApp
|
|
441
|
+
*
|
|
442
|
+
* Updates this Appointment record.
|
|
443
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
444
|
+
*
|
|
445
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
446
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
447
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
448
|
+
* @throws Error if called on a new (unsaved) record
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* ```typescript
|
|
452
|
+
* const record = await odinClient.appointments.get(id);
|
|
453
|
+
* await record.updateAppointmentSalesApp({ ... }).execute();
|
|
454
|
+
*
|
|
455
|
+
* // Dry run (for debugging)
|
|
456
|
+
* const payload = record.updateAppointmentSalesApp({ ... }).dryRun();
|
|
457
|
+
* ```
|
|
458
|
+
*/
|
|
459
|
+
updateAppointmentSalesApp(propertiesOrOptions, options) {
|
|
460
|
+
var _a;
|
|
461
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
462
|
+
throw new Error('updateAppointmentSalesApp requires an existing record. Use accessor.get() first.');
|
|
463
|
+
let properties = {};
|
|
464
|
+
let opts = options;
|
|
465
|
+
if (propertiesOrOptions) {
|
|
466
|
+
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
467
|
+
opts = propertiesOrOptions;
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
properties = propertiesOrOptions;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAppointmentSalesApp', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
474
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'Appointment', payload, () => { this._pendingLinks = []; });
|
|
475
|
+
}
|
|
436
476
|
}
|
|
437
477
|
exports.AppointmentRecord = AppointmentRecord;
|
|
438
478
|
// ============================================
|