@d19n/youfibre-odin-sdk 2.0.49 → 2.0.51-beta.0

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
@@ -352,7 +352,7 @@ This SDK includes **164** entities across **12** modules.
352
352
 
353
353
  ## Actions
354
354
 
355
- This SDK includes **595** actions.
355
+ This SDK includes **596** actions.
356
356
 
357
357
  ### Action Types
358
358
 
@@ -386,6 +386,7 @@ This SDK includes **595** actions.
386
386
  | `MoveOrderFromDraftToAnyStage` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromDraftToAnyStage |
387
387
  | `MoveOrderFromPendingCancellationToActive` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromPendingCancellationToActive |
388
388
  | `MoveOrderFromPreOrderToCancelled` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromPreOrderToCancelled |
389
+ | `MoveOrderFromSupplyToCancelled` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled |
389
390
  | `MoveOrderToActive` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Update.ActivateOrder |
390
391
  | `MoveOrderToDeactivatedFromActive` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderToDeactivatedFromActive |
391
392
  | `OderUpdate` | UPDATE | k1.t-hEOJjsDb.OrderModule.Order.Update.OderUpdate |
@@ -417,6 +418,8 @@ This SDK includes **595** actions.
417
418
 
418
419
  **MoveOrderFromPreOrderToCancelled Target Stages:** `OrderStageCancelled`
419
420
 
421
+ **MoveOrderFromSupplyToCancelled Target Stages:** `OrderStageCancelled`
422
+
420
423
  **MoveOrderToActive Target Stages:** `OrderStageActive`
421
424
 
422
425
  **MoveOrderToDeactivatedFromActive Target Stages:** `OrderStageDeactivated`
@@ -0,0 +1,112 @@
1
+ /**
2
+ * MoveOrderFromSupplyToCancelled Action DTO
3
+ *
4
+ * MoveOrderFromSupplyToCancelled
5
+ *
6
+ * @module OrderModule
7
+ * @entity Order
8
+ * @actionKey MoveOrderFromSupplyToCancelled
9
+ * @event k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled
10
+ *
11
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
+ */
13
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
14
+ declare type StepClassMap = {};
15
+ /**
16
+ * Link definition for connecting steps in MoveOrderFromSupplyToCancelled
17
+ */
18
+ export interface MoveOrderFromSupplyToCancelledStepLink {
19
+ /**
20
+ * The stepKey of the target step to link TO
21
+ * Must reference another step's stepKey in the same flow
22
+ */
23
+ stepKey: string;
24
+ /**
25
+ * The schema association ID (UUID) defining the relationship
26
+ * Use the association.id from the schema association definition
27
+ * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
28
+ */
29
+ schemaAssociationId: string;
30
+ }
31
+ /**
32
+ * Step definition with linking metadata for MoveOrderFromSupplyToCancelled
33
+ */
34
+ export interface MoveOrderFromSupplyToCancelledStepDefinition {
35
+ /** Unique identifier for this step */
36
+ stepKey: string;
37
+ /** The DTO class name for this step */
38
+ dtoClass: string;
39
+ /** The entity this step creates (Module:Entity format) */
40
+ entity: string;
41
+ /** Links to create after this step executes */
42
+ linksTo: MoveOrderFromSupplyToCancelledStepLink[] | null;
43
+ }
44
+ /**
45
+ * Type-safe step keys for MoveOrderFromSupplyToCancelled
46
+ */
47
+ export declare const MoveOrderFromSupplyToCancelledSteps: {
48
+ readonly step_1: "step_1";
49
+ };
50
+ export declare type MoveOrderFromSupplyToCancelledStepKey = typeof MoveOrderFromSupplyToCancelledSteps[keyof typeof MoveOrderFromSupplyToCancelledSteps];
51
+ /**
52
+ * RabbitMQ message payload for MoveOrderFromSupplyToCancelled step flow events
53
+ *
54
+ * @event k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled
55
+ */
56
+ export interface MoveOrderFromSupplyToCancelledMessage extends OdinRecordUpdatedEvent<MoveOrderFromSupplyToCancelledDto, {}> {
57
+ }
58
+ /**
59
+ * Properties for MoveOrderFromSupplyToCancelled action
60
+ *
61
+ */
62
+ export interface MoveOrderFromSupplyToCancelledProperties {
63
+ }
64
+ /**
65
+ * MoveOrderFromSupplyToCancelled
66
+ *
67
+ * @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
68
+ * @module OrderModule
69
+ * @entity Order
70
+ * @targetStages OrderStageCancelled
71
+ * @event k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled
72
+ * @permission schema.action.moveorderfromsupplytocancelled.trigger
73
+ * @benchmark This action is tracked for performance benchmarks
74
+ */
75
+ export declare class MoveOrderFromSupplyToCancelledDto extends OdinRecordUpdateDto<Record<string, any>> {
76
+ /** Used by SDK generators to identify action type */
77
+ static readonly ACTION_TYPE = "UPDATE";
78
+ static readonly ACTION_KEY = "MoveOrderFromSupplyToCancelled";
79
+ static readonly MODULE_NAME = "OrderModule";
80
+ static readonly ENTITIES: string[];
81
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled";
82
+ static readonly SCHEMA_ACTION_ID = "5f0e17fb-63a5-4857-a66b-d7c5274f1a81";
83
+ static readonly PERMISSION = "schema.action.moveorderfromsupplytocancelled.trigger";
84
+ static readonly TARGET_STAGES: readonly ["OrderStageCancelled"];
85
+ static readonly IS_STAGE_TRANSITION = true;
86
+ static readonly IS_MULTI_STEP_FLOW = false;
87
+ static readonly HAS_STEP_LINKS = false;
88
+ /**
89
+ * Step definitions with linking metadata
90
+ * Used by SDK and backend for auto-linking after step execution
91
+ */
92
+ static readonly stepDefinitions: MoveOrderFromSupplyToCancelledStepDefinition[];
93
+ /** Type-safe step key accessor */
94
+ static readonly Steps: {
95
+ readonly step_1: "step_1";
96
+ };
97
+ readonly actionName: string;
98
+ readonly schemaActionId: string;
99
+ readonly entity: string;
100
+ readonly stageKey: string;
101
+ constructor(record: OdinRecord<any> | {
102
+ id: string;
103
+ entity: string;
104
+ type?: string;
105
+ }, options?: {
106
+ journeyId?: string;
107
+ });
108
+ /** Step classes that can be used with this action */
109
+ static readonly stepClasses: readonly [];
110
+ steps: StepClassMap[(typeof MoveOrderFromSupplyToCancelledDto.stepClasses)[number]][];
111
+ }
112
+ export {};
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /**
3
+ * MoveOrderFromSupplyToCancelled Action DTO
4
+ *
5
+ * MoveOrderFromSupplyToCancelled
6
+ *
7
+ * @module OrderModule
8
+ * @entity Order
9
+ * @actionKey MoveOrderFromSupplyToCancelled
10
+ * @event k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.MoveOrderFromSupplyToCancelledDto = exports.MoveOrderFromSupplyToCancelledSteps = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * Type-safe step keys for MoveOrderFromSupplyToCancelled
19
+ */
20
+ exports.MoveOrderFromSupplyToCancelledSteps = {
21
+ step_1: 'step_1',
22
+ };
23
+ /**
24
+ * MoveOrderFromSupplyToCancelled
25
+ *
26
+ * @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
27
+ * @module OrderModule
28
+ * @entity Order
29
+ * @targetStages OrderStageCancelled
30
+ * @event k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled
31
+ * @permission schema.action.moveorderfromsupplytocancelled.trigger
32
+ * @benchmark This action is tracked for performance benchmarks
33
+ */
34
+ class MoveOrderFromSupplyToCancelledDto extends core_1.OdinRecordUpdateDto {
35
+ constructor(record, options) {
36
+ super({
37
+ id: record.id,
38
+ entity: record.entity,
39
+ type: record.type,
40
+ properties: {},
41
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
42
+ });
43
+ this.actionName = 'MoveOrderFromSupplyToCancelled';
44
+ this.schemaActionId = '5f0e17fb-63a5-4857-a66b-d7c5274f1a81';
45
+ this.entity = 'OrderModule:Order';
46
+ this.stageKey = 'OrderStageCancelled';
47
+ }
48
+ }
49
+ exports.MoveOrderFromSupplyToCancelledDto = MoveOrderFromSupplyToCancelledDto;
50
+ /** Used by SDK generators to identify action type */
51
+ MoveOrderFromSupplyToCancelledDto.ACTION_TYPE = 'UPDATE';
52
+ MoveOrderFromSupplyToCancelledDto.ACTION_KEY = 'MoveOrderFromSupplyToCancelled';
53
+ MoveOrderFromSupplyToCancelledDto.MODULE_NAME = 'OrderModule';
54
+ MoveOrderFromSupplyToCancelledDto.ENTITIES = ['Order'];
55
+ MoveOrderFromSupplyToCancelledDto.EVENT_NAME = 'k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToCancelled';
56
+ MoveOrderFromSupplyToCancelledDto.SCHEMA_ACTION_ID = '5f0e17fb-63a5-4857-a66b-d7c5274f1a81';
57
+ MoveOrderFromSupplyToCancelledDto.PERMISSION = 'schema.action.moveorderfromsupplytocancelled.trigger';
58
+ MoveOrderFromSupplyToCancelledDto.TARGET_STAGES = ['OrderStageCancelled'];
59
+ MoveOrderFromSupplyToCancelledDto.IS_STAGE_TRANSITION = true;
60
+ MoveOrderFromSupplyToCancelledDto.IS_MULTI_STEP_FLOW = false;
61
+ MoveOrderFromSupplyToCancelledDto.HAS_STEP_LINKS = false;
62
+ /**
63
+ * Step definitions with linking metadata
64
+ * Used by SDK and backend for auto-linking after step execution
65
+ */
66
+ MoveOrderFromSupplyToCancelledDto.stepDefinitions = [
67
+ {
68
+ stepKey: 'step_1',
69
+ dtoClass: 'unknown',
70
+ entity: 'unknown',
71
+ linksTo: null
72
+ }
73
+ ];
74
+ /** Type-safe step key accessor */
75
+ MoveOrderFromSupplyToCancelledDto.Steps = exports.MoveOrderFromSupplyToCancelledSteps;
76
+ /** Step classes that can be used with this action */
77
+ MoveOrderFromSupplyToCancelledDto.stepClasses = [];
@@ -127,6 +127,8 @@ export declare enum AccountCreditPropertyKeys {
127
127
  Description = "Description",
128
128
  /** Reason */
129
129
  Reason = "Reason",
130
+ /** Brsk reference */
131
+ ExternalReference = "ExternalReference",
130
132
  /** Credit Balance */
131
133
  CreditBalance = "CreditBalance",
132
134
  /** Contact */
@@ -157,6 +159,11 @@ export interface AccountCreditProperties {
157
159
  * @enum {AccountCreditReason}
158
160
  */
159
161
  Reason: AccountCreditReason;
162
+ /** Brsk reference
163
+ *
164
+ * @type {TEXT}
165
+ */
166
+ ExternalReference: string;
160
167
  /** Credit Balance
161
168
  *
162
169
  * @type {CURRENCY}
@@ -134,6 +134,8 @@ var AccountCreditPropertyKeys;
134
134
  AccountCreditPropertyKeys["Description"] = "Description";
135
135
  /** Reason */
136
136
  AccountCreditPropertyKeys["Reason"] = "Reason";
137
+ /** Brsk reference */
138
+ AccountCreditPropertyKeys["ExternalReference"] = "ExternalReference";
137
139
  /** Credit Balance */
138
140
  AccountCreditPropertyKeys["CreditBalance"] = "CreditBalance";
139
141
  /** Contact */
@@ -23,12 +23,12 @@ export declare enum ConfigEntityTypes {
23
23
  * Use these constants instead of string literals for type safety
24
24
  */
25
25
  export declare enum ConfigPropertyKeys {
26
- /** Data field for Config records. Used by Platform team. */
27
- Test = "Test",
26
+ /** the name of the app this config relates to (Platform - Config) */
27
+ AppName = "AppName",
28
28
  /** object of { key: value } mappings (Platform - Config) */
29
29
  Mappings = "Mappings",
30
- /** the name of the app this config relates to (Platform - Config) */
31
- AppName = "AppName"
30
+ /** Data field for Config records. Used by Platform team. */
31
+ Test = "Test"
32
32
  }
33
33
  /**
34
34
  * Properties for Config records
@@ -36,21 +36,21 @@ export declare enum ConfigPropertyKeys {
36
36
  * @see SchemaModule:Config
37
37
  */
38
38
  export interface ConfigProperties {
39
- /** Data field for Config records. Used by Platform team.
39
+ /** the name of the app this config relates to (Platform - Config)
40
40
  *
41
41
  * @type {TEXT}
42
42
  */
43
- Test: string;
43
+ AppName: string;
44
44
  /** object of { key: value } mappings (Platform - Config)
45
45
  *
46
46
  * @type {JSON}
47
47
  */
48
48
  Mappings: string;
49
- /** the name of the app this config relates to (Platform - Config)
49
+ /** Data field for Config records. Used by Platform team.
50
50
  *
51
51
  * @type {TEXT}
52
52
  */
53
- AppName: string;
53
+ Test: string;
54
54
  }
55
55
  /**
56
56
  * Config entity from SchemaModule
@@ -28,12 +28,12 @@ var ConfigEntityTypes;
28
28
  */
29
29
  var ConfigPropertyKeys;
30
30
  (function (ConfigPropertyKeys) {
31
- /** Data field for Config records. Used by Platform team. */
32
- ConfigPropertyKeys["Test"] = "Test";
33
- /** object of { key: value } mappings (Platform - Config) */
34
- ConfigPropertyKeys["Mappings"] = "Mappings";
35
31
  /** the name of the app this config relates to (Platform - Config) */
36
32
  ConfigPropertyKeys["AppName"] = "AppName";
33
+ /** object of { key: value } mappings (Platform - Config) */
34
+ ConfigPropertyKeys["Mappings"] = "Mappings";
35
+ /** Data field for Config records. Used by Platform team. */
36
+ ConfigPropertyKeys["Test"] = "Test";
37
37
  })(ConfigPropertyKeys = exports.ConfigPropertyKeys || (exports.ConfigPropertyKeys = {}));
38
38
  /**
39
39
  * Config entity from SchemaModule
@@ -131,6 +131,8 @@ export declare enum PaymentMethodPropertyKeys {
131
131
  Provider = "Provider",
132
132
  /** 2 or 4 ending digits of the bank account number (Finance - PaymentMethod) */
133
133
  BankAccountNumberEnding = "BankAccountNumberEnding",
134
+ /** ExternalRefBrskISP */
135
+ ExternalRefBrskIsp = "ExternalRefBrskISP",
134
136
  /** This is a private field used for creating a new payment method, no data is stored here. (Finance - PaymentMethod) */
135
137
  BranchCode = "_BranchCode",
136
138
  /** Private field use for forms creating the payment method. No data is stored here. (Finance - PaymentMethod) */
@@ -221,6 +223,11 @@ export interface PaymentMethodProperties {
221
223
  * @hidden This field is hidden in the UI
222
224
  */
223
225
  BankAccountNumberEnding: string;
226
+ /** ExternalRefBrskISP
227
+ *
228
+ * @type {TEXT}
229
+ */
230
+ ExternalRefBrskIsp: string;
224
231
  /** This is a private field used for creating a new payment method, no data is stored here. (Finance - PaymentMethod)
225
232
  *
226
233
  * @type {TEXT}
@@ -132,6 +132,8 @@ var PaymentMethodPropertyKeys;
132
132
  PaymentMethodPropertyKeys["Provider"] = "Provider";
133
133
  /** 2 or 4 ending digits of the bank account number (Finance - PaymentMethod) */
134
134
  PaymentMethodPropertyKeys["BankAccountNumberEnding"] = "BankAccountNumberEnding";
135
+ /** ExternalRefBrskISP */
136
+ PaymentMethodPropertyKeys["ExternalRefBrskIsp"] = "ExternalRefBrskISP";
135
137
  /** This is a private field used for creating a new payment method, no data is stored here. (Finance - PaymentMethod) */
136
138
  PaymentMethodPropertyKeys["BranchCode"] = "_BranchCode";
137
139
  /** Private field use for forms creating the payment method. No data is stored here. (Finance - PaymentMethod) */
@@ -1830,6 +1830,31 @@ export declare class OrderRecord<TProps = OrderProperties> {
1830
1830
  moveOrderFromPreOrderToCancelled(options?: {
1831
1831
  journeyId?: string;
1832
1832
  }): ActionBuilder;
1833
+ /**
1834
+ * MoveOrderFromSupplyToCancelled
1835
+ *
1836
+ * Transitions this Order record to a new pipeline stage.
1837
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
1838
+ *
1839
+ * @remarks Transitions to stage: OrderStageCancelled
1840
+ *
1841
+ * @param options - Optional settings
1842
+ * @param options.journeyId - Associate with a journey
1843
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
1844
+ * @throws Error if called on a new (unsaved) record
1845
+ *
1846
+ * @example
1847
+ * ```typescript
1848
+ * const record = await odinClient.orders.get(id);
1849
+ * await record.moveOrderFromSupplyToCancelled().execute();
1850
+ *
1851
+ * // Dry run (for debugging)
1852
+ * const payload = record.moveOrderFromSupplyToCancelled().dryRun();
1853
+ * ```
1854
+ */
1855
+ moveOrderFromSupplyToCancelled(options?: {
1856
+ journeyId?: string;
1857
+ }): ActionBuilder;
1833
1858
  /**
1834
1859
  * MoveOrderToActive
1835
1860
  *
@@ -2636,6 +2636,35 @@ class OrderRecord {
2636
2636
  const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveOrderFromPreOrderToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'OrderStageCancelled' }, options);
2637
2637
  return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
2638
2638
  }
2639
+ /**
2640
+ * MoveOrderFromSupplyToCancelled
2641
+ *
2642
+ * Transitions this Order record to a new pipeline stage.
2643
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
2644
+ *
2645
+ * @remarks Transitions to stage: OrderStageCancelled
2646
+ *
2647
+ * @param options - Optional settings
2648
+ * @param options.journeyId - Associate with a journey
2649
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
2650
+ * @throws Error if called on a new (unsaved) record
2651
+ *
2652
+ * @example
2653
+ * ```typescript
2654
+ * const record = await odinClient.orders.get(id);
2655
+ * await record.moveOrderFromSupplyToCancelled().execute();
2656
+ *
2657
+ * // Dry run (for debugging)
2658
+ * const payload = record.moveOrderFromSupplyToCancelled().dryRun();
2659
+ * ```
2660
+ */
2661
+ moveOrderFromSupplyToCancelled(options) {
2662
+ var _a;
2663
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
2664
+ throw new Error('moveOrderFromSupplyToCancelled requires an existing record. Use accessor.get() first.');
2665
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveOrderFromSupplyToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'OrderStageCancelled' }, options);
2666
+ return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
2667
+ }
2639
2668
  /**
2640
2669
  * MoveOrderToActive
2641
2670
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.49",
3
+ "version": "2.0.51-beta.0",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",
@@ -11,7 +11,7 @@
11
11
  "typescript": "4.8.4"
12
12
  },
13
13
  "dependencies": {
14
- "@d19n/odin-sdk-generator": "^3.0.234",
14
+ "@d19n/odin-sdk-generator": "^3.0.235",
15
15
  "@d19n/odin-types": "^3.0.31"
16
16
  },
17
17
  "scripts": {