@d19n/youfibre-odin-sdk 2.0.40 → 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/Lead.d.ts +0 -7
- package/dist/entities-v2/Lead.js +0 -2
- 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
|
@@ -34,7 +34,6 @@ const PaymentMethodRefundRecord_1 = require("./PaymentMethodRefundRecord");
|
|
|
34
34
|
const AddressRecord_1 = require("./AddressRecord");
|
|
35
35
|
const InvoiceRecord_1 = require("./InvoiceRecord");
|
|
36
36
|
const PgContactRecord_1 = require("./PgContactRecord");
|
|
37
|
-
const PhoneNumberRecord_1 = require("./PhoneNumberRecord");
|
|
38
37
|
const NoteRecord_1 = require("./NoteRecord");
|
|
39
38
|
const ActivityRecord_1 = require("./ActivityRecord");
|
|
40
39
|
const SmsMessageRecord_1 = require("./SmsMessageRecord");
|
|
@@ -170,9 +169,6 @@ class CreateCaseFromContactFlowBuilder {
|
|
|
170
169
|
actionName: 'CreateCase',
|
|
171
170
|
properties,
|
|
172
171
|
entity: 'SupportModule:Case',
|
|
173
|
-
schemaId: 'be8173eb-269b-4a67-be0c-11ce6af5d561',
|
|
174
|
-
schemaActionId: '4fd9f78b-0d8f-414e-96cf-aedf37b36d23',
|
|
175
|
-
schemaTypeId: '2d18d4c3-b4f8-4633-bfb0-ff0d62fbaecf',
|
|
176
172
|
type: 'DEFAULT',
|
|
177
173
|
autoLinkParent: true,
|
|
178
174
|
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 }))),
|
|
@@ -194,9 +190,6 @@ class CreateCaseFromContactFlowBuilder {
|
|
|
194
190
|
properties,
|
|
195
191
|
id,
|
|
196
192
|
entity: 'SupportModule:Case',
|
|
197
|
-
schemaId: 'be8173eb-269b-4a67-be0c-11ce6af5d561',
|
|
198
|
-
schemaActionId: '1b9ad25e-fe28-42fd-8198-b89d9df26bb1',
|
|
199
|
-
schemaTypeId: '2d18d4c3-b4f8-4633-bfb0-ff0d62fbaecf',
|
|
200
193
|
type: 'DEFAULT',
|
|
201
194
|
autoLinkParent: false,
|
|
202
195
|
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 }))),
|
|
@@ -253,9 +246,6 @@ class CreateCaseFromContactFlowBuilder {
|
|
|
253
246
|
return {
|
|
254
247
|
entity: step.entity,
|
|
255
248
|
type: step.type,
|
|
256
|
-
schemaId: step.schemaId,
|
|
257
|
-
schemaActionId: step.schemaActionId,
|
|
258
|
-
schemaTypeId: step.schemaTypeId,
|
|
259
249
|
actionName: step.actionName,
|
|
260
250
|
properties: step.properties,
|
|
261
251
|
title: step.title,
|
|
@@ -264,7 +254,7 @@ class CreateCaseFromContactFlowBuilder {
|
|
|
264
254
|
groups: step.groups,
|
|
265
255
|
};
|
|
266
256
|
});
|
|
267
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'CrmModule:Contact', actionName: 'CreateCaseFromContact',
|
|
257
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'CrmModule:Contact', actionName: 'CreateCaseFromContact', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
|
|
268
258
|
}
|
|
269
259
|
}
|
|
270
260
|
exports.CreateCaseFromContactFlowBuilder = CreateCaseFromContactFlowBuilder;
|
|
@@ -422,36 +412,6 @@ class ContactRecord {
|
|
|
422
412
|
}
|
|
423
413
|
return this._pgContacts;
|
|
424
414
|
}
|
|
425
|
-
/**
|
|
426
|
-
* Access linked PhoneNumber records
|
|
427
|
-
* @remarks Available labels: Contact__PhoneNumber
|
|
428
|
-
* @throws Error if called on a new (unsaved) record
|
|
429
|
-
*
|
|
430
|
-
* @example
|
|
431
|
-
* ```typescript
|
|
432
|
-
* // Get all linked PhoneNumber records
|
|
433
|
-
* const items = await record.phoneNumbers.list();
|
|
434
|
-
* const first = await record.phoneNumbers.first();
|
|
435
|
-
*
|
|
436
|
-
* // Filter by label
|
|
437
|
-
* const specific = await record.phoneNumbers.first({ label: 'Contact__PhoneNumber' });
|
|
438
|
-
* ```
|
|
439
|
-
*/
|
|
440
|
-
get phoneNumbers() {
|
|
441
|
-
var _a;
|
|
442
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
443
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
444
|
-
if (!this._phoneNumbers) {
|
|
445
|
-
this._phoneNumbers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
446
|
-
sourceEntity: 'CrmModule:Contact',
|
|
447
|
-
targetEntity: 'CrmModule:PhoneNumber',
|
|
448
|
-
targetModuleName: 'CrmModule',
|
|
449
|
-
targetEntityName: 'PhoneNumber',
|
|
450
|
-
labels: ['Contact__PhoneNumber'],
|
|
451
|
-
}, PhoneNumberRecord_1.PhoneNumberRecord);
|
|
452
|
-
}
|
|
453
|
-
return this._phoneNumbers;
|
|
454
|
-
}
|
|
455
415
|
/**
|
|
456
416
|
* Access linked Note records
|
|
457
417
|
* @remarks Available labels: Contact__Note
|
|
@@ -1246,42 +1206,6 @@ class ContactRecord {
|
|
|
1246
1206
|
};
|
|
1247
1207
|
return new ActionBuilder(this._provider, 'CrmModule', 'Contact', payload, () => { this._pendingLinks = []; });
|
|
1248
1208
|
}
|
|
1249
|
-
/**
|
|
1250
|
-
* CreateContactFromBrsk
|
|
1251
|
-
*
|
|
1252
|
-
* Creates a new Contact record with the specified properties.
|
|
1253
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1254
|
-
*
|
|
1255
|
-
* @param properties - The properties for the new record
|
|
1256
|
-
* @param options - Optional settings
|
|
1257
|
-
* @param options.type - Override the record type
|
|
1258
|
-
* @param options.journeyId - Associate with a journey
|
|
1259
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
1260
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1261
|
-
*
|
|
1262
|
-
* @example
|
|
1263
|
-
* ```typescript
|
|
1264
|
-
* // Create with properties
|
|
1265
|
-
* const record = odinClient.contacts.new();
|
|
1266
|
-
* await record.createContactFromBrsk({ ... }).execute();
|
|
1267
|
-
*
|
|
1268
|
-
* // Dry run (for debugging)
|
|
1269
|
-
* const payload = record.createContactFromBrsk({ ... }).dryRun();
|
|
1270
|
-
* ```
|
|
1271
|
-
*/
|
|
1272
|
-
createContactFromBrsk(properties, options) {
|
|
1273
|
-
var _a, _b;
|
|
1274
|
-
const payload = {
|
|
1275
|
-
entity: 'CrmModule:Contact',
|
|
1276
|
-
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,
|
|
1277
|
-
actionName: 'CreateContactFromBrsk',
|
|
1278
|
-
properties: properties || {},
|
|
1279
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
1280
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
1281
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
1282
|
-
};
|
|
1283
|
-
return new ActionBuilder(this._provider, 'CrmModule', 'Contact', payload, () => { this._pendingLinks = []; });
|
|
1284
|
-
}
|
|
1285
1209
|
// ============================================
|
|
1286
1210
|
// UPDATE ACTIONS (require existing record)
|
|
1287
1211
|
// ============================================
|
|
@@ -1417,8 +1341,6 @@ ContactRecord.addressesLabels = ['Contact__Address'];
|
|
|
1417
1341
|
ContactRecord.invoicesLabels = ['Invoice__Contact'];
|
|
1418
1342
|
/** Valid labels for PgContact associations */
|
|
1419
1343
|
ContactRecord.pgContactsLabels = ['PgContact__Contact'];
|
|
1420
|
-
/** Valid labels for PhoneNumber associations */
|
|
1421
|
-
ContactRecord.phoneNumbersLabels = ['Contact__PhoneNumber'];
|
|
1422
1344
|
/** Valid labels for Note associations */
|
|
1423
1345
|
ContactRecord.notesLabels = ['Contact__Note'];
|
|
1424
1346
|
/** Valid labels for Activity associations */
|
|
@@ -153,9 +153,6 @@ class MoveCboToApprovedFlowBuilder {
|
|
|
153
153
|
properties,
|
|
154
154
|
id,
|
|
155
155
|
entity: 'OrderModule:ContractBuyOut',
|
|
156
|
-
schemaId: '19150483-5fd7-44f5-a61f-1530b081f4ca',
|
|
157
|
-
schemaActionId: '10c4e64f-bb00-49cc-bc0e-5ae24206dc78',
|
|
158
|
-
schemaTypeId: 'abcdcb11-71d4-4f69-8f58-4eaa1dc47888',
|
|
159
156
|
type: 'DEFAULT',
|
|
160
157
|
autoLinkParent: false,
|
|
161
158
|
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 }))),
|
|
@@ -214,9 +211,6 @@ class MoveCboToApprovedFlowBuilder {
|
|
|
214
211
|
return {
|
|
215
212
|
entity: step.entity,
|
|
216
213
|
type: step.type,
|
|
217
|
-
schemaId: step.schemaId,
|
|
218
|
-
schemaActionId: step.schemaActionId,
|
|
219
|
-
schemaTypeId: step.schemaTypeId,
|
|
220
214
|
actionName: step.actionName,
|
|
221
215
|
properties: step.properties,
|
|
222
216
|
title: step.title,
|
|
@@ -225,7 +219,7 @@ class MoveCboToApprovedFlowBuilder {
|
|
|
225
219
|
groups: step.groups,
|
|
226
220
|
};
|
|
227
221
|
});
|
|
228
|
-
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveCboToApproved',
|
|
222
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveCboToApproved', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'CreditBuyOutStageApproved' }, this._options);
|
|
229
223
|
}
|
|
230
224
|
}
|
|
231
225
|
exports.MoveCboToApprovedFlowBuilder = MoveCboToApprovedFlowBuilder;
|
|
@@ -267,9 +261,6 @@ class MoveCboToReceivedFlowBuilder {
|
|
|
267
261
|
properties,
|
|
268
262
|
id,
|
|
269
263
|
entity: 'OrderModule:ContractBuyOut',
|
|
270
|
-
schemaId: '19150483-5fd7-44f5-a61f-1530b081f4ca',
|
|
271
|
-
schemaActionId: 'a91ed175-10bd-473d-b27c-caddb9d0079a',
|
|
272
|
-
schemaTypeId: 'abcdcb11-71d4-4f69-8f58-4eaa1dc47888',
|
|
273
264
|
type: 'DEFAULT',
|
|
274
265
|
autoLinkParent: false,
|
|
275
266
|
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 }))),
|
|
@@ -328,9 +319,6 @@ class MoveCboToReceivedFlowBuilder {
|
|
|
328
319
|
return {
|
|
329
320
|
entity: step.entity,
|
|
330
321
|
type: step.type,
|
|
331
|
-
schemaId: step.schemaId,
|
|
332
|
-
schemaActionId: step.schemaActionId,
|
|
333
|
-
schemaTypeId: step.schemaTypeId,
|
|
334
322
|
actionName: step.actionName,
|
|
335
323
|
properties: step.properties,
|
|
336
324
|
title: step.title,
|
|
@@ -339,7 +327,7 @@ class MoveCboToReceivedFlowBuilder {
|
|
|
339
327
|
groups: step.groups,
|
|
340
328
|
};
|
|
341
329
|
});
|
|
342
|
-
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveCboToReceived',
|
|
330
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveCboToReceived', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'CreditBuyOutStageReceived' }, this._options);
|
|
343
331
|
}
|
|
344
332
|
}
|
|
345
333
|
exports.MoveCboToReceivedFlowBuilder = MoveCboToReceivedFlowBuilder;
|
|
@@ -24,6 +24,7 @@ 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 { CrmDatasetProperties, AddressCrmDatasetProperties, ContactCrmDatasetProperties, LeadCrmDatasetProperties } from '../entities-v2/CrmDataset';
|
|
26
26
|
import { AssignOwnerProperties } from '../actions-v2/AssignOwnerDto';
|
|
27
|
+
import { CreateAddressCrmDatasetProperties } from '../actions-v2/CreateAddressCrmDatasetDto';
|
|
27
28
|
import { CrmDatasetCreateProperties } from '../actions-v2/CrmDatasetCreateDto';
|
|
28
29
|
import { CrmDatasetDefaultUpdateProperties } from '../actions-v2/CrmDatasetDefaultUpdateDto';
|
|
29
30
|
import { UpdateAddressDataSetProperties } from '../actions-v2/UpdateAddressDataSetDto';
|
|
@@ -322,6 +323,34 @@ export declare class CrmDatasetRecord<TProps = CrmDatasetProperties> {
|
|
|
322
323
|
unlink(target: OdinRecord<any> | {
|
|
323
324
|
id: string;
|
|
324
325
|
} | string): Promise<void>;
|
|
326
|
+
/**
|
|
327
|
+
* CreateAddressCrmDataset
|
|
328
|
+
*
|
|
329
|
+
* Creates a new CrmDataset record with the specified properties.
|
|
330
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
331
|
+
*
|
|
332
|
+
* @remarks Record type: ADDRESS
|
|
333
|
+
*
|
|
334
|
+
* @param properties - The properties for the new record
|
|
335
|
+
* @param options - Optional settings
|
|
336
|
+
* @param options.journeyId - Associate with a journey
|
|
337
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
338
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* ```typescript
|
|
342
|
+
* // Create with properties
|
|
343
|
+
* const record = odinClient.crmDatasets.new();
|
|
344
|
+
* await record.createAddressCrmDataset({ ... }).execute();
|
|
345
|
+
*
|
|
346
|
+
* // Dry run (for debugging)
|
|
347
|
+
* const payload = record.createAddressCrmDataset({ ... }).dryRun();
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
createAddressCrmDataset(properties: CreateAddressCrmDatasetProperties, options?: {
|
|
351
|
+
journeyId?: string;
|
|
352
|
+
stageKey?: string;
|
|
353
|
+
}): ActionBuilder;
|
|
325
354
|
/**
|
|
326
355
|
* CrmDatasetCreate
|
|
327
356
|
*
|
|
@@ -433,6 +433,42 @@ class CrmDatasetRecord {
|
|
|
433
433
|
// ============================================
|
|
434
434
|
// CREATE ACTIONS (no existing record required)
|
|
435
435
|
// ============================================
|
|
436
|
+
/**
|
|
437
|
+
* CreateAddressCrmDataset
|
|
438
|
+
*
|
|
439
|
+
* Creates a new CrmDataset record with the specified properties.
|
|
440
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
441
|
+
*
|
|
442
|
+
* @remarks Record type: ADDRESS
|
|
443
|
+
*
|
|
444
|
+
* @param properties - The properties for the new record
|
|
445
|
+
* @param options - Optional settings
|
|
446
|
+
* @param options.journeyId - Associate with a journey
|
|
447
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
448
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* ```typescript
|
|
452
|
+
* // Create with properties
|
|
453
|
+
* const record = odinClient.crmDatasets.new();
|
|
454
|
+
* await record.createAddressCrmDataset({ ... }).execute();
|
|
455
|
+
*
|
|
456
|
+
* // Dry run (for debugging)
|
|
457
|
+
* const payload = record.createAddressCrmDataset({ ... }).dryRun();
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
460
|
+
createAddressCrmDataset(properties, options) {
|
|
461
|
+
const payload = {
|
|
462
|
+
entity: 'CrmModule:CrmDataset',
|
|
463
|
+
type: 'ADDRESS',
|
|
464
|
+
actionName: 'CreateAddressCrmDataset',
|
|
465
|
+
properties: properties || {},
|
|
466
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
467
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
468
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
469
|
+
};
|
|
470
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'CrmDataset', payload, () => { this._pendingLinks = []; });
|
|
471
|
+
}
|
|
436
472
|
/**
|
|
437
473
|
* CrmDatasetCreate
|
|
438
474
|
*
|
|
@@ -151,9 +151,6 @@ class RequestToReplaceOntFlowBuilder {
|
|
|
151
151
|
actionName: 'CreateOntReplacementApproval',
|
|
152
152
|
properties,
|
|
153
153
|
entity: 'FieldServiceModule:OntReplacementApproval',
|
|
154
|
-
schemaId: '152729af-59d6-48d0-9047-df2ed1b08a1e',
|
|
155
|
-
schemaActionId: 'e0849f1c-1a2c-428d-8918-88d6dcfdcd4f',
|
|
156
|
-
schemaTypeId: '8cb55e11-b5f4-48c1-b78a-20220154a436',
|
|
157
154
|
type: 'DEFAULT',
|
|
158
155
|
autoLinkParent: true,
|
|
159
156
|
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 }))),
|
|
@@ -210,9 +207,6 @@ class RequestToReplaceOntFlowBuilder {
|
|
|
210
207
|
return {
|
|
211
208
|
entity: step.entity,
|
|
212
209
|
type: step.type,
|
|
213
|
-
schemaId: step.schemaId,
|
|
214
|
-
schemaActionId: step.schemaActionId,
|
|
215
|
-
schemaTypeId: step.schemaTypeId,
|
|
216
210
|
actionName: step.actionName,
|
|
217
211
|
properties: step.properties,
|
|
218
212
|
title: step.title,
|
|
@@ -221,7 +215,7 @@ class RequestToReplaceOntFlowBuilder {
|
|
|
221
215
|
groups: step.groups,
|
|
222
216
|
};
|
|
223
217
|
});
|
|
224
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'ServiceModule:CustomerDeviceOnt', actionName: 'RequestToReplaceOnt',
|
|
218
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'ServiceModule:CustomerDeviceOnt', actionName: 'RequestToReplaceOnt', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
|
|
225
219
|
}
|
|
226
220
|
}
|
|
227
221
|
exports.RequestToReplaceOntFlowBuilder = RequestToReplaceOntFlowBuilder;
|
|
@@ -22,7 +22,6 @@ 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 { LeadProperties } from '../entities-v2/Lead';
|
|
24
24
|
import { CreateLeadProperties } from '../actions-v2/CreateLeadDto';
|
|
25
|
-
import { CreateLeadFromBrskProperties } from '../actions-v2/CreateLeadFromBrskDto';
|
|
26
25
|
import { UpdateLeadProperties } from '../actions-v2/UpdateLeadDto';
|
|
27
26
|
import { NoteRecord } from './NoteRecord';
|
|
28
27
|
import { CallRecord } from './CallRecord';
|
|
@@ -421,34 +420,6 @@ export declare class LeadRecord<TProps = LeadProperties> {
|
|
|
421
420
|
journeyId?: string;
|
|
422
421
|
stageKey?: string;
|
|
423
422
|
}): ActionBuilder;
|
|
424
|
-
/**
|
|
425
|
-
* CreateLeadFromBrsk
|
|
426
|
-
*
|
|
427
|
-
* Creates a new Lead record with the specified properties.
|
|
428
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
429
|
-
*
|
|
430
|
-
* @param properties - The properties for the new record
|
|
431
|
-
* @param options - Optional settings
|
|
432
|
-
* @param options.type - Override the record type
|
|
433
|
-
* @param options.journeyId - Associate with a journey
|
|
434
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
435
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
436
|
-
*
|
|
437
|
-
* @example
|
|
438
|
-
* ```typescript
|
|
439
|
-
* // Create with properties
|
|
440
|
-
* const record = odinClient.leads.new();
|
|
441
|
-
* await record.createLeadFromBrsk({ ... }).execute();
|
|
442
|
-
*
|
|
443
|
-
* // Dry run (for debugging)
|
|
444
|
-
* const payload = record.createLeadFromBrsk({ ... }).dryRun();
|
|
445
|
-
* ```
|
|
446
|
-
*/
|
|
447
|
-
createLeadFromBrsk(properties: CreateLeadFromBrskProperties, options?: {
|
|
448
|
-
type?: string;
|
|
449
|
-
journeyId?: string;
|
|
450
|
-
stageKey?: string;
|
|
451
|
-
}): ActionBuilder;
|
|
452
423
|
/**
|
|
453
424
|
* MoveLeadToContacted
|
|
454
425
|
*
|
|
@@ -617,42 +617,6 @@ class LeadRecord {
|
|
|
617
617
|
};
|
|
618
618
|
return new ActionBuilder(this._provider, 'CrmModule', 'Lead', payload, () => { this._pendingLinks = []; });
|
|
619
619
|
}
|
|
620
|
-
/**
|
|
621
|
-
* CreateLeadFromBrsk
|
|
622
|
-
*
|
|
623
|
-
* Creates a new Lead record with the specified properties.
|
|
624
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
625
|
-
*
|
|
626
|
-
* @param properties - The properties for the new record
|
|
627
|
-
* @param options - Optional settings
|
|
628
|
-
* @param options.type - Override the record type
|
|
629
|
-
* @param options.journeyId - Associate with a journey
|
|
630
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
631
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
632
|
-
*
|
|
633
|
-
* @example
|
|
634
|
-
* ```typescript
|
|
635
|
-
* // Create with properties
|
|
636
|
-
* const record = odinClient.leads.new();
|
|
637
|
-
* await record.createLeadFromBrsk({ ... }).execute();
|
|
638
|
-
*
|
|
639
|
-
* // Dry run (for debugging)
|
|
640
|
-
* const payload = record.createLeadFromBrsk({ ... }).dryRun();
|
|
641
|
-
* ```
|
|
642
|
-
*/
|
|
643
|
-
createLeadFromBrsk(properties, options) {
|
|
644
|
-
var _a, _b;
|
|
645
|
-
const payload = {
|
|
646
|
-
entity: 'CrmModule:Lead',
|
|
647
|
-
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,
|
|
648
|
-
actionName: 'CreateLeadFromBrsk',
|
|
649
|
-
properties: properties || {},
|
|
650
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
651
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
652
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
653
|
-
};
|
|
654
|
-
return new ActionBuilder(this._provider, 'CrmModule', 'Lead', payload, () => { this._pendingLinks = []; });
|
|
655
|
-
}
|
|
656
620
|
// ============================================
|
|
657
621
|
// UPDATE ACTIONS (require existing record)
|
|
658
622
|
// ============================================
|
|
@@ -21,7 +21,6 @@ import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/
|
|
|
21
21
|
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 { OrderItemProperties } from '../entities-v2/OrderItem';
|
|
24
|
-
import { CreateOrderItemFromBrskProperties } from '../actions-v2/CreateOrderItemFromBrskDto';
|
|
25
24
|
import { CreateRecontractOrderItemProperties } from '../actions-v2/CreateRecontractOrderItemDto';
|
|
26
25
|
import { OrderItemUpdateProperties } from '../actions-v2/OrderItemUpdateDto';
|
|
27
26
|
import { PriceMatchProperties } from '../actions-v2/PriceMatchDto';
|
|
@@ -435,34 +434,6 @@ export declare class OrderItemRecord<TProps = OrderItemProperties> {
|
|
|
435
434
|
unlink(target: OdinRecord<any> | {
|
|
436
435
|
id: string;
|
|
437
436
|
} | string): Promise<void>;
|
|
438
|
-
/**
|
|
439
|
-
* CreateOrderItemFromBrsk
|
|
440
|
-
*
|
|
441
|
-
* Creates a new OrderItem record with the specified properties.
|
|
442
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
443
|
-
*
|
|
444
|
-
* @param properties - The properties for the new record
|
|
445
|
-
* @param options - Optional settings
|
|
446
|
-
* @param options.type - Override the record type
|
|
447
|
-
* @param options.journeyId - Associate with a journey
|
|
448
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
449
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
450
|
-
*
|
|
451
|
-
* @example
|
|
452
|
-
* ```typescript
|
|
453
|
-
* // Create with properties
|
|
454
|
-
* const record = odinClient.orderItems.new();
|
|
455
|
-
* await record.createOrderItemFromBrsk({ ... }).execute();
|
|
456
|
-
*
|
|
457
|
-
* // Dry run (for debugging)
|
|
458
|
-
* const payload = record.createOrderItemFromBrsk({ ... }).dryRun();
|
|
459
|
-
* ```
|
|
460
|
-
*/
|
|
461
|
-
createOrderItemFromBrsk(properties?: CreateOrderItemFromBrskProperties, options?: {
|
|
462
|
-
type?: string;
|
|
463
|
-
journeyId?: string;
|
|
464
|
-
stageKey?: string;
|
|
465
|
-
}): ActionBuilder;
|
|
466
437
|
/**
|
|
467
438
|
* CreateRecontractOrderItem
|
|
468
439
|
*
|
|
@@ -642,42 +642,6 @@ class OrderItemRecord {
|
|
|
642
642
|
// ============================================
|
|
643
643
|
// CREATE ACTIONS (no existing record required)
|
|
644
644
|
// ============================================
|
|
645
|
-
/**
|
|
646
|
-
* CreateOrderItemFromBrsk
|
|
647
|
-
*
|
|
648
|
-
* Creates a new OrderItem record with the specified properties.
|
|
649
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
650
|
-
*
|
|
651
|
-
* @param properties - The properties for the new record
|
|
652
|
-
* @param options - Optional settings
|
|
653
|
-
* @param options.type - Override the record type
|
|
654
|
-
* @param options.journeyId - Associate with a journey
|
|
655
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
656
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
657
|
-
*
|
|
658
|
-
* @example
|
|
659
|
-
* ```typescript
|
|
660
|
-
* // Create with properties
|
|
661
|
-
* const record = odinClient.orderItems.new();
|
|
662
|
-
* await record.createOrderItemFromBrsk({ ... }).execute();
|
|
663
|
-
*
|
|
664
|
-
* // Dry run (for debugging)
|
|
665
|
-
* const payload = record.createOrderItemFromBrsk({ ... }).dryRun();
|
|
666
|
-
* ```
|
|
667
|
-
*/
|
|
668
|
-
createOrderItemFromBrsk(properties, options) {
|
|
669
|
-
var _a, _b;
|
|
670
|
-
const payload = {
|
|
671
|
-
entity: 'OrderModule:OrderItem',
|
|
672
|
-
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,
|
|
673
|
-
actionName: 'CreateOrderItemFromBrsk',
|
|
674
|
-
properties: properties || {},
|
|
675
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
676
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
677
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
678
|
-
};
|
|
679
|
-
return new ActionBuilder(this._provider, 'OrderModule', 'OrderItem', payload, () => { this._pendingLinks = []; });
|
|
680
|
-
}
|
|
681
645
|
/**
|
|
682
646
|
* CreateRecontractOrderItem
|
|
683
647
|
*
|
|
@@ -29,7 +29,6 @@ import { ClearOrderDeactivateOnDateProperties } from '../actions-v2/ClearOrderDe
|
|
|
29
29
|
import { CreateCollectionAmcoWorkOrderProperties } from '../actions-v2/CreateCollectionAmcoWorkOrderFromOrderDto';
|
|
30
30
|
import { CreateCollectionWorkOrderProperties } from '../actions-v2/CreateCollectionWorkOrderFromOrderDto';
|
|
31
31
|
import { CreateDispatchAmcoWorkOrderProperties } from '../actions-v2/CreateDispatchAmcoWorkOrderFromOrderDto';
|
|
32
|
-
import { CreateOrderFromBrskProperties } from '../actions-v2/CreateOrderFromBrskDto';
|
|
33
32
|
import { CreateRecontractOrderProperties } from '../actions-v2/CreateRecontractOrderDto';
|
|
34
33
|
import { ManageCommisionProperties } from '../actions-v2/ManageCommisionDto';
|
|
35
34
|
import { OderUpdateProperties } from '../actions-v2/OderUpdateDto';
|
|
@@ -46,7 +45,6 @@ import { FieldServiceDispatchedProductRecord } from './FieldServiceDispatchedPro
|
|
|
46
45
|
import { AccountRecord } from './AccountRecord';
|
|
47
46
|
import { PICRequestRecord } from './PICRequestRecord';
|
|
48
47
|
import { OrderItemRecord } from './OrderItemRecord';
|
|
49
|
-
import { PhoneNumberRecord } from './PhoneNumberRecord';
|
|
50
48
|
import { NoteRecord } from './NoteRecord';
|
|
51
49
|
import { SmsMessageRecord } from './SmsMessageRecord';
|
|
52
50
|
import { OneTouchSwitchRecord } from './OneTouchSwitchRecord';
|
|
@@ -633,7 +631,6 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
633
631
|
private _accounts?;
|
|
634
632
|
private _picRequests?;
|
|
635
633
|
private _orderItems?;
|
|
636
|
-
private _phoneNumbers?;
|
|
637
634
|
private _notes?;
|
|
638
635
|
private _smsMessages?;
|
|
639
636
|
private _oneTouchSwitches?;
|
|
@@ -843,24 +840,6 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
843
840
|
* ```
|
|
844
841
|
*/
|
|
845
842
|
get orderItems(): RecordLinkManager<OrderItemRecord, typeof OrderRecord['orderItemsLabels'][number]>;
|
|
846
|
-
/** Valid labels for PhoneNumber associations */
|
|
847
|
-
static readonly phoneNumbersLabels: readonly ["Order__PhoneNumber"];
|
|
848
|
-
/**
|
|
849
|
-
* Access linked PhoneNumber records
|
|
850
|
-
* @remarks Available labels: Order__PhoneNumber
|
|
851
|
-
* @throws Error if called on a new (unsaved) record
|
|
852
|
-
*
|
|
853
|
-
* @example
|
|
854
|
-
* ```typescript
|
|
855
|
-
* // Get all linked PhoneNumber records
|
|
856
|
-
* const items = await record.phoneNumbers.list();
|
|
857
|
-
* const first = await record.phoneNumbers.first();
|
|
858
|
-
*
|
|
859
|
-
* // Filter by label
|
|
860
|
-
* const specific = await record.phoneNumbers.first({ label: 'Order__PhoneNumber' });
|
|
861
|
-
* ```
|
|
862
|
-
*/
|
|
863
|
-
get phoneNumbers(): RecordLinkManager<PhoneNumberRecord, typeof OrderRecord['phoneNumbersLabels'][number]>;
|
|
864
843
|
/** Valid labels for Note associations */
|
|
865
844
|
static readonly notesLabels: readonly ["Order__Note"];
|
|
866
845
|
/**
|
|
@@ -1278,34 +1257,6 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
1278
1257
|
unlink(target: OdinRecord<any> | {
|
|
1279
1258
|
id: string;
|
|
1280
1259
|
} | string): Promise<void>;
|
|
1281
|
-
/**
|
|
1282
|
-
* CreateOrderFromBrsk
|
|
1283
|
-
*
|
|
1284
|
-
* Creates a new Order record with the specified properties.
|
|
1285
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1286
|
-
*
|
|
1287
|
-
* @param properties - The properties for the new record
|
|
1288
|
-
* @param options - Optional settings
|
|
1289
|
-
* @param options.type - Override the record type
|
|
1290
|
-
* @param options.journeyId - Associate with a journey
|
|
1291
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
1292
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1293
|
-
*
|
|
1294
|
-
* @example
|
|
1295
|
-
* ```typescript
|
|
1296
|
-
* // Create with properties
|
|
1297
|
-
* const record = odinClient.orders.new();
|
|
1298
|
-
* await record.createOrderFromBrsk({ ... }).execute();
|
|
1299
|
-
*
|
|
1300
|
-
* // Dry run (for debugging)
|
|
1301
|
-
* const payload = record.createOrderFromBrsk({ ... }).dryRun();
|
|
1302
|
-
* ```
|
|
1303
|
-
*/
|
|
1304
|
-
createOrderFromBrsk(properties?: CreateOrderFromBrskProperties, options?: {
|
|
1305
|
-
type?: string;
|
|
1306
|
-
journeyId?: string;
|
|
1307
|
-
stageKey?: string;
|
|
1308
|
-
}): ActionBuilder;
|
|
1309
1260
|
/**
|
|
1310
1261
|
* CreateRecontractOrder
|
|
1311
1262
|
*
|
|
@@ -1879,56 +1830,6 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
1879
1830
|
moveOrderFromPreOrderToCancelled(options?: {
|
|
1880
1831
|
journeyId?: string;
|
|
1881
1832
|
}): ActionBuilder;
|
|
1882
|
-
/**
|
|
1883
|
-
* MoveOrderFromSupplyToActive
|
|
1884
|
-
*
|
|
1885
|
-
* Transitions this Order record to a new pipeline stage.
|
|
1886
|
-
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
1887
|
-
*
|
|
1888
|
-
* @remarks Transitions to stage: OrderStageActive
|
|
1889
|
-
*
|
|
1890
|
-
* @param options - Optional settings
|
|
1891
|
-
* @param options.journeyId - Associate with a journey
|
|
1892
|
-
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
1893
|
-
* @throws Error if called on a new (unsaved) record
|
|
1894
|
-
*
|
|
1895
|
-
* @example
|
|
1896
|
-
* ```typescript
|
|
1897
|
-
* const record = await odinClient.orders.get(id);
|
|
1898
|
-
* await record.moveOrderFromSupplyToActive().execute();
|
|
1899
|
-
*
|
|
1900
|
-
* // Dry run (for debugging)
|
|
1901
|
-
* const payload = record.moveOrderFromSupplyToActive().dryRun();
|
|
1902
|
-
* ```
|
|
1903
|
-
*/
|
|
1904
|
-
moveOrderFromSupplyToActive(options?: {
|
|
1905
|
-
journeyId?: string;
|
|
1906
|
-
}): ActionBuilder;
|
|
1907
|
-
/**
|
|
1908
|
-
* MoveOrderFromSupplyToCancelled
|
|
1909
|
-
*
|
|
1910
|
-
* Transitions this Order record to a new pipeline stage.
|
|
1911
|
-
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
1912
|
-
*
|
|
1913
|
-
* @remarks Transitions to stage: OrderStageCancelled
|
|
1914
|
-
*
|
|
1915
|
-
* @param options - Optional settings
|
|
1916
|
-
* @param options.journeyId - Associate with a journey
|
|
1917
|
-
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
1918
|
-
* @throws Error if called on a new (unsaved) record
|
|
1919
|
-
*
|
|
1920
|
-
* @example
|
|
1921
|
-
* ```typescript
|
|
1922
|
-
* const record = await odinClient.orders.get(id);
|
|
1923
|
-
* await record.moveOrderFromSupplyToCancelled().execute();
|
|
1924
|
-
*
|
|
1925
|
-
* // Dry run (for debugging)
|
|
1926
|
-
* const payload = record.moveOrderFromSupplyToCancelled().dryRun();
|
|
1927
|
-
* ```
|
|
1928
|
-
*/
|
|
1929
|
-
moveOrderFromSupplyToCancelled(options?: {
|
|
1930
|
-
journeyId?: string;
|
|
1931
|
-
}): ActionBuilder;
|
|
1932
1833
|
/**
|
|
1933
1834
|
* MoveOrderToActive
|
|
1934
1835
|
*
|