@d19n/youfibre-odin-sdk 2.0.246 → 2.0.247
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
CHANGED
|
@@ -356,7 +356,7 @@ This SDK includes **168** entities across **12** modules.
|
|
|
356
356
|
|
|
357
357
|
## Actions
|
|
358
358
|
|
|
359
|
-
This SDK includes **
|
|
359
|
+
This SDK includes **737** actions.
|
|
360
360
|
|
|
361
361
|
### Action Types
|
|
362
362
|
|
|
@@ -1500,12 +1500,15 @@ This SDK includes **736** actions.
|
|
|
1500
1500
|
| Action | Type | Event |
|
|
1501
1501
|
|--------|------|-------|
|
|
1502
1502
|
| `CreateModifyServiceRequest` | CREATE | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Create.CreateModifyServiceRequest |
|
|
1503
|
+
| `MoveMsrToCancelled` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled |
|
|
1503
1504
|
| `MoveMsrToComplete` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1504
1505
|
| `MoveMsrToFailed` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1505
1506
|
| `MoveMsrToHeld` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1506
1507
|
| `MoveMsrToInProgress` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1507
1508
|
| `UpdateModifyServiceRequest` | UPDATE | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1508
1509
|
|
|
1510
|
+
**MoveMsrToCancelled Target Stages:** `ModifyServiceRequestStateStageCancelled`
|
|
1511
|
+
|
|
1509
1512
|
**MoveMsrToComplete Target Stages:** `ModifyServiceRequestStateStageCompleted`
|
|
1510
1513
|
|
|
1511
1514
|
**MoveMsrToFailed Target Stages:** `ModifyServiceRequestStateStageFailed`
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MoveMsrToCancelled Action DTO
|
|
3
|
+
*
|
|
4
|
+
* MoveMsrToCancelled
|
|
5
|
+
*
|
|
6
|
+
* @module ServiceModule
|
|
7
|
+
* @entity ModifyServiceRequest
|
|
8
|
+
* @entityType DEFAULT
|
|
9
|
+
* @actionKey MoveMsrToCancelled
|
|
10
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
declare type StepClassMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Link definition for connecting steps in MoveMsrToCancelled
|
|
18
|
+
*/
|
|
19
|
+
export interface MoveMsrToCancelledStepLink {
|
|
20
|
+
/**
|
|
21
|
+
* The stepKey of the target step to link TO
|
|
22
|
+
* Must reference another step's stepKey in the same flow
|
|
23
|
+
*/
|
|
24
|
+
stepKey: string;
|
|
25
|
+
/**
|
|
26
|
+
* The schema association ID (UUID) defining the relationship
|
|
27
|
+
* Use the association.id from the schema association definition
|
|
28
|
+
* @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
|
29
|
+
*/
|
|
30
|
+
schemaAssociationId: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Step definition with linking metadata for MoveMsrToCancelled
|
|
34
|
+
*/
|
|
35
|
+
export interface MoveMsrToCancelledStepDefinition {
|
|
36
|
+
/** Unique identifier for this step */
|
|
37
|
+
stepKey: string;
|
|
38
|
+
/** The DTO class name for this step */
|
|
39
|
+
dtoClass: string;
|
|
40
|
+
/** The entity this step creates (Module:Entity format) */
|
|
41
|
+
entity: string;
|
|
42
|
+
/** Links to create after this step executes */
|
|
43
|
+
linksTo: MoveMsrToCancelledStepLink[] | null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Type-safe step keys for MoveMsrToCancelled
|
|
47
|
+
*/
|
|
48
|
+
export declare const MoveMsrToCancelledSteps: {
|
|
49
|
+
readonly step_1: "step_1";
|
|
50
|
+
};
|
|
51
|
+
export declare type MoveMsrToCancelledStepKey = typeof MoveMsrToCancelledSteps[keyof typeof MoveMsrToCancelledSteps];
|
|
52
|
+
/**
|
|
53
|
+
* RabbitMQ message payload for MoveMsrToCancelled step flow events
|
|
54
|
+
*
|
|
55
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled
|
|
56
|
+
*/
|
|
57
|
+
export interface MoveMsrToCancelledMessage extends OdinRecordUpdatedEvent<MoveMsrToCancelledDto, {}> {
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Properties for MoveMsrToCancelled action
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export interface MoveMsrToCancelledProperties {
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* MoveMsrToCancelled
|
|
67
|
+
*
|
|
68
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
69
|
+
* @module ServiceModule
|
|
70
|
+
* @entity ModifyServiceRequest
|
|
71
|
+
* @entityType DEFAULT (Default)
|
|
72
|
+
* @targetStages ModifyServiceRequestStateStageCancelled
|
|
73
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled
|
|
74
|
+
* @permission schema.action.movemsrtocancelled.trigger
|
|
75
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
76
|
+
*/
|
|
77
|
+
export declare class MoveMsrToCancelledDto extends OdinRecordUpdateDto<Record<string, any>> {
|
|
78
|
+
/** Used by SDK generators to identify action type */
|
|
79
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
80
|
+
static readonly ACTION_KEY = "MoveMsrToCancelled";
|
|
81
|
+
static readonly MODULE_NAME = "ServiceModule";
|
|
82
|
+
static readonly ENTITIES: string[];
|
|
83
|
+
static readonly ENTITY_TYPE = "DEFAULT";
|
|
84
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled";
|
|
85
|
+
static readonly SCHEMA_ACTION_ID = "7d70b973-7823-4625-bb7d-9c65aa9e0cfb";
|
|
86
|
+
static readonly PERMISSION = "schema.action.movemsrtocancelled.trigger";
|
|
87
|
+
static readonly TARGET_STAGES: readonly ["ModifyServiceRequestStateStageCancelled"];
|
|
88
|
+
static readonly IS_STAGE_TRANSITION = true;
|
|
89
|
+
static readonly IS_MULTI_STEP_FLOW = false;
|
|
90
|
+
static readonly HAS_STEP_LINKS = false;
|
|
91
|
+
/**
|
|
92
|
+
* Step definitions with linking metadata
|
|
93
|
+
* Used by SDK and backend for auto-linking after step execution
|
|
94
|
+
*/
|
|
95
|
+
static readonly stepDefinitions: MoveMsrToCancelledStepDefinition[];
|
|
96
|
+
/** Type-safe step key accessor */
|
|
97
|
+
static readonly Steps: {
|
|
98
|
+
readonly step_1: "step_1";
|
|
99
|
+
};
|
|
100
|
+
readonly actionName: string;
|
|
101
|
+
readonly schemaActionId: string;
|
|
102
|
+
readonly entity: string;
|
|
103
|
+
readonly stageKey: string;
|
|
104
|
+
constructor(record: OdinRecord<any> | {
|
|
105
|
+
id: string;
|
|
106
|
+
entity: string;
|
|
107
|
+
type?: string;
|
|
108
|
+
}, options?: {
|
|
109
|
+
journeyId?: string;
|
|
110
|
+
});
|
|
111
|
+
/** Step classes that can be used with this action */
|
|
112
|
+
static readonly stepClasses: readonly [];
|
|
113
|
+
steps: StepClassMap[(typeof MoveMsrToCancelledDto.stepClasses)[number]][];
|
|
114
|
+
}
|
|
115
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MoveMsrToCancelled Action DTO
|
|
4
|
+
*
|
|
5
|
+
* MoveMsrToCancelled
|
|
6
|
+
*
|
|
7
|
+
* @module ServiceModule
|
|
8
|
+
* @entity ModifyServiceRequest
|
|
9
|
+
* @entityType DEFAULT
|
|
10
|
+
* @actionKey MoveMsrToCancelled
|
|
11
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.MoveMsrToCancelledDto = exports.MoveMsrToCancelledSteps = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* Type-safe step keys for MoveMsrToCancelled
|
|
20
|
+
*/
|
|
21
|
+
exports.MoveMsrToCancelledSteps = {
|
|
22
|
+
step_1: 'step_1',
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* MoveMsrToCancelled
|
|
26
|
+
*
|
|
27
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
28
|
+
* @module ServiceModule
|
|
29
|
+
* @entity ModifyServiceRequest
|
|
30
|
+
* @entityType DEFAULT (Default)
|
|
31
|
+
* @targetStages ModifyServiceRequestStateStageCancelled
|
|
32
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled
|
|
33
|
+
* @permission schema.action.movemsrtocancelled.trigger
|
|
34
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
35
|
+
*/
|
|
36
|
+
class MoveMsrToCancelledDto extends core_1.OdinRecordUpdateDto {
|
|
37
|
+
constructor(record, options) {
|
|
38
|
+
super({
|
|
39
|
+
id: record.id,
|
|
40
|
+
entity: record.entity,
|
|
41
|
+
type: record.type,
|
|
42
|
+
properties: {},
|
|
43
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
44
|
+
});
|
|
45
|
+
this.actionName = 'MoveMsrToCancelled';
|
|
46
|
+
this.schemaActionId = '7d70b973-7823-4625-bb7d-9c65aa9e0cfb';
|
|
47
|
+
this.entity = 'ServiceModule:ModifyServiceRequest';
|
|
48
|
+
this.stageKey = 'ModifyServiceRequestStateStageCancelled';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.MoveMsrToCancelledDto = MoveMsrToCancelledDto;
|
|
52
|
+
/** Used by SDK generators to identify action type */
|
|
53
|
+
MoveMsrToCancelledDto.ACTION_TYPE = 'UPDATE';
|
|
54
|
+
MoveMsrToCancelledDto.ACTION_KEY = 'MoveMsrToCancelled';
|
|
55
|
+
MoveMsrToCancelledDto.MODULE_NAME = 'ServiceModule';
|
|
56
|
+
MoveMsrToCancelledDto.ENTITIES = ['ModifyServiceRequest'];
|
|
57
|
+
MoveMsrToCancelledDto.ENTITY_TYPE = 'DEFAULT';
|
|
58
|
+
MoveMsrToCancelledDto.EVENT_NAME = 'k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToCancelled';
|
|
59
|
+
MoveMsrToCancelledDto.SCHEMA_ACTION_ID = '7d70b973-7823-4625-bb7d-9c65aa9e0cfb';
|
|
60
|
+
MoveMsrToCancelledDto.PERMISSION = 'schema.action.movemsrtocancelled.trigger';
|
|
61
|
+
MoveMsrToCancelledDto.TARGET_STAGES = ['ModifyServiceRequestStateStageCancelled'];
|
|
62
|
+
MoveMsrToCancelledDto.IS_STAGE_TRANSITION = true;
|
|
63
|
+
MoveMsrToCancelledDto.IS_MULTI_STEP_FLOW = false;
|
|
64
|
+
MoveMsrToCancelledDto.HAS_STEP_LINKS = false;
|
|
65
|
+
/**
|
|
66
|
+
* Step definitions with linking metadata
|
|
67
|
+
* Used by SDK and backend for auto-linking after step execution
|
|
68
|
+
*/
|
|
69
|
+
MoveMsrToCancelledDto.stepDefinitions = [
|
|
70
|
+
{
|
|
71
|
+
stepKey: 'step_1',
|
|
72
|
+
dtoClass: 'unknown',
|
|
73
|
+
entity: 'unknown',
|
|
74
|
+
linksTo: null
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
/** Type-safe step key accessor */
|
|
78
|
+
MoveMsrToCancelledDto.Steps = exports.MoveMsrToCancelledSteps;
|
|
79
|
+
/** Step classes that can be used with this action */
|
|
80
|
+
MoveMsrToCancelledDto.stepClasses = [];
|
|
@@ -468,6 +468,31 @@ export declare class ModifyServiceRequestRecord<TProps = ModifyServiceRequestPro
|
|
|
468
468
|
journeyId?: string;
|
|
469
469
|
stageKey?: string;
|
|
470
470
|
}): ActionBuilder;
|
|
471
|
+
/**
|
|
472
|
+
* MoveMsrToCancelled
|
|
473
|
+
*
|
|
474
|
+
* Transitions this ModifyServiceRequest record to a new pipeline stage.
|
|
475
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
476
|
+
*
|
|
477
|
+
* @remarks Transitions to stage: ModifyServiceRequestStateStageCancelled
|
|
478
|
+
*
|
|
479
|
+
* @param options - Optional settings
|
|
480
|
+
* @param options.journeyId - Associate with a journey
|
|
481
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
482
|
+
* @throws Error if called on a new (unsaved) record
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* ```typescript
|
|
486
|
+
* const record = await odinClient.modifyServiceRequests.get(id);
|
|
487
|
+
* await record.moveMsrToCancelled().execute();
|
|
488
|
+
*
|
|
489
|
+
* // Dry run (for debugging)
|
|
490
|
+
* const payload = record.moveMsrToCancelled().dryRun();
|
|
491
|
+
* ```
|
|
492
|
+
*/
|
|
493
|
+
moveMsrToCancelled(options?: {
|
|
494
|
+
journeyId?: string;
|
|
495
|
+
}): ActionBuilder;
|
|
471
496
|
/**
|
|
472
497
|
* UpdateModifyServiceRequest
|
|
473
498
|
*
|
|
@@ -728,6 +728,35 @@ class ModifyServiceRequestRecord {
|
|
|
728
728
|
// ============================================
|
|
729
729
|
// UPDATE ACTIONS (require existing record)
|
|
730
730
|
// ============================================
|
|
731
|
+
/**
|
|
732
|
+
* MoveMsrToCancelled
|
|
733
|
+
*
|
|
734
|
+
* Transitions this ModifyServiceRequest record to a new pipeline stage.
|
|
735
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
736
|
+
*
|
|
737
|
+
* @remarks Transitions to stage: ModifyServiceRequestStateStageCancelled
|
|
738
|
+
*
|
|
739
|
+
* @param options - Optional settings
|
|
740
|
+
* @param options.journeyId - Associate with a journey
|
|
741
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
742
|
+
* @throws Error if called on a new (unsaved) record
|
|
743
|
+
*
|
|
744
|
+
* @example
|
|
745
|
+
* ```typescript
|
|
746
|
+
* const record = await odinClient.modifyServiceRequests.get(id);
|
|
747
|
+
* await record.moveMsrToCancelled().execute();
|
|
748
|
+
*
|
|
749
|
+
* // Dry run (for debugging)
|
|
750
|
+
* const payload = record.moveMsrToCancelled().dryRun();
|
|
751
|
+
* ```
|
|
752
|
+
*/
|
|
753
|
+
moveMsrToCancelled(options) {
|
|
754
|
+
var _a;
|
|
755
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
756
|
+
throw new Error('moveMsrToCancelled requires an existing record. Use accessor.get() first.');
|
|
757
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveMsrToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'ModifyServiceRequestStateStageCancelled' }, options);
|
|
758
|
+
return new ActionBuilder(this._provider, 'ServiceModule', 'ModifyServiceRequest', payload, () => { this._pendingLinks = []; });
|
|
759
|
+
}
|
|
731
760
|
/**
|
|
732
761
|
* UpdateModifyServiceRequest
|
|
733
762
|
*
|