@d19n/youfibre-odin-sdk 2.0.39 → 2.0.41
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 +11 -28
- package/dist/EntityRegistry.d.ts +0 -2
- package/dist/EntityRegistry.js +0 -2
- package/dist/OdinApiClient.d.ts +0 -4
- package/dist/OdinApiClient.js +0 -8
- package/dist/OdinDbClient.d.ts +0 -4
- package/dist/OdinDbClient.js +0 -8
- package/dist/accessors-v2/index.d.ts +0 -1
- package/dist/accessors-v2/index.js +2 -4
- package/dist/actions-v2/AssignCaseDto.d.ts +4 -4
- package/dist/actions-v2/AssignCaseWithNoteFlowDto.d.ts +4 -4
- package/dist/actions-v2/CreateAddressCrmDatasetDto.d.ts +116 -0
- package/dist/actions-v2/CreateAddressCrmDatasetDto.js +59 -0
- package/dist/actions-v2/CreateCaseFromContactDto.d.ts +4 -4
- package/dist/db-accessors-v2/index.d.ts +0 -1
- package/dist/db-accessors-v2/index.js +2 -4
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +4 -4
- package/dist/entities-v2/CrmDataset.d.ts +23 -1
- package/dist/entities-v2/CrmDataset.js +2 -0
- package/dist/entities-v2/Lead.d.ts +0 -7
- package/dist/entities-v2/Lead.js +0 -2
- package/dist/entities-v2/ServiceAppointmentConfig.d.ts +6 -3
- package/dist/entities-v2/ServiceAppointmentConfig.js +6 -3
- package/dist/entities-v2/WorkOrder.d.ts +3 -1
- package/dist/entities-v2/WorkOrder.js +2 -0
- package/dist/records-v2/AccountRecord.d.ts +0 -29
- package/dist/records-v2/AccountRecord.js +0 -36
- package/dist/records-v2/AddressRecord.d.ts +0 -28
- package/dist/records-v2/AddressRecord.js +1 -45
- package/dist/records-v2/CaseRecord.js +8 -62
- package/dist/records-v2/ChurnRequestRecord.js +1 -7
- package/dist/records-v2/ContactRecord.d.ts +0 -49
- package/dist/records-v2/ContactRecord.js +1 -79
- package/dist/records-v2/ContractBuyOutRecord.js +2 -14
- package/dist/records-v2/CrmDatasetRecord.d.ts +29 -0
- package/dist/records-v2/CrmDatasetRecord.js +36 -0
- package/dist/records-v2/CustomerDeviceOntRecord.js +1 -7
- package/dist/records-v2/LeadRecord.d.ts +0 -29
- package/dist/records-v2/LeadRecord.js +0 -36
- package/dist/records-v2/OrderItemRecord.d.ts +0 -29
- package/dist/records-v2/OrderItemRecord.js +0 -36
- package/dist/records-v2/OrderRecord.d.ts +0 -99
- package/dist/records-v2/OrderRecord.js +8 -182
- package/dist/records-v2/PICRequestRecord.js +1 -7
- package/dist/records-v2/PaymentMethodRefundRecord.js +1 -6
- package/dist/records-v2/TestEntityForVisualBuilderRecord.js +1 -6
- package/dist/records-v2/WorkOrderRecord.js +41 -364
- package/dist/records-v2/index.d.ts +1 -2
- package/dist/records-v2/index.js +6 -9
- package/package.json +2 -2
- package/dist/accessors-v2/PhoneNumberAccessor.d.ts +0 -111
- package/dist/accessors-v2/PhoneNumberAccessor.js +0 -190
- package/dist/actions-v2/CreateAccountFromBrskDto.d.ts +0 -102
- package/dist/actions-v2/CreateAccountFromBrskDto.js +0 -54
- package/dist/actions-v2/CreateContactFromBrskDto.d.ts +0 -107
- package/dist/actions-v2/CreateContactFromBrskDto.js +0 -52
- package/dist/actions-v2/CreateLeadFromBrskDto.d.ts +0 -118
- package/dist/actions-v2/CreateLeadFromBrskDto.js +0 -52
- package/dist/actions-v2/CreateOrderFromBrskDto.d.ts +0 -138
- package/dist/actions-v2/CreateOrderFromBrskDto.js +0 -52
- package/dist/actions-v2/CreateOrderItemFromBrskDto.d.ts +0 -198
- package/dist/actions-v2/CreateOrderItemFromBrskDto.js +0 -52
- package/dist/actions-v2/CreatePhoneNumberFromBrskDto.d.ts +0 -67
- package/dist/actions-v2/CreatePhoneNumberFromBrskDto.js +0 -54
- package/dist/actions-v2/MoveOrderFromSupplyToActiveDto.d.ts +0 -112
- package/dist/actions-v2/MoveOrderFromSupplyToActiveDto.js +0 -77
- package/dist/actions-v2/MoveOrderFromSupplyToCancelledDto.d.ts +0 -112
- package/dist/actions-v2/MoveOrderFromSupplyToCancelledDto.js +0 -77
- package/dist/actions-v2/UpdateAddressFromBrskDto.d.ts +0 -61
- package/dist/actions-v2/UpdateAddressFromBrskDto.js +0 -54
- package/dist/db-accessors-v2/PhoneNumberDbAccessor.d.ts +0 -149
- package/dist/db-accessors-v2/PhoneNumberDbAccessor.js +0 -227
- package/dist/records-v2/PhoneNumberRecord.d.ts +0 -205
- package/dist/records-v2/PhoneNumberRecord.js +0 -292
|
@@ -84,7 +84,9 @@ export declare enum CrmDatasetPropertyKeys {
|
|
|
84
84
|
/** Used for analytics when querying data we search starting from this date (Sales - CrmDataset) */
|
|
85
85
|
QueryFromDate = "QueryFromDate",
|
|
86
86
|
/** Used for analytics when querying data we search starting up to this date (Sales - CrmDataset) */
|
|
87
|
-
QueryToDate = "QueryToDate"
|
|
87
|
+
QueryToDate = "QueryToDate",
|
|
88
|
+
/** Shows total number of addresses within dataset */
|
|
89
|
+
TotalAddressNumber = "TotalAddressNumber"
|
|
88
90
|
}
|
|
89
91
|
/**
|
|
90
92
|
* Properties for CrmDataset records
|
|
@@ -164,6 +166,11 @@ export interface CrmDatasetProperties {
|
|
|
164
166
|
* @hidden This field is hidden in the UI
|
|
165
167
|
*/
|
|
166
168
|
QueryToDate: string;
|
|
169
|
+
/** Shows total number of addresses within dataset
|
|
170
|
+
*
|
|
171
|
+
* @type {NUMBER}
|
|
172
|
+
*/
|
|
173
|
+
TotalAddressNumber: number;
|
|
167
174
|
}
|
|
168
175
|
/**
|
|
169
176
|
* Properties for ADDRESS CrmDataset records
|
|
@@ -243,6 +250,11 @@ export interface AddressCrmDatasetProperties {
|
|
|
243
250
|
* @hidden This field is hidden in the UI
|
|
244
251
|
*/
|
|
245
252
|
QueryToDate: string;
|
|
253
|
+
/** Shows total number of addresses within dataset
|
|
254
|
+
*
|
|
255
|
+
* @type {NUMBER}
|
|
256
|
+
*/
|
|
257
|
+
TotalAddressNumber: number;
|
|
246
258
|
}
|
|
247
259
|
/**
|
|
248
260
|
* Properties for CONTACT CrmDataset records
|
|
@@ -322,6 +334,11 @@ export interface ContactCrmDatasetProperties {
|
|
|
322
334
|
* @hidden This field is hidden in the UI
|
|
323
335
|
*/
|
|
324
336
|
QueryToDate: string;
|
|
337
|
+
/** Shows total number of addresses within dataset
|
|
338
|
+
*
|
|
339
|
+
* @type {NUMBER}
|
|
340
|
+
*/
|
|
341
|
+
TotalAddressNumber: number;
|
|
325
342
|
}
|
|
326
343
|
/**
|
|
327
344
|
* Properties for LEAD CrmDataset records
|
|
@@ -401,6 +418,11 @@ export interface LeadCrmDatasetProperties {
|
|
|
401
418
|
* @hidden This field is hidden in the UI
|
|
402
419
|
*/
|
|
403
420
|
QueryToDate: string;
|
|
421
|
+
/** Shows total number of addresses within dataset
|
|
422
|
+
*
|
|
423
|
+
* @type {NUMBER}
|
|
424
|
+
*/
|
|
425
|
+
TotalAddressNumber: number;
|
|
404
426
|
}
|
|
405
427
|
/**
|
|
406
428
|
* CrmDataset entity from CrmModule
|
|
@@ -86,6 +86,8 @@ var CrmDatasetPropertyKeys;
|
|
|
86
86
|
CrmDatasetPropertyKeys["QueryFromDate"] = "QueryFromDate";
|
|
87
87
|
/** Used for analytics when querying data we search starting up to this date (Sales - CrmDataset) */
|
|
88
88
|
CrmDatasetPropertyKeys["QueryToDate"] = "QueryToDate";
|
|
89
|
+
/** Shows total number of addresses within dataset */
|
|
90
|
+
CrmDatasetPropertyKeys["TotalAddressNumber"] = "TotalAddressNumber";
|
|
89
91
|
})(CrmDatasetPropertyKeys = exports.CrmDatasetPropertyKeys || (exports.CrmDatasetPropertyKeys = {}));
|
|
90
92
|
/**
|
|
91
93
|
* CrmDataset entity from CrmModule
|
|
@@ -201,8 +201,6 @@ export declare enum LeadPropertyKeys {
|
|
|
201
201
|
CompanyPosition = "CompanyPosition",
|
|
202
202
|
/** Data field for Lead records. Used by Sales team. */
|
|
203
203
|
Vat = "VAT",
|
|
204
|
-
/** TitleName */
|
|
205
|
-
TitleName = "TitleName",
|
|
206
204
|
/** External Reference */
|
|
207
205
|
ExternalReference = "ExternalReference",
|
|
208
206
|
/** Address */
|
|
@@ -410,11 +408,6 @@ export interface LeadProperties {
|
|
|
410
408
|
* @hidden This field is hidden in the UI
|
|
411
409
|
*/
|
|
412
410
|
Vat: number;
|
|
413
|
-
/** TitleName
|
|
414
|
-
*
|
|
415
|
-
* @type {TEXT}
|
|
416
|
-
*/
|
|
417
|
-
TitleName: string;
|
|
418
411
|
/** External Reference
|
|
419
412
|
*
|
|
420
413
|
* @type {TEXT}
|
package/dist/entities-v2/Lead.js
CHANGED
|
@@ -195,8 +195,6 @@ var LeadPropertyKeys;
|
|
|
195
195
|
LeadPropertyKeys["CompanyPosition"] = "CompanyPosition";
|
|
196
196
|
/** Data field for Lead records. Used by Sales team. */
|
|
197
197
|
LeadPropertyKeys["Vat"] = "VAT";
|
|
198
|
-
/** TitleName */
|
|
199
|
-
LeadPropertyKeys["TitleName"] = "TitleName";
|
|
200
198
|
/** External Reference */
|
|
201
199
|
LeadPropertyKeys["ExternalReference"] = "ExternalReference";
|
|
202
200
|
/** Address */
|
|
@@ -97,6 +97,7 @@ export declare enum ServiceAppointmentConfigEnablePrePull {
|
|
|
97
97
|
* @remarks Available options:
|
|
98
98
|
* - `THREHUNDREDSIXTY_NETWORKS` - 360 Networks
|
|
99
99
|
* - `C&L`
|
|
100
|
+
* - `DLO`
|
|
100
101
|
* - `FAIRFIELD_FIBRE` - Fairfield Fibre
|
|
101
102
|
* - `FNIL`
|
|
102
103
|
* - `G_FORCE` - G Force
|
|
@@ -105,15 +106,15 @@ export declare enum ServiceAppointmentConfigEnablePrePull {
|
|
|
105
106
|
* - `GNS_INSTALLS` - GNS Installs
|
|
106
107
|
* - `KN_CIRCET` - KN Circet
|
|
107
108
|
* - `KN_NI`
|
|
109
|
+
* - `LASTMILE` - Lastmile Telecommunication
|
|
108
110
|
* - `LIGHTSOURCE` - Light Source
|
|
109
111
|
* - `LIMITLESS_FIBRE` - Limitless Fibre
|
|
110
112
|
* - `MAP_GROUP` - MAP Group
|
|
111
|
-
* -
|
|
112
|
-
* - `NANO_FIBRE` - Nano Fibre
|
|
113
|
-
* - ... and 7 more
|
|
113
|
+
* - ... and 10 more
|
|
114
114
|
*/
|
|
115
115
|
export declare enum ServiceAppointmentConfigContractor {
|
|
116
116
|
C_L = "C&L",
|
|
117
|
+
DLO = "DLO",
|
|
117
118
|
FAIRFIELD_FIBRE = "FAIRFIELD_FIBRE",
|
|
118
119
|
FNIL = "FNIL",
|
|
119
120
|
G_FORCE = "G_FORCE",
|
|
@@ -122,6 +123,7 @@ export declare enum ServiceAppointmentConfigContractor {
|
|
|
122
123
|
GNS_INSTALLS = "GNS_INSTALLS",
|
|
123
124
|
KN_CIRCET = "KN_CIRCET",
|
|
124
125
|
KN_NI = "KN_NI",
|
|
126
|
+
LASTMILE_TELECOMMUNICATION = "LASTMILE",
|
|
125
127
|
LIGHT_SOURCE = "LIGHTSOURCE",
|
|
126
128
|
LIMITLESS_FIBRE = "LIMITLESS_FIBRE",
|
|
127
129
|
MAP_GROUP = "MAP_GROUP",
|
|
@@ -133,6 +135,7 @@ export declare enum ServiceAppointmentConfigContractor {
|
|
|
133
135
|
PICH = "PICH",
|
|
134
136
|
S_M = "S_M",
|
|
135
137
|
STL = "STL",
|
|
138
|
+
VEA_TELECOMS = "VEA",
|
|
136
139
|
YOU_FIBRE = "YOUFIBRE"
|
|
137
140
|
}
|
|
138
141
|
/**
|
|
@@ -96,6 +96,7 @@ var ServiceAppointmentConfigEnablePrePull;
|
|
|
96
96
|
* @remarks Available options:
|
|
97
97
|
* - `THREHUNDREDSIXTY_NETWORKS` - 360 Networks
|
|
98
98
|
* - `C&L`
|
|
99
|
+
* - `DLO`
|
|
99
100
|
* - `FAIRFIELD_FIBRE` - Fairfield Fibre
|
|
100
101
|
* - `FNIL`
|
|
101
102
|
* - `G_FORCE` - G Force
|
|
@@ -104,16 +105,16 @@ var ServiceAppointmentConfigEnablePrePull;
|
|
|
104
105
|
* - `GNS_INSTALLS` - GNS Installs
|
|
105
106
|
* - `KN_CIRCET` - KN Circet
|
|
106
107
|
* - `KN_NI`
|
|
108
|
+
* - `LASTMILE` - Lastmile Telecommunication
|
|
107
109
|
* - `LIGHTSOURCE` - Light Source
|
|
108
110
|
* - `LIMITLESS_FIBRE` - Limitless Fibre
|
|
109
111
|
* - `MAP_GROUP` - MAP Group
|
|
110
|
-
* -
|
|
111
|
-
* - `NANO_FIBRE` - Nano Fibre
|
|
112
|
-
* - ... and 7 more
|
|
112
|
+
* - ... and 10 more
|
|
113
113
|
*/
|
|
114
114
|
var ServiceAppointmentConfigContractor;
|
|
115
115
|
(function (ServiceAppointmentConfigContractor) {
|
|
116
116
|
ServiceAppointmentConfigContractor["C_L"] = "C&L";
|
|
117
|
+
ServiceAppointmentConfigContractor["DLO"] = "DLO";
|
|
117
118
|
ServiceAppointmentConfigContractor["FAIRFIELD_FIBRE"] = "FAIRFIELD_FIBRE";
|
|
118
119
|
ServiceAppointmentConfigContractor["FNIL"] = "FNIL";
|
|
119
120
|
ServiceAppointmentConfigContractor["G_FORCE"] = "G_FORCE";
|
|
@@ -122,6 +123,7 @@ var ServiceAppointmentConfigContractor;
|
|
|
122
123
|
ServiceAppointmentConfigContractor["GNS_INSTALLS"] = "GNS_INSTALLS";
|
|
123
124
|
ServiceAppointmentConfigContractor["KN_CIRCET"] = "KN_CIRCET";
|
|
124
125
|
ServiceAppointmentConfigContractor["KN_NI"] = "KN_NI";
|
|
126
|
+
ServiceAppointmentConfigContractor["LASTMILE_TELECOMMUNICATION"] = "LASTMILE";
|
|
125
127
|
ServiceAppointmentConfigContractor["LIGHT_SOURCE"] = "LIGHTSOURCE";
|
|
126
128
|
ServiceAppointmentConfigContractor["LIMITLESS_FIBRE"] = "LIMITLESS_FIBRE";
|
|
127
129
|
ServiceAppointmentConfigContractor["MAP_GROUP"] = "MAP_GROUP";
|
|
@@ -133,6 +135,7 @@ var ServiceAppointmentConfigContractor;
|
|
|
133
135
|
ServiceAppointmentConfigContractor["PICH"] = "PICH";
|
|
134
136
|
ServiceAppointmentConfigContractor["S_M"] = "S_M";
|
|
135
137
|
ServiceAppointmentConfigContractor["STL"] = "STL";
|
|
138
|
+
ServiceAppointmentConfigContractor["VEA_TELECOMS"] = "VEA";
|
|
136
139
|
ServiceAppointmentConfigContractor["YOU_FIBRE"] = "YOUFIBRE";
|
|
137
140
|
})(ServiceAppointmentConfigContractor = exports.ServiceAppointmentConfigContractor || (exports.ServiceAppointmentConfigContractor = {}));
|
|
138
141
|
/**
|
|
@@ -1092,12 +1092,14 @@ export declare enum WorkOrderLengthOfInsideOutCableUsed {
|
|
|
1092
1092
|
* - `CITYFIBRE` - CityFibre
|
|
1093
1093
|
* - `NETOMNIA` - Netomnia
|
|
1094
1094
|
* - `NETOMNIA_LEGACY` - Netomnia (Legacy)
|
|
1095
|
+
* - `PYOMNI` - PyOmni
|
|
1095
1096
|
*/
|
|
1096
1097
|
export declare enum WorkOrderProvider {
|
|
1097
1098
|
BRSK = "BRSK",
|
|
1098
1099
|
CITY_FIBRE = "CITYFIBRE",
|
|
1099
1100
|
NETOMNIA = "NETOMNIA",
|
|
1100
|
-
NETOMNIA_LEGACY = "NETOMNIA_LEGACY"
|
|
1101
|
+
NETOMNIA_LEGACY = "NETOMNIA_LEGACY",
|
|
1102
|
+
PY_OMNI = "PYOMNI"
|
|
1101
1103
|
}
|
|
1102
1104
|
/**
|
|
1103
1105
|
* Valid values for WorkOrder.OutcomeOfServiceVisit
|
|
@@ -1089,6 +1089,7 @@ var WorkOrderLengthOfInsideOutCableUsed;
|
|
|
1089
1089
|
* - `CITYFIBRE` - CityFibre
|
|
1090
1090
|
* - `NETOMNIA` - Netomnia
|
|
1091
1091
|
* - `NETOMNIA_LEGACY` - Netomnia (Legacy)
|
|
1092
|
+
* - `PYOMNI` - PyOmni
|
|
1092
1093
|
*/
|
|
1093
1094
|
var WorkOrderProvider;
|
|
1094
1095
|
(function (WorkOrderProvider) {
|
|
@@ -1096,6 +1097,7 @@ var WorkOrderProvider;
|
|
|
1096
1097
|
WorkOrderProvider["CITY_FIBRE"] = "CITYFIBRE";
|
|
1097
1098
|
WorkOrderProvider["NETOMNIA"] = "NETOMNIA";
|
|
1098
1099
|
WorkOrderProvider["NETOMNIA_LEGACY"] = "NETOMNIA_LEGACY";
|
|
1100
|
+
WorkOrderProvider["PY_OMNI"] = "PYOMNI";
|
|
1099
1101
|
})(WorkOrderProvider = exports.WorkOrderProvider || (exports.WorkOrderProvider = {}));
|
|
1100
1102
|
/**
|
|
1101
1103
|
* Valid values for WorkOrder.OutcomeOfServiceVisit
|
|
@@ -24,7 +24,6 @@ import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
|
24
24
|
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
25
25
|
import { AccountProperties, BusinessAccountProperties, MultipleAccountProperties, PrimaryAccountProperties, ResellerAccountProperties, ServiceAccountProperties } from '../entities-v2/Account';
|
|
26
26
|
import { ChangeBillingModeProperties } from '../actions-v2/ChangeBillingModeDto';
|
|
27
|
-
import { CreateAccountFromBrskProperties } from '../actions-v2/CreateAccountFromBrskDto';
|
|
28
27
|
import { CreateBusinessAccountProperties } from '../actions-v2/CreateBusinessAccountDto';
|
|
29
28
|
import { CreatePrimaryAccountProperties } from '../actions-v2/CreatePrimaryAccountDto';
|
|
30
29
|
import { CreateResellerAccountProperties } from '../actions-v2/CreateResellerAccountDto';
|
|
@@ -441,34 +440,6 @@ export declare class AccountRecord<TProps = AccountProperties> {
|
|
|
441
440
|
unlink(target: OdinRecord<any> | {
|
|
442
441
|
id: string;
|
|
443
442
|
} | string): Promise<void>;
|
|
444
|
-
/**
|
|
445
|
-
* CreateAccountFromBrsk
|
|
446
|
-
*
|
|
447
|
-
* Creates a new Account record with the specified properties.
|
|
448
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
449
|
-
*
|
|
450
|
-
* @param properties - The properties for the new record
|
|
451
|
-
* @param options - Optional settings
|
|
452
|
-
* @param options.type - Override the record type
|
|
453
|
-
* @param options.journeyId - Associate with a journey
|
|
454
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
455
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
456
|
-
*
|
|
457
|
-
* @example
|
|
458
|
-
* ```typescript
|
|
459
|
-
* // Create with properties
|
|
460
|
-
* const record = odinClient.accounts.new();
|
|
461
|
-
* await record.createAccountFromBrsk({ ... }).execute();
|
|
462
|
-
*
|
|
463
|
-
* // Dry run (for debugging)
|
|
464
|
-
* const payload = record.createAccountFromBrsk({ ... }).dryRun();
|
|
465
|
-
* ```
|
|
466
|
-
*/
|
|
467
|
-
createAccountFromBrsk(properties?: CreateAccountFromBrskProperties, options?: {
|
|
468
|
-
type?: string;
|
|
469
|
-
journeyId?: string;
|
|
470
|
-
stageKey?: string;
|
|
471
|
-
}): ActionBuilder;
|
|
472
443
|
/**
|
|
473
444
|
* CreateBusinessAccount
|
|
474
445
|
*
|
|
@@ -603,42 +603,6 @@ class AccountRecord {
|
|
|
603
603
|
// ============================================
|
|
604
604
|
// CREATE ACTIONS (no existing record required)
|
|
605
605
|
// ============================================
|
|
606
|
-
/**
|
|
607
|
-
* CreateAccountFromBrsk
|
|
608
|
-
*
|
|
609
|
-
* Creates a new Account record with the specified properties.
|
|
610
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
611
|
-
*
|
|
612
|
-
* @param properties - The properties for the new record
|
|
613
|
-
* @param options - Optional settings
|
|
614
|
-
* @param options.type - Override the record type
|
|
615
|
-
* @param options.journeyId - Associate with a journey
|
|
616
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
617
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
618
|
-
*
|
|
619
|
-
* @example
|
|
620
|
-
* ```typescript
|
|
621
|
-
* // Create with properties
|
|
622
|
-
* const record = odinClient.accounts.new();
|
|
623
|
-
* await record.createAccountFromBrsk({ ... }).execute();
|
|
624
|
-
*
|
|
625
|
-
* // Dry run (for debugging)
|
|
626
|
-
* const payload = record.createAccountFromBrsk({ ... }).dryRun();
|
|
627
|
-
* ```
|
|
628
|
-
*/
|
|
629
|
-
createAccountFromBrsk(properties, options) {
|
|
630
|
-
var _a, _b;
|
|
631
|
-
const payload = {
|
|
632
|
-
entity: 'CrmModule:Account',
|
|
633
|
-
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
|
|
634
|
-
actionName: 'CreateAccountFromBrsk',
|
|
635
|
-
properties: properties || {},
|
|
636
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
637
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
638
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
639
|
-
};
|
|
640
|
-
return new ActionBuilder(this._provider, 'CrmModule', 'Account', payload, () => { this._pendingLinks = []; });
|
|
641
|
-
}
|
|
642
606
|
/**
|
|
643
607
|
* CreateBusinessAccount
|
|
644
608
|
*
|
|
@@ -25,7 +25,6 @@ import { AddressCreateProperties } from '../actions-v2/AddressCreateDto';
|
|
|
25
25
|
import { AddressUpdateProperties } from '../actions-v2/AddressUpdateDto';
|
|
26
26
|
import { CreateLeadProperties } from '../actions-v2/CreateLeadFromAddressDto';
|
|
27
27
|
import { CreateContactProperties } from '../actions-v2/CreateLeadFromAddressDto';
|
|
28
|
-
import { UpdateAddressFromBrskProperties } from '../actions-v2/UpdateAddressFromBrskDto';
|
|
29
28
|
import { OrderRecord } from './OrderRecord';
|
|
30
29
|
import { CustomerDeviceOntRecord } from './CustomerDeviceOntRecord';
|
|
31
30
|
import { AppointmentRecord } from './AppointmentRecord';
|
|
@@ -602,33 +601,6 @@ export declare class AddressRecord<TProps = AddressProperties> {
|
|
|
602
601
|
createLeadFromAddress(options?: {
|
|
603
602
|
journeyId?: string;
|
|
604
603
|
}): CreateLeadFromAddressFlowBuilder;
|
|
605
|
-
/**
|
|
606
|
-
* UpdateAddressFromBrsk
|
|
607
|
-
*
|
|
608
|
-
* Updates this Address record.
|
|
609
|
-
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
610
|
-
*
|
|
611
|
-
* @param propertiesOrOptions - Properties to update, or options object
|
|
612
|
-
* @param options - Optional settings (journeyId, stageKey)
|
|
613
|
-
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
614
|
-
* @throws Error if called on a new (unsaved) record
|
|
615
|
-
*
|
|
616
|
-
* @example
|
|
617
|
-
* ```typescript
|
|
618
|
-
* const record = await odinClient.addresss.get(id);
|
|
619
|
-
* await record.updateAddressFromBrsk({ ... }).execute();
|
|
620
|
-
*
|
|
621
|
-
* // Dry run (for debugging)
|
|
622
|
-
* const payload = record.updateAddressFromBrsk({ ... }).dryRun();
|
|
623
|
-
* ```
|
|
624
|
-
*/
|
|
625
|
-
updateAddressFromBrsk(propertiesOrOptions?: UpdateAddressFromBrskProperties | {
|
|
626
|
-
journeyId?: string;
|
|
627
|
-
stageKey?: string;
|
|
628
|
-
}, options?: {
|
|
629
|
-
journeyId?: string;
|
|
630
|
-
stageKey?: string;
|
|
631
|
-
}): ActionBuilder;
|
|
632
604
|
}
|
|
633
605
|
/** Type guard to check if an object is a AddressRecord */
|
|
634
606
|
export declare function isAddressRecord(obj: any): obj is AddressRecord;
|
|
@@ -158,8 +158,6 @@ class CreateLeadFromAddressFlowBuilder {
|
|
|
158
158
|
actionName: 'CreateLead',
|
|
159
159
|
properties,
|
|
160
160
|
entity: 'CrmModule:Lead',
|
|
161
|
-
schemaId: 'af31abc1-5d28-4a12-ba22-2da7d44febba',
|
|
162
|
-
schemaActionId: '82822a02-ea89-49ad-9417-c6fcb4912bfb',
|
|
163
161
|
autoLinkParent: true,
|
|
164
162
|
associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
|
|
165
163
|
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
@@ -178,8 +176,6 @@ class CreateLeadFromAddressFlowBuilder {
|
|
|
178
176
|
actionName: 'CreateContact',
|
|
179
177
|
properties,
|
|
180
178
|
entity: 'CrmModule:Contact',
|
|
181
|
-
schemaId: 'ff4313f0-9929-4481-bdf4-c90ff9624014',
|
|
182
|
-
schemaActionId: 'b6497532-cf9d-467c-9684-c1b19acb7ed1',
|
|
183
179
|
autoLinkParent: true,
|
|
184
180
|
associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
|
|
185
181
|
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
@@ -235,9 +231,6 @@ class CreateLeadFromAddressFlowBuilder {
|
|
|
235
231
|
return {
|
|
236
232
|
entity: step.entity,
|
|
237
233
|
type: step.type,
|
|
238
|
-
schemaId: step.schemaId,
|
|
239
|
-
schemaActionId: step.schemaActionId,
|
|
240
|
-
schemaTypeId: step.schemaTypeId,
|
|
241
234
|
actionName: step.actionName,
|
|
242
235
|
properties: step.properties,
|
|
243
236
|
title: step.title,
|
|
@@ -246,7 +239,7 @@ class CreateLeadFromAddressFlowBuilder {
|
|
|
246
239
|
groups: step.groups,
|
|
247
240
|
};
|
|
248
241
|
});
|
|
249
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'CrmModule:Address', actionName: 'CreateLeadFromAddress',
|
|
242
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'CrmModule:Address', actionName: 'CreateLeadFromAddress', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
|
|
250
243
|
}
|
|
251
244
|
}
|
|
252
245
|
exports.CreateLeadFromAddressFlowBuilder = CreateLeadFromAddressFlowBuilder;
|
|
@@ -902,43 +895,6 @@ class AddressRecord {
|
|
|
902
895
|
createLeadFromAddress(options) {
|
|
903
896
|
return new CreateLeadFromAddressFlowBuilder(this, this._provider, this._pendingLinks, options);
|
|
904
897
|
}
|
|
905
|
-
/**
|
|
906
|
-
* UpdateAddressFromBrsk
|
|
907
|
-
*
|
|
908
|
-
* Updates this Address record.
|
|
909
|
-
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
910
|
-
*
|
|
911
|
-
* @param propertiesOrOptions - Properties to update, or options object
|
|
912
|
-
* @param options - Optional settings (journeyId, stageKey)
|
|
913
|
-
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
914
|
-
* @throws Error if called on a new (unsaved) record
|
|
915
|
-
*
|
|
916
|
-
* @example
|
|
917
|
-
* ```typescript
|
|
918
|
-
* const record = await odinClient.addresss.get(id);
|
|
919
|
-
* await record.updateAddressFromBrsk({ ... }).execute();
|
|
920
|
-
*
|
|
921
|
-
* // Dry run (for debugging)
|
|
922
|
-
* const payload = record.updateAddressFromBrsk({ ... }).dryRun();
|
|
923
|
-
* ```
|
|
924
|
-
*/
|
|
925
|
-
updateAddressFromBrsk(propertiesOrOptions, options) {
|
|
926
|
-
var _a;
|
|
927
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
928
|
-
throw new Error('updateAddressFromBrsk requires an existing record. Use accessor.get() first.');
|
|
929
|
-
let properties = {};
|
|
930
|
-
let opts = options;
|
|
931
|
-
if (propertiesOrOptions) {
|
|
932
|
-
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
933
|
-
opts = propertiesOrOptions;
|
|
934
|
-
}
|
|
935
|
-
else {
|
|
936
|
-
properties = propertiesOrOptions;
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAddressFromBrsk', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
940
|
-
return new ActionBuilder(this._provider, 'CrmModule', 'Address', payload, () => { this._pendingLinks = []; });
|
|
941
|
-
}
|
|
942
898
|
}
|
|
943
899
|
exports.AddressRecord = AddressRecord;
|
|
944
900
|
// ============================================
|