@d19n/youfibre-odin-sdk 1.0.243 → 1.0.244

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.
@@ -36,6 +36,18 @@ import { CrmDatasetRecord } from './CrmDatasetRecord';
36
36
  import { CaseRecord } from './CaseRecord';
37
37
  import { LeadRecord } from './LeadRecord';
38
38
  import { AccountRecord } from './AccountRecord';
39
+ /** Options for a flow step */
40
+ interface CreateLeadFromAddressFlowBuilderStepOptions {
41
+ /** Record ID if updating a specific record in this step */
42
+ id?: string;
43
+ /** Associations to create with this step */
44
+ associations?: Array<{
45
+ recordId?: string;
46
+ entity?: string;
47
+ }>;
48
+ /** Groups for this step */
49
+ groups?: string[];
50
+ }
39
51
  /**
40
52
  * FlowBuilder for CreateLeadFromAddress multi-step action
41
53
  *
@@ -46,22 +58,31 @@ declare class CreateLeadFromAddressFlowBuilder {
46
58
  private _provider;
47
59
  private _pendingLinks;
48
60
  private _options?;
61
+ private _groups;
49
62
  private _steps;
50
63
  constructor(record: AddressRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
51
64
  journeyId?: string;
52
65
  });
66
+ /**
67
+ * Add a group to the main action
68
+ * @param group - Group name to add
69
+ * @returns this (for method chaining)
70
+ */
71
+ addGroup(group: string): this;
53
72
  /**
54
73
  * Add CreateLead step to the flow
55
74
  * @param properties - Properties for this step
75
+ * @param options - Optional step settings (id, associations, groups)
56
76
  * @returns this (for method chaining)
57
77
  */
58
- createLead(properties: CreateLeadProperties): this;
78
+ createLead(properties: CreateLeadProperties, options?: CreateLeadFromAddressFlowBuilderStepOptions): this;
59
79
  /**
60
80
  * Add CreateContact step to the flow
61
81
  * @param properties - Properties for this step
82
+ * @param options - Optional step settings (id, associations, groups)
62
83
  * @returns this (for method chaining)
63
84
  */
64
- createContact(properties: CreateContactProperties): this;
85
+ createContact(properties: CreateContactProperties, options?: CreateLeadFromAddressFlowBuilderStepOptions): this;
65
86
  /**
66
87
  * Execute the flow with all collected steps
67
88
  * @returns The action result
@@ -47,28 +47,52 @@ const AccountRecord_1 = require("./AccountRecord");
47
47
  */
48
48
  class CreateLeadFromAddressFlowBuilder {
49
49
  constructor(record, provider, pendingLinks, options) {
50
+ this._groups = [];
50
51
  this._steps = [];
51
52
  this._record = record;
52
53
  this._provider = provider;
53
54
  this._pendingLinks = pendingLinks;
54
55
  this._options = options;
55
56
  }
57
+ /**
58
+ * Add a group to the main action
59
+ * @param group - Group name to add
60
+ * @returns this (for method chaining)
61
+ */
62
+ addGroup(group) {
63
+ this._groups.push(group);
64
+ return this;
65
+ }
56
66
  /**
57
67
  * Add CreateLead step to the flow
58
68
  * @param properties - Properties for this step
69
+ * @param options - Optional step settings (id, associations, groups)
59
70
  * @returns this (for method chaining)
60
71
  */
61
- createLead(properties) {
62
- this._steps.push({ actionKey: 'CreateLead', properties });
72
+ createLead(properties, options) {
73
+ this._steps.push({
74
+ actionName: 'CreateLead',
75
+ properties,
76
+ id: options === null || options === void 0 ? void 0 : options.id,
77
+ associations: options === null || options === void 0 ? void 0 : options.associations,
78
+ groups: options === null || options === void 0 ? void 0 : options.groups,
79
+ });
63
80
  return this;
64
81
  }
65
82
  /**
66
83
  * Add CreateContact step to the flow
67
84
  * @param properties - Properties for this step
85
+ * @param options - Optional step settings (id, associations, groups)
68
86
  * @returns this (for method chaining)
69
87
  */
70
- createContact(properties) {
71
- this._steps.push({ actionKey: 'CreateContact', properties });
88
+ createContact(properties, options) {
89
+ this._steps.push({
90
+ actionName: 'CreateContact',
91
+ properties,
92
+ id: options === null || options === void 0 ? void 0 : options.id,
93
+ associations: options === null || options === void 0 ? void 0 : options.associations,
94
+ groups: options === null || options === void 0 ? void 0 : options.groups,
95
+ });
72
96
  return this;
73
97
  }
74
98
  /**
@@ -80,7 +104,7 @@ class CreateLeadFromAddressFlowBuilder {
80
104
  const rawRecord = this._record.raw;
81
105
  if (!(rawRecord === null || rawRecord === void 0 ? void 0 : rawRecord.id))
82
106
  throw new Error('Cannot execute flow on unsaved record');
83
- const result = yield this._provider._applyAction('CrmModule', 'Address', Object.assign({ id: rawRecord.id, entity: rawRecord.entity, type: rawRecord.type, actionName: 'CreateLeadFromAddress', steps: this._steps, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, this._options));
107
+ const result = yield this._provider._applyAction('CrmModule', 'Address', Object.assign({ id: rawRecord.id, entity: rawRecord.entity, type: rawRecord.type, actionName: 'CreateLeadFromAddress', steps: this._steps, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }, this._options));
84
108
  // Clear pending links on the record after execution
85
109
  this._record.clearPendingLinks();
86
110
  return result;
@@ -55,6 +55,18 @@ import { AccountRecord } from './AccountRecord';
55
55
  import { ActivityLogRecord } from './ActivityLogRecord';
56
56
  /** Valid entity types for Case */
57
57
  export declare type CaseType = 'DEFAULT' | 'OUTAGE';
58
+ /** Options for a flow step */
59
+ interface AssignCaseWithNoteFlowFlowBuilderStepOptions {
60
+ /** Record ID if updating a specific record in this step */
61
+ id?: string;
62
+ /** Associations to create with this step */
63
+ associations?: Array<{
64
+ recordId?: string;
65
+ entity?: string;
66
+ }>;
67
+ /** Groups for this step */
68
+ groups?: string[];
69
+ }
58
70
  /**
59
71
  * FlowBuilder for AssignCaseWithNoteFlow multi-step action
60
72
  *
@@ -65,28 +77,49 @@ declare class AssignCaseWithNoteFlowFlowBuilder {
65
77
  private _provider;
66
78
  private _pendingLinks;
67
79
  private _options?;
80
+ private _groups;
68
81
  private _steps;
69
82
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
70
83
  journeyId?: string;
71
84
  });
85
+ /**
86
+ * Add a group to the main action
87
+ * @param group - Group name to add
88
+ * @returns this (for method chaining)
89
+ */
90
+ addGroup(group: string): this;
72
91
  /**
73
92
  * Add AssignCase step to the flow
74
93
  * @param properties - Properties for this step
94
+ * @param options - Optional step settings (id, associations, groups)
75
95
  * @returns this (for method chaining)
76
96
  */
77
- assignCase(properties: AssignCaseProperties): this;
97
+ assignCase(properties: AssignCaseProperties, options?: AssignCaseWithNoteFlowFlowBuilderStepOptions): this;
78
98
  /**
79
99
  * Add CreateNoteForCaseAssignment step to the flow
80
100
  * @param properties - Properties for this step
101
+ * @param options - Optional step settings (id, associations, groups)
81
102
  * @returns this (for method chaining)
82
103
  */
83
- createNoteForCaseAssignment(properties: CreateNoteForCaseAssignmentProperties): this;
104
+ createNoteForCaseAssignment(properties: CreateNoteForCaseAssignmentProperties, options?: AssignCaseWithNoteFlowFlowBuilderStepOptions): this;
84
105
  /**
85
106
  * Execute the flow with all collected steps
86
107
  * @returns The action result
87
108
  */
88
109
  execute(): Promise<IDbRecordCreateUpdateRes[]>;
89
110
  }
111
+ /** Options for a flow step */
112
+ interface CaseDefaultStageEscalatedFlowBuilderStepOptions {
113
+ /** Record ID if updating a specific record in this step */
114
+ id?: string;
115
+ /** Associations to create with this step */
116
+ associations?: Array<{
117
+ recordId?: string;
118
+ entity?: string;
119
+ }>;
120
+ /** Groups for this step */
121
+ groups?: string[];
122
+ }
90
123
  /**
91
124
  * FlowBuilder for CaseDefaultStageEscalated multi-step action
92
125
  *
@@ -98,28 +131,49 @@ declare class CaseDefaultStageEscalatedFlowBuilder {
98
131
  private _provider;
99
132
  private _pendingLinks;
100
133
  private _options?;
134
+ private _groups;
101
135
  private _steps;
102
136
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
103
137
  journeyId?: string;
104
138
  });
139
+ /**
140
+ * Add a group to the main action
141
+ * @param group - Group name to add
142
+ * @returns this (for method chaining)
143
+ */
144
+ addGroup(group: string): this;
105
145
  /**
106
146
  * Add EscalateCaseAction step to the flow
107
147
  * @param properties - Properties for this step
148
+ * @param options - Optional step settings (id, associations, groups)
108
149
  * @returns this (for method chaining)
109
150
  */
110
- escalateCaseAction(properties: EscalateCaseActionProperties): this;
151
+ escalateCaseAction(properties: EscalateCaseActionProperties, options?: CaseDefaultStageEscalatedFlowBuilderStepOptions): this;
111
152
  /**
112
153
  * Add CreateNoteForCaseAssignment step to the flow
113
154
  * @param properties - Properties for this step
155
+ * @param options - Optional step settings (id, associations, groups)
114
156
  * @returns this (for method chaining)
115
157
  */
116
- createNoteForCaseAssignment(properties: CreateNoteForCaseAssignmentProperties): this;
158
+ createNoteForCaseAssignment(properties: CreateNoteForCaseAssignmentProperties, options?: CaseDefaultStageEscalatedFlowBuilderStepOptions): this;
117
159
  /**
118
160
  * Execute the flow with all collected steps
119
161
  * @returns The action result
120
162
  */
121
163
  execute(): Promise<IDbRecordCreateUpdateRes[]>;
122
164
  }
165
+ /** Options for a flow step */
166
+ interface CasedefaultstageblockedFlowBuilderStepOptions {
167
+ /** Record ID if updating a specific record in this step */
168
+ id?: string;
169
+ /** Associations to create with this step */
170
+ associations?: Array<{
171
+ recordId?: string;
172
+ entity?: string;
173
+ }>;
174
+ /** Groups for this step */
175
+ groups?: string[];
176
+ }
123
177
  /**
124
178
  * FlowBuilder for Casedefaultstageblocked multi-step action
125
179
  *
@@ -131,22 +185,42 @@ declare class CasedefaultstageblockedFlowBuilder {
131
185
  private _provider;
132
186
  private _pendingLinks;
133
187
  private _options?;
188
+ private _groups;
134
189
  private _steps;
135
190
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
136
191
  journeyId?: string;
137
192
  });
193
+ /**
194
+ * Add a group to the main action
195
+ * @param group - Group name to add
196
+ * @returns this (for method chaining)
197
+ */
198
+ addGroup(group: string): this;
138
199
  /**
139
200
  * Add MoveCaseToBlockedAction step to the flow
140
201
  * @param properties - Properties for this step
202
+ * @param options - Optional step settings (id, associations, groups)
141
203
  * @returns this (for method chaining)
142
204
  */
143
- moveCaseToBlockedAction(properties: MoveCaseToBlockedActionProperties): this;
205
+ moveCaseToBlockedAction(properties: MoveCaseToBlockedActionProperties, options?: CasedefaultstageblockedFlowBuilderStepOptions): this;
144
206
  /**
145
207
  * Execute the flow with all collected steps
146
208
  * @returns The action result
147
209
  */
148
210
  execute(): Promise<IDbRecordCreateUpdateRes[]>;
149
211
  }
212
+ /** Options for a flow step */
213
+ interface EscalateCaseTransitionFlowBuilderStepOptions {
214
+ /** Record ID if updating a specific record in this step */
215
+ id?: string;
216
+ /** Associations to create with this step */
217
+ associations?: Array<{
218
+ recordId?: string;
219
+ entity?: string;
220
+ }>;
221
+ /** Groups for this step */
222
+ groups?: string[];
223
+ }
150
224
  /**
151
225
  * FlowBuilder for EscalateCaseTransition multi-step action
152
226
  *
@@ -158,28 +232,49 @@ declare class EscalateCaseTransitionFlowBuilder {
158
232
  private _provider;
159
233
  private _pendingLinks;
160
234
  private _options?;
235
+ private _groups;
161
236
  private _steps;
162
237
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
163
238
  journeyId?: string;
164
239
  });
240
+ /**
241
+ * Add a group to the main action
242
+ * @param group - Group name to add
243
+ * @returns this (for method chaining)
244
+ */
245
+ addGroup(group: string): this;
165
246
  /**
166
247
  * Add EscalateCaseAction step to the flow
167
248
  * @param properties - Properties for this step
249
+ * @param options - Optional step settings (id, associations, groups)
168
250
  * @returns this (for method chaining)
169
251
  */
170
- escalateCaseAction(properties: EscalateCaseActionProperties): this;
252
+ escalateCaseAction(properties: EscalateCaseActionProperties, options?: EscalateCaseTransitionFlowBuilderStepOptions): this;
171
253
  /**
172
254
  * Add CreateNoteForCaseAssignment step to the flow
173
255
  * @param properties - Properties for this step
256
+ * @param options - Optional step settings (id, associations, groups)
174
257
  * @returns this (for method chaining)
175
258
  */
176
- createNoteForCaseAssignment(properties: CreateNoteForCaseAssignmentProperties): this;
259
+ createNoteForCaseAssignment(properties: CreateNoteForCaseAssignmentProperties, options?: EscalateCaseTransitionFlowBuilderStepOptions): this;
177
260
  /**
178
261
  * Execute the flow with all collected steps
179
262
  * @returns The action result
180
263
  */
181
264
  execute(): Promise<IDbRecordCreateUpdateRes[]>;
182
265
  }
266
+ /** Options for a flow step */
267
+ interface MoveCaseToBlockedTransitionFlowBuilderStepOptions {
268
+ /** Record ID if updating a specific record in this step */
269
+ id?: string;
270
+ /** Associations to create with this step */
271
+ associations?: Array<{
272
+ recordId?: string;
273
+ entity?: string;
274
+ }>;
275
+ /** Groups for this step */
276
+ groups?: string[];
277
+ }
183
278
  /**
184
279
  * FlowBuilder for MoveCaseToBlockedTransition multi-step action
185
280
  *
@@ -191,22 +286,42 @@ declare class MoveCaseToBlockedTransitionFlowBuilder {
191
286
  private _provider;
192
287
  private _pendingLinks;
193
288
  private _options?;
289
+ private _groups;
194
290
  private _steps;
195
291
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
196
292
  journeyId?: string;
197
293
  });
294
+ /**
295
+ * Add a group to the main action
296
+ * @param group - Group name to add
297
+ * @returns this (for method chaining)
298
+ */
299
+ addGroup(group: string): this;
198
300
  /**
199
301
  * Add MoveCaseToBlockedAction step to the flow
200
302
  * @param properties - Properties for this step
303
+ * @param options - Optional step settings (id, associations, groups)
201
304
  * @returns this (for method chaining)
202
305
  */
203
- moveCaseToBlockedAction(properties: MoveCaseToBlockedActionProperties): this;
306
+ moveCaseToBlockedAction(properties: MoveCaseToBlockedActionProperties, options?: MoveCaseToBlockedTransitionFlowBuilderStepOptions): this;
204
307
  /**
205
308
  * Execute the flow with all collected steps
206
309
  * @returns The action result
207
310
  */
208
311
  execute(): Promise<IDbRecordCreateUpdateRes[]>;
209
312
  }
313
+ /** Options for a flow step */
314
+ interface MoveCaseToPendingReviewTransitionFlowBuilderStepOptions {
315
+ /** Record ID if updating a specific record in this step */
316
+ id?: string;
317
+ /** Associations to create with this step */
318
+ associations?: Array<{
319
+ recordId?: string;
320
+ entity?: string;
321
+ }>;
322
+ /** Groups for this step */
323
+ groups?: string[];
324
+ }
210
325
  /**
211
326
  * FlowBuilder for MoveCaseToPendingReviewTransition multi-step action
212
327
  *
@@ -218,22 +333,42 @@ declare class MoveCaseToPendingReviewTransitionFlowBuilder {
218
333
  private _provider;
219
334
  private _pendingLinks;
220
335
  private _options?;
336
+ private _groups;
221
337
  private _steps;
222
338
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
223
339
  journeyId?: string;
224
340
  });
341
+ /**
342
+ * Add a group to the main action
343
+ * @param group - Group name to add
344
+ * @returns this (for method chaining)
345
+ */
346
+ addGroup(group: string): this;
225
347
  /**
226
348
  * Add MoveCaseToPendingReviewAction step to the flow
227
349
  * @param properties - Properties for this step
350
+ * @param options - Optional step settings (id, associations, groups)
228
351
  * @returns this (for method chaining)
229
352
  */
230
- moveCaseToPendingReviewAction(properties: MoveCaseToPendingReviewActionProperties): this;
353
+ moveCaseToPendingReviewAction(properties: MoveCaseToPendingReviewActionProperties, options?: MoveCaseToPendingReviewTransitionFlowBuilderStepOptions): this;
231
354
  /**
232
355
  * Execute the flow with all collected steps
233
356
  * @returns The action result
234
357
  */
235
358
  execute(): Promise<IDbRecordCreateUpdateRes[]>;
236
359
  }
360
+ /** Options for a flow step */
361
+ interface MoveDefaultCaseFromOpenToClosedFlowBuilderStepOptions {
362
+ /** Record ID if updating a specific record in this step */
363
+ id?: string;
364
+ /** Associations to create with this step */
365
+ associations?: Array<{
366
+ recordId?: string;
367
+ entity?: string;
368
+ }>;
369
+ /** Groups for this step */
370
+ groups?: string[];
371
+ }
237
372
  /**
238
373
  * FlowBuilder for MoveDefaultCaseFromOpenToClosed multi-step action
239
374
  *
@@ -245,16 +380,24 @@ declare class MoveDefaultCaseFromOpenToClosedFlowBuilder {
245
380
  private _provider;
246
381
  private _pendingLinks;
247
382
  private _options?;
383
+ private _groups;
248
384
  private _steps;
249
385
  constructor(record: CaseRecord, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
250
386
  journeyId?: string;
251
387
  });
388
+ /**
389
+ * Add a group to the main action
390
+ * @param group - Group name to add
391
+ * @returns this (for method chaining)
392
+ */
393
+ addGroup(group: string): this;
252
394
  /**
253
395
  * Add MarkCaseClosed step to the flow
254
396
  * @param properties - Properties for this step
397
+ * @param options - Optional step settings (id, associations, groups)
255
398
  * @returns this (for method chaining)
256
399
  */
257
- markCaseClosed(properties: MarkCaseClosedProperties): this;
400
+ markCaseClosed(properties: MarkCaseClosedProperties, options?: MoveDefaultCaseFromOpenToClosedFlowBuilderStepOptions): this;
258
401
  /**
259
402
  * Execute the flow with all collected steps
260
403
  * @returns The action result