@d19n/youfibre-odin-sdk 2.0.370 → 2.0.372
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 +7 -3
- package/dist/actions-v2/CreateNoteForCaseSalesAppDto.d.ts +73 -0
- package/dist/actions-v2/CreateNoteForCaseSalesAppDto.js +59 -0
- package/dist/actions-v2/CreateOutboundDialCampaignDto.d.ts +8 -1
- package/dist/actions-v2/MoveCaseToSolvedWithNoteSalesAppDto.d.ts +171 -0
- package/dist/actions-v2/MoveCaseToSolvedWithNoteSalesAppDto.js +124 -0
- package/dist/actions-v2/OrderBuilderUpdateContactDto.d.ts +182 -0
- package/dist/actions-v2/OrderBuilderUpdateContactDto.js +56 -0
- package/dist/actions-v2/UpdateOutboundDialCampaignCaseDto.d.ts +15 -1
- package/dist/actions-v2/UpdateOutboundDialCampaignCaseOnDialEndDto.d.ts +15 -1
- package/dist/actions-v2/UpdateoutbounddialcampaignDto.d.ts +8 -1
- package/dist/api-sdk-v2/QaBatchApi.d.ts +48 -0
- package/dist/api-sdk-v2/QaBatchApi.js +155 -0
- package/dist/api-sdk-v2/QaReportApi.d.ts +2 -0
- package/dist/api-sdk-v2/QaReportApi.js +6 -0
- package/dist/db-sdk-v2/QaBatchDb.d.ts +120 -0
- package/dist/db-sdk-v2/QaBatchDb.js +204 -0
- package/dist/db-sdk-v2/QaReportDb.d.ts +2 -0
- package/dist/db-sdk-v2/QaReportDb.js +6 -0
- package/dist/entities-v2/AiRouteRequest.d.ts +2 -0
- package/dist/entities-v2/AiRouteRequest.js +2 -0
- package/dist/entities-v2/Document.d.ts +821 -12
- package/dist/entities-v2/Document.js +63 -1
- package/dist/entities-v2/DocumentProcessing.d.ts +7 -1
- package/dist/entities-v2/DocumentProcessing.js +6 -0
- package/dist/entities-v2/EquipmentReturnItem.d.ts +6 -6
- package/dist/entities-v2/EquipmentReturnItem.js +6 -6
- package/dist/entities-v2/HomeMove.d.ts +23 -1
- package/dist/entities-v2/HomeMove.js +17 -1
- package/dist/entities-v2/Note.d.ts +9 -9
- package/dist/entities-v2/Note.js +2 -2
- package/dist/entities-v2/Order.d.ts +9 -1
- package/dist/entities-v2/Order.js +2 -0
- package/dist/entities-v2/OutboundDialCampaign.d.ts +9 -1
- package/dist/entities-v2/OutboundDialCampaign.js +2 -0
- package/dist/entities-v2/OutboundDialCampaignCase.d.ts +17 -1
- package/dist/entities-v2/OutboundDialCampaignCase.js +4 -0
- package/dist/entities-v2/QaBatch.d.ts +235 -0
- package/dist/entities-v2/QaBatch.js +122 -0
- package/dist/entities-v2/QaReport.d.ts +12 -1
- package/dist/entities-v2/QaReport.js +2 -0
- package/dist/entities-v2/Recontract.d.ts +17 -1
- package/dist/entities-v2/Recontract.js +4 -0
- package/dist/entities-v2/Returns.d.ts +30 -30
- package/dist/entities-v2/Returns.js +30 -30
- package/dist/records-v2/CaseRecord.d.ts +87 -0
- package/dist/records-v2/CaseRecord.js +133 -1
- package/dist/records-v2/ContactRecord.d.ts +27 -0
- package/dist/records-v2/ContactRecord.js +29 -0
- package/dist/records-v2/DocumentRecord.d.ts +35 -3
- package/dist/records-v2/DocumentRecord.js +33 -1
- package/dist/records-v2/NoteRecord.d.ts +29 -0
- package/dist/records-v2/NoteRecord.js +36 -0
- package/package.json +1 -1
|
@@ -48,6 +48,7 @@ import { MoveCaseOutageToSolvedAction2Properties } from '../actions-v2/MoveCaseO
|
|
|
48
48
|
import { MoveCaseOutageToSolvedActionProperties } from '../actions-v2/MoveCaseOutageToSolvedActionDto';
|
|
49
49
|
import { UpdateAdditionalNoteProperties } from '../actions-v2/MoveCaseToClosedWithAdditionalNoteDto';
|
|
50
50
|
import { MoveCaseToSolvedActionProperties } from '../actions-v2/MoveCaseToSolvedActionDto';
|
|
51
|
+
import { CreateNoteForCaseSalesAppProperties } from '../actions-v2/MoveCaseToSolvedWithNoteSalesAppDto';
|
|
51
52
|
import { RecordAiTagsAccuracyProperties } from '../actions-v2/RecordAiTagsAccuracyDto';
|
|
52
53
|
import { RemoveAssignmentFromCaseProperties } from '../actions-v2/RemoveAssignmentFromCaseDto';
|
|
53
54
|
import { ReturnCaseToAgentOnCustomerReplyProperties } from '../actions-v2/ReturnCaseToAgentOnCustomerReplyDto';
|
|
@@ -1184,6 +1185,68 @@ export declare class MoveCaseToClosedWithAdditionalNoteFlowBuilder {
|
|
|
1184
1185
|
private _buildRequestPayload;
|
|
1185
1186
|
}
|
|
1186
1187
|
/** Options for a flow step */
|
|
1188
|
+
export interface MoveCaseToSolvedWithNoteSalesAppFlowBuilderStepOptions {
|
|
1189
|
+
/** Associations to create with this step */
|
|
1190
|
+
associations?: Array<{
|
|
1191
|
+
recordId?: string;
|
|
1192
|
+
entity?: string;
|
|
1193
|
+
}>;
|
|
1194
|
+
/** Groups for this step */
|
|
1195
|
+
groups?: string[];
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* FlowBuilder for MoveCaseToSolvedWithNoteSalesApp multi-step action
|
|
1199
|
+
*
|
|
1200
|
+
* Use method chaining to add steps, then call execute() to run the flow.
|
|
1201
|
+
* This is a CREATE flow - no existing record required.
|
|
1202
|
+
* Transitions to stage: CaseDefaultStageSolved
|
|
1203
|
+
*/
|
|
1204
|
+
export declare class MoveCaseToSolvedWithNoteSalesAppFlowBuilder {
|
|
1205
|
+
private _record;
|
|
1206
|
+
private _provider;
|
|
1207
|
+
private _pendingLinks;
|
|
1208
|
+
private _options?;
|
|
1209
|
+
private _groups;
|
|
1210
|
+
private _steps;
|
|
1211
|
+
constructor(record: CaseRecord<any>, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
|
|
1212
|
+
journeyId?: string;
|
|
1213
|
+
});
|
|
1214
|
+
/**
|
|
1215
|
+
* Add a group to the main action
|
|
1216
|
+
* @param group - Group name to add
|
|
1217
|
+
* @returns this (for method chaining)
|
|
1218
|
+
*/
|
|
1219
|
+
addGroup(group: string): this;
|
|
1220
|
+
/**
|
|
1221
|
+
* Add CreateNoteForCaseSalesApp step to the flow
|
|
1222
|
+
* @param properties - Properties for this step
|
|
1223
|
+
* @param options - Optional step settings
|
|
1224
|
+
* @returns this (for method chaining)
|
|
1225
|
+
*/
|
|
1226
|
+
createNoteForCaseSalesApp(properties: CreateNoteForCaseSalesAppProperties, options?: MoveCaseToSolvedWithNoteSalesAppFlowBuilderStepOptions): this;
|
|
1227
|
+
/**
|
|
1228
|
+
* Execute the flow
|
|
1229
|
+
* @returns The result from the API
|
|
1230
|
+
*/
|
|
1231
|
+
execute(): Promise<IDbRecordCreateUpdateRes[]>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Returns the request payload without executing (for debugging)
|
|
1234
|
+
* @returns The request payload that would be sent to the API
|
|
1235
|
+
*/
|
|
1236
|
+
dryRun(): Record<string, any>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Prevents accidental `await flowBuilder` without .execute()
|
|
1239
|
+
* Forces developers to explicitly call .execute()
|
|
1240
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
1241
|
+
*/
|
|
1242
|
+
then(): never;
|
|
1243
|
+
/**
|
|
1244
|
+
* Build the request payload for the action
|
|
1245
|
+
* @private
|
|
1246
|
+
*/
|
|
1247
|
+
private _buildRequestPayload;
|
|
1248
|
+
}
|
|
1249
|
+
/** Options for a flow step */
|
|
1187
1250
|
export interface MoveDefaultCaseFromOpenToClosedFlowBuilderStepOptions {
|
|
1188
1251
|
/** Associations to create with this step */
|
|
1189
1252
|
associations?: Array<{
|
|
@@ -2959,6 +3022,30 @@ export declare class CaseRecord<TProps = CaseProperties> {
|
|
|
2959
3022
|
moveCaseToSolvedTransition(options?: {
|
|
2960
3023
|
journeyId?: string;
|
|
2961
3024
|
}): ActionBuilder;
|
|
3025
|
+
/**
|
|
3026
|
+
* MoveCaseToSolvedWithNoteSalesApp
|
|
3027
|
+
*
|
|
3028
|
+
* Starts a stage transition flow on this Case record.
|
|
3029
|
+
* Chain step methods and call .execute() to run the flow.
|
|
3030
|
+
*
|
|
3031
|
+
* @remarks Transitions to stage: CaseDefaultStageSolved
|
|
3032
|
+
*
|
|
3033
|
+
* @param options - Optional settings
|
|
3034
|
+
* @param options.journeyId - Associate with a journey
|
|
3035
|
+
* @returns FlowBuilder for chaining step methods
|
|
3036
|
+
* @throws Error if called on a new (unsaved) record
|
|
3037
|
+
*
|
|
3038
|
+
* @example
|
|
3039
|
+
* ```typescript
|
|
3040
|
+
* const record = await odinClient.cases.get(id);
|
|
3041
|
+
* await record.moveCaseToSolvedWithNoteSalesApp()
|
|
3042
|
+
* .createNoteForCaseSalesApp({ ... })
|
|
3043
|
+
* .execute();
|
|
3044
|
+
* ```
|
|
3045
|
+
*/
|
|
3046
|
+
moveCaseToSolvedWithNoteSalesApp(options?: {
|
|
3047
|
+
journeyId?: string;
|
|
3048
|
+
}): MoveCaseToSolvedWithNoteSalesAppFlowBuilder;
|
|
2962
3049
|
/**
|
|
2963
3050
|
* MoveDefaultCaseFromAnyStageToPendingAgent
|
|
2964
3051
|
*
|
|
@@ -28,7 +28,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.isCaseRecord = exports.CaseRecord = exports.TestingCsatUpdateFlowFlowBuilder = exports.MoveDefaultCaseFromOpenToClosedFlowBuilder = exports.MoveCaseToClosedWithAdditionalNoteFlowBuilder = exports.MoveCaseToBlockedTransitionFlowBuilder = exports.EscalateCaseTransitionFlowBuilder = exports.CasteTransitionOpenToEscalatedFlowBuilder = exports.CasedefaultstageblockedFlowBuilder = exports.CaseTransitionSolvedToEscalatedFlowBuilder = exports.CaseTransitionPendingReplyToEscalatedFlowBuilder = exports.CaseTransitionPendingReplyToBlockedFlowBuilder = exports.CaseTransitionPendingAgentToEscalatedFlowBuilder = exports.CaseTransitionPendingAgentToBlockedFlowBuilder = exports.CaseTransitionOpenToBlockedFlowBuilder = exports.CaseTransitionEscalatedToEscalatedFlowBuilder = exports.CaseTransitionEscalatedToBlockedFlowBuilder = exports.CaseTransitionBlockedToEscalatedFlowBuilder = exports.CaseDefaultStageEscalatedFlowBuilder = exports.AssignCaseWithNoteFlowFlowBuilder = void 0;
|
|
31
|
+
exports.isCaseRecord = exports.CaseRecord = exports.TestingCsatUpdateFlowFlowBuilder = exports.MoveDefaultCaseFromOpenToClosedFlowBuilder = exports.MoveCaseToSolvedWithNoteSalesAppFlowBuilder = exports.MoveCaseToClosedWithAdditionalNoteFlowBuilder = exports.MoveCaseToBlockedTransitionFlowBuilder = exports.EscalateCaseTransitionFlowBuilder = exports.CasteTransitionOpenToEscalatedFlowBuilder = exports.CasedefaultstageblockedFlowBuilder = exports.CaseTransitionSolvedToEscalatedFlowBuilder = exports.CaseTransitionPendingReplyToEscalatedFlowBuilder = exports.CaseTransitionPendingReplyToBlockedFlowBuilder = exports.CaseTransitionPendingAgentToEscalatedFlowBuilder = exports.CaseTransitionPendingAgentToBlockedFlowBuilder = exports.CaseTransitionOpenToBlockedFlowBuilder = exports.CaseTransitionEscalatedToEscalatedFlowBuilder = exports.CaseTransitionEscalatedToBlockedFlowBuilder = exports.CaseTransitionBlockedToEscalatedFlowBuilder = exports.CaseDefaultStageEscalatedFlowBuilder = exports.AssignCaseWithNoteFlowFlowBuilder = 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");
|
|
@@ -1981,6 +1981,111 @@ class MoveCaseToClosedWithAdditionalNoteFlowBuilder {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
}
|
|
1983
1983
|
exports.MoveCaseToClosedWithAdditionalNoteFlowBuilder = MoveCaseToClosedWithAdditionalNoteFlowBuilder;
|
|
1984
|
+
/**
|
|
1985
|
+
* FlowBuilder for MoveCaseToSolvedWithNoteSalesApp multi-step action
|
|
1986
|
+
*
|
|
1987
|
+
* Use method chaining to add steps, then call execute() to run the flow.
|
|
1988
|
+
* This is a CREATE flow - no existing record required.
|
|
1989
|
+
* Transitions to stage: CaseDefaultStageSolved
|
|
1990
|
+
*/
|
|
1991
|
+
class MoveCaseToSolvedWithNoteSalesAppFlowBuilder {
|
|
1992
|
+
constructor(record, provider, pendingLinks, options) {
|
|
1993
|
+
this._groups = [];
|
|
1994
|
+
this._steps = [];
|
|
1995
|
+
this._record = record;
|
|
1996
|
+
this._provider = provider;
|
|
1997
|
+
this._pendingLinks = pendingLinks;
|
|
1998
|
+
this._options = options;
|
|
1999
|
+
}
|
|
2000
|
+
/**
|
|
2001
|
+
* Add a group to the main action
|
|
2002
|
+
* @param group - Group name to add
|
|
2003
|
+
* @returns this (for method chaining)
|
|
2004
|
+
*/
|
|
2005
|
+
addGroup(group) {
|
|
2006
|
+
this._groups.push(group);
|
|
2007
|
+
return this;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* Add CreateNoteForCaseSalesApp step to the flow
|
|
2011
|
+
* @param properties - Properties for this step
|
|
2012
|
+
* @param options - Optional step settings
|
|
2013
|
+
* @returns this (for method chaining)
|
|
2014
|
+
*/
|
|
2015
|
+
createNoteForCaseSalesApp(properties, options) {
|
|
2016
|
+
var _a;
|
|
2017
|
+
this._steps.push({
|
|
2018
|
+
actionName: 'CreateNoteForCaseSalesApp',
|
|
2019
|
+
properties,
|
|
2020
|
+
entity: 'SupportModule:Note',
|
|
2021
|
+
type: 'DEFAULT',
|
|
2022
|
+
autoLinkParent: true,
|
|
2023
|
+
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 }))),
|
|
2024
|
+
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
2025
|
+
});
|
|
2026
|
+
return this;
|
|
2027
|
+
}
|
|
2028
|
+
/**
|
|
2029
|
+
* Execute the flow
|
|
2030
|
+
* @returns The result from the API
|
|
2031
|
+
*/
|
|
2032
|
+
execute() {
|
|
2033
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2034
|
+
const payload = this._buildRequestPayload();
|
|
2035
|
+
const result = yield this._provider._applyAction('SupportModule', 'Case', payload);
|
|
2036
|
+
// Clear pending links on the record after execution
|
|
2037
|
+
this._record.clearPendingLinks();
|
|
2038
|
+
return result;
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
/**
|
|
2042
|
+
* Returns the request payload without executing (for debugging)
|
|
2043
|
+
* @returns The request payload that would be sent to the API
|
|
2044
|
+
*/
|
|
2045
|
+
dryRun() {
|
|
2046
|
+
return this._buildRequestPayload();
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Prevents accidental `await flowBuilder` without .execute()
|
|
2050
|
+
* Forces developers to explicitly call .execute()
|
|
2051
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
2052
|
+
*/
|
|
2053
|
+
then() {
|
|
2054
|
+
throw new Error('FlowBuilder cannot be awaited directly. Call .execute() to run the flow or .dryRun() to get the payload.');
|
|
2055
|
+
}
|
|
2056
|
+
/**
|
|
2057
|
+
* Build the request payload for the action
|
|
2058
|
+
* @private
|
|
2059
|
+
*/
|
|
2060
|
+
_buildRequestPayload() {
|
|
2061
|
+
const record = this._record.record;
|
|
2062
|
+
// Build steps with parent associations
|
|
2063
|
+
const stepsWithAssociations = this._steps.map(step => {
|
|
2064
|
+
const stepAssociations = [...(step.associations || [])];
|
|
2065
|
+
// Auto-add parent association if step requires it and we have a parent record
|
|
2066
|
+
if (step.autoLinkParent && (record === null || record === void 0 ? void 0 : record.id)) {
|
|
2067
|
+
stepAssociations.push({
|
|
2068
|
+
entity: record.entity,
|
|
2069
|
+
recordId: record.id,
|
|
2070
|
+
linkType: null,
|
|
2071
|
+
relationType: 'PARENT',
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
return {
|
|
2075
|
+
entity: step.entity,
|
|
2076
|
+
type: step.type,
|
|
2077
|
+
actionName: step.actionName,
|
|
2078
|
+
properties: step.properties,
|
|
2079
|
+
title: step.title,
|
|
2080
|
+
id: step.id,
|
|
2081
|
+
associations: stepAssociations.length > 0 ? stepAssociations : undefined,
|
|
2082
|
+
groups: step.groups,
|
|
2083
|
+
};
|
|
2084
|
+
});
|
|
2085
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'SupportModule:Case', actionName: 'MoveCaseToSolvedWithNoteSalesApp', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'CaseDefaultStageSolved' }), this._options);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
exports.MoveCaseToSolvedWithNoteSalesAppFlowBuilder = MoveCaseToSolvedWithNoteSalesAppFlowBuilder;
|
|
1984
2089
|
/**
|
|
1985
2090
|
* FlowBuilder for MoveDefaultCaseFromOpenToClosed multi-step action
|
|
1986
2091
|
*
|
|
@@ -4337,6 +4442,33 @@ class CaseRecord {
|
|
|
4337
4442
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCaseToSolvedTransition', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CaseDefaultStageSolved' }, options);
|
|
4338
4443
|
return new ActionBuilder(this._provider, 'SupportModule', 'Case', payload, () => { this._pendingLinks = []; });
|
|
4339
4444
|
}
|
|
4445
|
+
/**
|
|
4446
|
+
* MoveCaseToSolvedWithNoteSalesApp
|
|
4447
|
+
*
|
|
4448
|
+
* Starts a stage transition flow on this Case record.
|
|
4449
|
+
* Chain step methods and call .execute() to run the flow.
|
|
4450
|
+
*
|
|
4451
|
+
* @remarks Transitions to stage: CaseDefaultStageSolved
|
|
4452
|
+
*
|
|
4453
|
+
* @param options - Optional settings
|
|
4454
|
+
* @param options.journeyId - Associate with a journey
|
|
4455
|
+
* @returns FlowBuilder for chaining step methods
|
|
4456
|
+
* @throws Error if called on a new (unsaved) record
|
|
4457
|
+
*
|
|
4458
|
+
* @example
|
|
4459
|
+
* ```typescript
|
|
4460
|
+
* const record = await odinClient.cases.get(id);
|
|
4461
|
+
* await record.moveCaseToSolvedWithNoteSalesApp()
|
|
4462
|
+
* .createNoteForCaseSalesApp({ ... })
|
|
4463
|
+
* .execute();
|
|
4464
|
+
* ```
|
|
4465
|
+
*/
|
|
4466
|
+
moveCaseToSolvedWithNoteSalesApp(options) {
|
|
4467
|
+
var _a;
|
|
4468
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
4469
|
+
throw new Error('moveCaseToSolvedWithNoteSalesApp requires an existing record. Use accessor.get() first.');
|
|
4470
|
+
return new MoveCaseToSolvedWithNoteSalesAppFlowBuilder(this, this._provider, this._pendingLinks, options);
|
|
4471
|
+
}
|
|
4340
4472
|
/**
|
|
4341
4473
|
* MoveDefaultCaseFromAnyStageToPendingAgent
|
|
4342
4474
|
*
|
|
@@ -24,6 +24,7 @@ import { ContactProperties } from '../entities-v2/Contact';
|
|
|
24
24
|
import { CreateCaseProperties } from '../actions-v2/CreateCaseFromContactDto';
|
|
25
25
|
import { CreateContactProperties } from '../actions-v2/CreateContactDto';
|
|
26
26
|
import { CreateContactSalesAppProperties } from '../actions-v2/CreateContactSalesAppDto';
|
|
27
|
+
import { OrderBuilderUpdateContactProperties } from '../actions-v2/OrderBuilderUpdateContactDto';
|
|
27
28
|
import { UpdateAdditionalCareProperties } from '../actions-v2/UpdateAdditionalCareDto';
|
|
28
29
|
import { UpdateContactAppPreferencesProperties } from '../actions-v2/UpdateContactAppPreferencesDto';
|
|
29
30
|
import { UpdateContactProperties } from '../actions-v2/UpdateContactDto';
|
|
@@ -839,6 +840,32 @@ export declare class ContactRecord<TProps = ContactProperties> {
|
|
|
839
840
|
createCaseFromContact(options?: {
|
|
840
841
|
journeyId?: string;
|
|
841
842
|
}): CreateCaseFromContactFlowBuilder;
|
|
843
|
+
/**
|
|
844
|
+
* OrderBuilderUpdateContact
|
|
845
|
+
*
|
|
846
|
+
* Updates this Contact record with the specified properties.
|
|
847
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
848
|
+
*
|
|
849
|
+
* @param properties - Required properties for this action
|
|
850
|
+
* @param options - Optional settings
|
|
851
|
+
* @param options.journeyId - Associate with a journey
|
|
852
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
853
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
854
|
+
* @throws Error if called on a new (unsaved) record
|
|
855
|
+
*
|
|
856
|
+
* @example
|
|
857
|
+
* ```typescript
|
|
858
|
+
* const record = await odinClient.contacts.get(id);
|
|
859
|
+
* await record.orderBuilderUpdateContact({ ... }).execute();
|
|
860
|
+
*
|
|
861
|
+
* // Dry run (for debugging)
|
|
862
|
+
* const payload = record.orderBuilderUpdateContact({ ... }).dryRun();
|
|
863
|
+
* ```
|
|
864
|
+
*/
|
|
865
|
+
orderBuilderUpdateContact(properties: OrderBuilderUpdateContactProperties, options?: {
|
|
866
|
+
journeyId?: string;
|
|
867
|
+
stageKey?: string;
|
|
868
|
+
}): ActionBuilder;
|
|
842
869
|
/**
|
|
843
870
|
* UpdateAdditionalCare
|
|
844
871
|
*
|
|
@@ -1248,6 +1248,35 @@ class ContactRecord {
|
|
|
1248
1248
|
createCaseFromContact(options) {
|
|
1249
1249
|
return new CreateCaseFromContactFlowBuilder(this, this._provider, this._pendingLinks, options);
|
|
1250
1250
|
}
|
|
1251
|
+
/**
|
|
1252
|
+
* OrderBuilderUpdateContact
|
|
1253
|
+
*
|
|
1254
|
+
* Updates this Contact record with the specified properties.
|
|
1255
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
1256
|
+
*
|
|
1257
|
+
* @param properties - Required properties for this action
|
|
1258
|
+
* @param options - Optional settings
|
|
1259
|
+
* @param options.journeyId - Associate with a journey
|
|
1260
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
1261
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
1262
|
+
* @throws Error if called on a new (unsaved) record
|
|
1263
|
+
*
|
|
1264
|
+
* @example
|
|
1265
|
+
* ```typescript
|
|
1266
|
+
* const record = await odinClient.contacts.get(id);
|
|
1267
|
+
* await record.orderBuilderUpdateContact({ ... }).execute();
|
|
1268
|
+
*
|
|
1269
|
+
* // Dry run (for debugging)
|
|
1270
|
+
* const payload = record.orderBuilderUpdateContact({ ... }).dryRun();
|
|
1271
|
+
* ```
|
|
1272
|
+
*/
|
|
1273
|
+
orderBuilderUpdateContact(properties, options) {
|
|
1274
|
+
var _a;
|
|
1275
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
1276
|
+
throw new Error('orderBuilderUpdateContact requires an existing record. Use accessor.get() first.');
|
|
1277
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'OrderBuilderUpdateContact', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
1278
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'Contact', payload, () => { this._pendingLinks = []; });
|
|
1279
|
+
}
|
|
1251
1280
|
/**
|
|
1252
1281
|
* UpdateAdditionalCare
|
|
1253
1282
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* await record.createDocument({ ... }).execute();
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
-
* Entity Types: CONTRACT_BUYOUT, DEFAULT, EMAIL_ATTACHMENT, INVOICE, OTHER, OUTCOME_FORM
|
|
16
|
+
* Entity Types: CONTRACT, CONTRACT_BUYOUT, CORPORATE_DOCUMENT, DEFAULT, EMAIL_ATTACHMENT, INVOICE, OTHER, OUTCOME_FORM
|
|
17
17
|
*
|
|
18
18
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
19
19
|
*/
|
|
@@ -22,14 +22,14 @@ import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
|
|
|
22
22
|
import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
|
|
23
23
|
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
|
-
import { DocumentProperties, ContractBuyoutDocumentProperties, EmailAttachmentDocumentProperties, InvoiceDocumentProperties, OtherDocumentProperties, OutcomeFormDocumentProperties } from '../entities-v2/Document';
|
|
25
|
+
import { DocumentProperties, ContractDocumentProperties, ContractBuyoutDocumentProperties, CorporateDocumentDocumentProperties, EmailAttachmentDocumentProperties, InvoiceDocumentProperties, OtherDocumentProperties, OutcomeFormDocumentProperties } from '../entities-v2/Document';
|
|
26
26
|
import { CreateDocumentProperties } from '../actions-v2/CreateDocumentDto';
|
|
27
27
|
import { UpdateDocumentProperties } from '../actions-v2/UpdateDocumentDto';
|
|
28
28
|
import { FileRecord } from './FileRecord';
|
|
29
29
|
import { DocumentProcessingRecord } from './DocumentProcessingRecord';
|
|
30
30
|
import { ContractBuyOutRecord } from './ContractBuyOutRecord';
|
|
31
31
|
/** Valid entity types for Document */
|
|
32
|
-
export declare type DocumentType = 'CONTRACT_BUYOUT' | 'DEFAULT' | 'EMAIL_ATTACHMENT' | 'INVOICE' | 'OTHER' | 'OUTCOME_FORM';
|
|
32
|
+
export declare type DocumentType = 'CONTRACT' | 'CONTRACT_BUYOUT' | 'CORPORATE_DOCUMENT' | 'DEFAULT' | 'EMAIL_ATTACHMENT' | 'INVOICE' | 'OTHER' | 'OUTCOME_FORM';
|
|
33
33
|
/**
|
|
34
34
|
* Builder for action execution with dryRun support
|
|
35
35
|
*
|
|
@@ -123,6 +123,22 @@ export declare class DocumentRecord<TProps = DocumentProperties> {
|
|
|
123
123
|
get links(): OdinRecord<TProps>['links'];
|
|
124
124
|
/** Access the underlying OdinRecord (null for new records) */
|
|
125
125
|
get record(): OdinRecord<TProps> | null;
|
|
126
|
+
/**
|
|
127
|
+
* Type guard: check if this record is of type CONTRACT
|
|
128
|
+
*
|
|
129
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
130
|
+
* giving you access to CONTRACT-specific properties.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* if (record.isContract()) {
|
|
135
|
+
* // TypeScript knows record.properties is ContractDocumentProperties
|
|
136
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
137
|
+
* }
|
|
138
|
+
* ```
|
|
139
|
+
* @remarks An agreement between parties: an NDA, a supply agreement, a lease. Template or signed; SubType says which kind.
|
|
140
|
+
*/
|
|
141
|
+
isContract(): this is DocumentRecord<ContractDocumentProperties>;
|
|
126
142
|
/**
|
|
127
143
|
* Type guard: check if this record is of type CONTRACT_BUYOUT
|
|
128
144
|
*
|
|
@@ -139,6 +155,22 @@ export declare class DocumentRecord<TProps = DocumentProperties> {
|
|
|
139
155
|
* @remarks A customer's previous-provider final bill sent for a contract buyout (YouFibre orders).
|
|
140
156
|
*/
|
|
141
157
|
isContractBuyout(): this is DocumentRecord<ContractBuyoutDocumentProperties>;
|
|
158
|
+
/**
|
|
159
|
+
* Type guard: check if this record is of type CORPORATE_DOCUMENT
|
|
160
|
+
*
|
|
161
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
162
|
+
* giving you access to CORPORATE_DOCUMENT-specific properties.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* if (record.isCorporateDocument()) {
|
|
167
|
+
* // TypeScript knows record.properties is CorporateDocumentDocumentProperties
|
|
168
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
* @remarks A document about the company itself: articles of association, resolutions, filings. SubType says which kind.
|
|
172
|
+
*/
|
|
173
|
+
isCorporateDocument(): this is DocumentRecord<CorporateDocumentDocumentProperties>;
|
|
142
174
|
/**
|
|
143
175
|
* Type guard: check if this record is of type DEFAULT
|
|
144
176
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* await record.createDocument({ ... }).execute();
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
-
* Entity Types: CONTRACT_BUYOUT, DEFAULT, EMAIL_ATTACHMENT, INVOICE, OTHER, OUTCOME_FORM
|
|
17
|
+
* Entity Types: CONTRACT, CONTRACT_BUYOUT, CORPORATE_DOCUMENT, DEFAULT, EMAIL_ATTACHMENT, INVOICE, OTHER, OUTCOME_FORM
|
|
18
18
|
*
|
|
19
19
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
20
20
|
*/
|
|
@@ -150,6 +150,22 @@ class DocumentRecord {
|
|
|
150
150
|
// ============================================
|
|
151
151
|
// TYPE GUARDS (with TypeScript type predicates)
|
|
152
152
|
// ============================================
|
|
153
|
+
/**
|
|
154
|
+
* Type guard: check if this record is of type CONTRACT
|
|
155
|
+
*
|
|
156
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
157
|
+
* giving you access to CONTRACT-specific properties.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* if (record.isContract()) {
|
|
162
|
+
* // TypeScript knows record.properties is ContractDocumentProperties
|
|
163
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
164
|
+
* }
|
|
165
|
+
* ```
|
|
166
|
+
* @remarks An agreement between parties: an NDA, a supply agreement, a lease. Template or signed; SubType says which kind.
|
|
167
|
+
*/
|
|
168
|
+
isContract() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'CONTRACT'; }
|
|
153
169
|
/**
|
|
154
170
|
* Type guard: check if this record is of type CONTRACT_BUYOUT
|
|
155
171
|
*
|
|
@@ -166,6 +182,22 @@ class DocumentRecord {
|
|
|
166
182
|
* @remarks A customer's previous-provider final bill sent for a contract buyout (YouFibre orders).
|
|
167
183
|
*/
|
|
168
184
|
isContractBuyout() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'CONTRACT_BUYOUT'; }
|
|
185
|
+
/**
|
|
186
|
+
* Type guard: check if this record is of type CORPORATE_DOCUMENT
|
|
187
|
+
*
|
|
188
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
189
|
+
* giving you access to CORPORATE_DOCUMENT-specific properties.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* if (record.isCorporateDocument()) {
|
|
194
|
+
* // TypeScript knows record.properties is CorporateDocumentDocumentProperties
|
|
195
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
198
|
+
* @remarks A document about the company itself: articles of association, resolutions, filings. SubType says which kind.
|
|
199
|
+
*/
|
|
200
|
+
isCorporateDocument() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'CORPORATE_DOCUMENT'; }
|
|
169
201
|
/**
|
|
170
202
|
* Type guard: check if this record is of type DEFAULT
|
|
171
203
|
*
|
|
@@ -26,6 +26,7 @@ import { NoteProperties } from '../entities-v2/Note';
|
|
|
26
26
|
import { CreateNoteForCaseAssignmentProperties } from '../actions-v2/AssignCaseWithNoteFlowDto';
|
|
27
27
|
import { CaseCreateNoteProperties } from '../actions-v2/CaseCreateNoteDto';
|
|
28
28
|
import { CreateNoteProperties } from '../actions-v2/CreateNoteDto';
|
|
29
|
+
import { CreateNoteForCaseSalesAppProperties } from '../actions-v2/CreateNoteForCaseSalesAppDto';
|
|
29
30
|
import { UpdateNoteProperties } from '../actions-v2/UpdateNoteDto';
|
|
30
31
|
import { UgExternalAuditRecord } from './UgExternalAuditRecord';
|
|
31
32
|
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
@@ -1119,6 +1120,34 @@ export declare class NoteRecord<TProps = NoteProperties> {
|
|
|
1119
1120
|
journeyId?: string;
|
|
1120
1121
|
stageKey?: string;
|
|
1121
1122
|
}): ActionBuilder;
|
|
1123
|
+
/**
|
|
1124
|
+
* CreateNoteForCaseSalesApp
|
|
1125
|
+
*
|
|
1126
|
+
* Creates a new Note record with the specified properties.
|
|
1127
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1128
|
+
*
|
|
1129
|
+
* @remarks Record type: DEFAULT
|
|
1130
|
+
*
|
|
1131
|
+
* @param properties - The properties for the new record
|
|
1132
|
+
* @param options - Optional settings
|
|
1133
|
+
* @param options.journeyId - Associate with a journey
|
|
1134
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
1135
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1136
|
+
*
|
|
1137
|
+
* @example
|
|
1138
|
+
* ```typescript
|
|
1139
|
+
* // Create with properties
|
|
1140
|
+
* const record = odinClient.notes.new();
|
|
1141
|
+
* await record.createNoteForCaseSalesApp({ ... }).execute();
|
|
1142
|
+
*
|
|
1143
|
+
* // Dry run (for debugging)
|
|
1144
|
+
* const payload = record.createNoteForCaseSalesApp({ ... }).dryRun();
|
|
1145
|
+
* ```
|
|
1146
|
+
*/
|
|
1147
|
+
createNoteForCaseSalesApp(properties: CreateNoteForCaseSalesAppProperties, options?: {
|
|
1148
|
+
journeyId?: string;
|
|
1149
|
+
stageKey?: string;
|
|
1150
|
+
}): ActionBuilder;
|
|
1122
1151
|
/**
|
|
1123
1152
|
* UpdateNote
|
|
1124
1153
|
*
|
|
@@ -1672,6 +1672,42 @@ class NoteRecord {
|
|
|
1672
1672
|
};
|
|
1673
1673
|
return new ActionBuilder(this._provider, 'SupportModule', 'Note', payload, () => { this._pendingLinks = []; });
|
|
1674
1674
|
}
|
|
1675
|
+
/**
|
|
1676
|
+
* CreateNoteForCaseSalesApp
|
|
1677
|
+
*
|
|
1678
|
+
* Creates a new Note record with the specified properties.
|
|
1679
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1680
|
+
*
|
|
1681
|
+
* @remarks Record type: DEFAULT
|
|
1682
|
+
*
|
|
1683
|
+
* @param properties - The properties for the new record
|
|
1684
|
+
* @param options - Optional settings
|
|
1685
|
+
* @param options.journeyId - Associate with a journey
|
|
1686
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
1687
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1688
|
+
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* ```typescript
|
|
1691
|
+
* // Create with properties
|
|
1692
|
+
* const record = odinClient.notes.new();
|
|
1693
|
+
* await record.createNoteForCaseSalesApp({ ... }).execute();
|
|
1694
|
+
*
|
|
1695
|
+
* // Dry run (for debugging)
|
|
1696
|
+
* const payload = record.createNoteForCaseSalesApp({ ... }).dryRun();
|
|
1697
|
+
* ```
|
|
1698
|
+
*/
|
|
1699
|
+
createNoteForCaseSalesApp(properties, options) {
|
|
1700
|
+
const payload = {
|
|
1701
|
+
entity: 'SupportModule:Note',
|
|
1702
|
+
type: 'DEFAULT',
|
|
1703
|
+
actionName: 'CreateNoteForCaseSalesApp',
|
|
1704
|
+
properties: properties || {},
|
|
1705
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
1706
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
1707
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
1708
|
+
};
|
|
1709
|
+
return new ActionBuilder(this._provider, 'SupportModule', 'Note', payload, () => { this._pendingLinks = []; });
|
|
1710
|
+
}
|
|
1675
1711
|
// ============================================
|
|
1676
1712
|
// UPDATE ACTIONS (require existing record)
|
|
1677
1713
|
// ============================================
|