@d19n/youfibre-odin-sdk 2.0.22 → 2.0.23-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 +4 -1
- package/dist/actions-v2/CreateInstallDto.d.ts +16 -15
- package/dist/actions-v2/CreateInstallDto.js +6 -4
- package/dist/actions-v2/CreateServiceDto.d.ts +14 -13
- package/dist/actions-v2/CreateServiceDto.js +3 -1
- package/dist/actions-v2/MoveOrderFromSupplyToActiveDto.d.ts +112 -0
- package/dist/actions-v2/MoveOrderFromSupplyToActiveDto.js +77 -0
- package/dist/actions-v2/UpdateAccountCreditBalanceDto.d.ts +10 -0
- package/dist/api-sdk-v2/AccountCreditApi.d.ts +2 -0
- package/dist/api-sdk-v2/AccountCreditApi.js +6 -0
- package/dist/api-sdk-v2/CreditNoteApi.d.ts +2 -0
- package/dist/api-sdk-v2/CreditNoteApi.js +6 -0
- package/dist/db-sdk-v2/AccountCreditDb.d.ts +2 -0
- package/dist/db-sdk-v2/AccountCreditDb.js +6 -0
- package/dist/db-sdk-v2/CreditNoteDb.d.ts +2 -0
- package/dist/db-sdk-v2/CreditNoteDb.js +6 -0
- package/dist/entities-v2/AccountCredit.d.ts +7 -0
- package/dist/entities-v2/AccountCredit.js +5 -1
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +4 -4
- package/dist/entities-v2/CreditNote.d.ts +3 -0
- package/dist/records-v2/AccountCreditRecord.d.ts +26 -7
- package/dist/records-v2/AccountCreditRecord.js +40 -15
- package/dist/records-v2/CreditNoteRecord.d.ts +20 -0
- package/dist/records-v2/CreditNoteRecord.js +33 -0
- package/dist/records-v2/OrderRecord.d.ts +25 -0
- package/dist/records-v2/OrderRecord.js +29 -0
- package/dist/records-v2/ServiceAppointmentConfigRecord.d.ts +1 -1
- package/dist/records-v2/ServiceAppointmentConfigRecord.js +2 -2
- package/package.json +1 -1
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 **
|
|
355
|
+
This SDK includes **586** actions.
|
|
356
356
|
|
|
357
357
|
### Action Types
|
|
358
358
|
|
|
@@ -387,6 +387,7 @@ This SDK includes **585** actions.
|
|
|
387
387
|
| `MoveOrderFromDraftToAnyStage` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromDraftToAnyStage |
|
|
388
388
|
| `MoveOrderFromPendingCancellationToActive` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromPendingCancellationToActive |
|
|
389
389
|
| `MoveOrderFromPreOrderToCancelled` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromPreOrderToCancelled |
|
|
390
|
+
| `MoveOrderFromSupplyToActive` | STAGE_TRANSITION | k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive |
|
|
390
391
|
| `MoveOrderToActive` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Update.ActivateOrder |
|
|
391
392
|
| `MoveOrderToDeactivatedFromActive` | STAGE_TRANSITION | k1.t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderToDeactivatedFromActive |
|
|
392
393
|
| `OderUpdate` | UPDATE | k1.t-hEOJjsDb.OrderModule.Order.Update.OderUpdate |
|
|
@@ -418,6 +419,8 @@ This SDK includes **585** actions.
|
|
|
418
419
|
|
|
419
420
|
**MoveOrderFromPreOrderToCancelled Target Stages:** `OrderStageCancelled`
|
|
420
421
|
|
|
422
|
+
**MoveOrderFromSupplyToActive Target Stages:** `OrderStageActive`
|
|
423
|
+
|
|
421
424
|
**MoveOrderToActive Target Stages:** `OrderStageActive`
|
|
422
425
|
|
|
423
426
|
**MoveOrderToDeactivatedFromActive Target Stages:** `OrderStageDeactivated`
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CreateINSTALL Action DTO
|
|
3
3
|
*
|
|
4
4
|
* Create INSTALL
|
|
5
5
|
*
|
|
6
6
|
* @module FieldServiceModule
|
|
7
7
|
* @entity ServiceAppointmentConfig
|
|
8
8
|
* @entityType INSTALL
|
|
9
|
-
* @actionKey
|
|
9
|
+
* @actionKey CreateINSTALL
|
|
10
10
|
* @event k1.t-hEOJjsDb.FieldServiceModule.ServiceAppointmentConfig.Create.CreateINSTALL
|
|
11
11
|
*
|
|
12
12
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
13
|
*/
|
|
14
14
|
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
15
|
/**
|
|
16
|
-
* RabbitMQ message payload for
|
|
16
|
+
* RabbitMQ message payload for CreateINSTALL created events
|
|
17
17
|
*
|
|
18
18
|
* @event k1.t-hEOJjsDb.FieldServiceModule.ServiceAppointmentConfig.Create.CreateINSTALL
|
|
19
19
|
*/
|
|
20
20
|
export interface CreateInstallMessage extends OdinRecordCreatedEvent<CreateInstallDto, CreateInstallProperties> {
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Properties for
|
|
23
|
+
* Properties for CreateINSTALL action
|
|
24
24
|
*
|
|
25
|
-
* @property Required fields:
|
|
26
|
-
* @property Optional fields:
|
|
25
|
+
* @property Required fields: 3
|
|
26
|
+
* @property Optional fields: 8
|
|
27
27
|
*/
|
|
28
28
|
export interface CreateInstallProperties {
|
|
29
29
|
/**
|
|
@@ -51,14 +51,6 @@ export interface CreateInstallProperties {
|
|
|
51
51
|
* @required
|
|
52
52
|
*/
|
|
53
53
|
Contractor: string;
|
|
54
|
-
/**
|
|
55
|
-
* Region
|
|
56
|
-
*
|
|
57
|
-
* The linked region (Field Operations - ServiceAppointmentConfig)
|
|
58
|
-
* @type {LOOKUP}
|
|
59
|
-
* @required
|
|
60
|
-
*/
|
|
61
|
-
RegionId: string;
|
|
62
54
|
/**
|
|
63
55
|
* ExPolygonId
|
|
64
56
|
*
|
|
@@ -81,6 +73,13 @@ export interface CreateInstallProperties {
|
|
|
81
73
|
* @format DD/MM/YYYY
|
|
82
74
|
*/
|
|
83
75
|
AvailableTo?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Region
|
|
78
|
+
*
|
|
79
|
+
* The linked region (Field Operations - ServiceAppointmentConfig)
|
|
80
|
+
* @type {LOOKUP}
|
|
81
|
+
*/
|
|
82
|
+
RegionId?: string | null;
|
|
84
83
|
/**
|
|
85
84
|
* BookingDelay
|
|
86
85
|
*
|
|
@@ -111,6 +110,8 @@ export interface CreateInstallProperties {
|
|
|
111
110
|
Name?: string | null;
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
113
|
+
* CreateINSTALL
|
|
114
|
+
*
|
|
114
115
|
* Create INSTALL
|
|
115
116
|
*
|
|
116
117
|
* @actionType CREATE - Creates a new ServiceAppointmentConfig record
|
|
@@ -126,7 +127,7 @@ export interface CreateInstallProperties {
|
|
|
126
127
|
export declare class CreateInstallDto extends OdinRecordCreateDto<CreateInstallProperties> {
|
|
127
128
|
/** Used by SDK generators to identify action type */
|
|
128
129
|
static readonly ACTION_TYPE = "CREATE";
|
|
129
|
-
static readonly ACTION_KEY = "
|
|
130
|
+
static readonly ACTION_KEY = "CreateINSTALL";
|
|
130
131
|
static readonly MODULE_NAME = "FieldServiceModule";
|
|
131
132
|
static readonly ENTITIES: string[];
|
|
132
133
|
static readonly ENTITY_TYPE = "INSTALL";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* CreateINSTALL Action DTO
|
|
4
4
|
*
|
|
5
5
|
* Create INSTALL
|
|
6
6
|
*
|
|
7
7
|
* @module FieldServiceModule
|
|
8
8
|
* @entity ServiceAppointmentConfig
|
|
9
9
|
* @entityType INSTALL
|
|
10
|
-
* @actionKey
|
|
10
|
+
* @actionKey CreateINSTALL
|
|
11
11
|
* @event k1.t-hEOJjsDb.FieldServiceModule.ServiceAppointmentConfig.Create.CreateINSTALL
|
|
12
12
|
*
|
|
13
13
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.CreateInstallDto = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
18
|
/**
|
|
19
|
+
* CreateINSTALL
|
|
20
|
+
*
|
|
19
21
|
* Create INSTALL
|
|
20
22
|
*
|
|
21
23
|
* @actionType CREATE - Creates a new ServiceAppointmentConfig record
|
|
@@ -36,7 +38,7 @@ class CreateInstallDto extends core_1.OdinRecordCreateDto {
|
|
|
36
38
|
properties,
|
|
37
39
|
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
38
40
|
});
|
|
39
|
-
this.actionName = '
|
|
41
|
+
this.actionName = 'CreateINSTALL';
|
|
40
42
|
this.schemaActionId = 'b92d1d40-11cb-4475-9a72-16207992afe5';
|
|
41
43
|
this.entity = 'FieldServiceModule:ServiceAppointmentConfig';
|
|
42
44
|
}
|
|
@@ -44,7 +46,7 @@ class CreateInstallDto extends core_1.OdinRecordCreateDto {
|
|
|
44
46
|
exports.CreateInstallDto = CreateInstallDto;
|
|
45
47
|
/** Used by SDK generators to identify action type */
|
|
46
48
|
CreateInstallDto.ACTION_TYPE = 'CREATE';
|
|
47
|
-
CreateInstallDto.ACTION_KEY = '
|
|
49
|
+
CreateInstallDto.ACTION_KEY = 'CreateINSTALL';
|
|
48
50
|
CreateInstallDto.MODULE_NAME = 'FieldServiceModule';
|
|
49
51
|
CreateInstallDto.ENTITIES = ['ServiceAppointmentConfig'];
|
|
50
52
|
CreateInstallDto.ENTITY_TYPE = 'INSTALL';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CreateSERVICE Action DTO
|
|
3
3
|
*
|
|
4
4
|
* Create SERVICE
|
|
5
5
|
*
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
15
|
/**
|
|
16
|
-
* RabbitMQ message payload for
|
|
16
|
+
* RabbitMQ message payload for CreateSERVICE created events
|
|
17
17
|
*
|
|
18
18
|
* @event k1.t-hEOJjsDb.FieldServiceModule.ServiceAppointmentConfig.Create.CreateSERVICE
|
|
19
19
|
*/
|
|
20
20
|
export interface CreateServiceMessage extends OdinRecordCreatedEvent<CreateServiceDto, CreateServiceProperties> {
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Properties for
|
|
23
|
+
* Properties for CreateSERVICE action
|
|
24
24
|
*
|
|
25
|
-
* @property Required fields:
|
|
26
|
-
* @property Optional fields:
|
|
25
|
+
* @property Required fields: 3
|
|
26
|
+
* @property Optional fields: 8
|
|
27
27
|
*/
|
|
28
28
|
export interface CreateServiceProperties {
|
|
29
29
|
/**
|
|
@@ -51,14 +51,6 @@ export interface CreateServiceProperties {
|
|
|
51
51
|
* @required
|
|
52
52
|
*/
|
|
53
53
|
Contractor: string;
|
|
54
|
-
/**
|
|
55
|
-
* Region
|
|
56
|
-
*
|
|
57
|
-
* The linked region (Field Operations - ServiceAppointmentConfig)
|
|
58
|
-
* @type {LOOKUP}
|
|
59
|
-
* @required
|
|
60
|
-
*/
|
|
61
|
-
RegionId: string;
|
|
62
54
|
/**
|
|
63
55
|
* ExPolygonId
|
|
64
56
|
*
|
|
@@ -81,6 +73,13 @@ export interface CreateServiceProperties {
|
|
|
81
73
|
* @format DD/MM/YYYY
|
|
82
74
|
*/
|
|
83
75
|
AvailableTo?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Region
|
|
78
|
+
*
|
|
79
|
+
* The linked region (Field Operations - ServiceAppointmentConfig)
|
|
80
|
+
* @type {LOOKUP}
|
|
81
|
+
*/
|
|
82
|
+
RegionId?: string | null;
|
|
84
83
|
/**
|
|
85
84
|
* BookingDelay
|
|
86
85
|
*
|
|
@@ -111,6 +110,8 @@ export interface CreateServiceProperties {
|
|
|
111
110
|
Name?: string | null;
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
113
|
+
* CreateSERVICE
|
|
114
|
+
*
|
|
114
115
|
* Create SERVICE
|
|
115
116
|
*
|
|
116
117
|
* @actionType CREATE - Creates a new ServiceAppointmentConfig record
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* CreateSERVICE Action DTO
|
|
4
4
|
*
|
|
5
5
|
* Create SERVICE
|
|
6
6
|
*
|
|
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.CreateServiceDto = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
18
|
/**
|
|
19
|
+
* CreateSERVICE
|
|
20
|
+
*
|
|
19
21
|
* Create SERVICE
|
|
20
22
|
*
|
|
21
23
|
* @actionType CREATE - Creates a new ServiceAppointmentConfig record
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MoveOrderFromSupplyToActive Action DTO
|
|
3
|
+
*
|
|
4
|
+
* MoveOrderFromSupplyToActive
|
|
5
|
+
*
|
|
6
|
+
* @module OrderModule
|
|
7
|
+
* @entity Order
|
|
8
|
+
* @actionKey MoveOrderFromSupplyToActive
|
|
9
|
+
* @event k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive
|
|
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 MoveOrderFromSupplyToActive
|
|
17
|
+
*/
|
|
18
|
+
export interface MoveOrderFromSupplyToActiveStepLink {
|
|
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 MoveOrderFromSupplyToActive
|
|
33
|
+
*/
|
|
34
|
+
export interface MoveOrderFromSupplyToActiveStepDefinition {
|
|
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: MoveOrderFromSupplyToActiveStepLink[] | null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Type-safe step keys for MoveOrderFromSupplyToActive
|
|
46
|
+
*/
|
|
47
|
+
export declare const MoveOrderFromSupplyToActiveSteps: {
|
|
48
|
+
readonly step_1: "step_1";
|
|
49
|
+
};
|
|
50
|
+
export declare type MoveOrderFromSupplyToActiveStepKey = typeof MoveOrderFromSupplyToActiveSteps[keyof typeof MoveOrderFromSupplyToActiveSteps];
|
|
51
|
+
/**
|
|
52
|
+
* RabbitMQ message payload for MoveOrderFromSupplyToActive step flow events
|
|
53
|
+
*
|
|
54
|
+
* @event k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive
|
|
55
|
+
*/
|
|
56
|
+
export interface MoveOrderFromSupplyToActiveMessage extends OdinRecordUpdatedEvent<MoveOrderFromSupplyToActiveDto, {}> {
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Properties for MoveOrderFromSupplyToActive action
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export interface MoveOrderFromSupplyToActiveProperties {
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* MoveOrderFromSupplyToActive
|
|
66
|
+
*
|
|
67
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
68
|
+
* @module OrderModule
|
|
69
|
+
* @entity Order
|
|
70
|
+
* @targetStages OrderStageActive
|
|
71
|
+
* @event k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive
|
|
72
|
+
* @permission schema.action.moveorderfromsupplytoactive.trigger
|
|
73
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
74
|
+
*/
|
|
75
|
+
export declare class MoveOrderFromSupplyToActiveDto 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 = "MoveOrderFromSupplyToActive";
|
|
79
|
+
static readonly MODULE_NAME = "OrderModule";
|
|
80
|
+
static readonly ENTITIES: string[];
|
|
81
|
+
static readonly EVENT_NAME = "k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive";
|
|
82
|
+
static readonly SCHEMA_ACTION_ID = "03257b42-d641-4fc8-9e9d-91e8c660d4e8";
|
|
83
|
+
static readonly PERMISSION = "schema.action.moveorderfromsupplytoactive.trigger";
|
|
84
|
+
static readonly TARGET_STAGES: readonly ["OrderStageActive"];
|
|
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: MoveOrderFromSupplyToActiveStepDefinition[];
|
|
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 MoveOrderFromSupplyToActiveDto.stepClasses)[number]][];
|
|
111
|
+
}
|
|
112
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MoveOrderFromSupplyToActive Action DTO
|
|
4
|
+
*
|
|
5
|
+
* MoveOrderFromSupplyToActive
|
|
6
|
+
*
|
|
7
|
+
* @module OrderModule
|
|
8
|
+
* @entity Order
|
|
9
|
+
* @actionKey MoveOrderFromSupplyToActive
|
|
10
|
+
* @event k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MoveOrderFromSupplyToActiveDto = exports.MoveOrderFromSupplyToActiveSteps = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Type-safe step keys for MoveOrderFromSupplyToActive
|
|
19
|
+
*/
|
|
20
|
+
exports.MoveOrderFromSupplyToActiveSteps = {
|
|
21
|
+
step_1: 'step_1',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* MoveOrderFromSupplyToActive
|
|
25
|
+
*
|
|
26
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
27
|
+
* @module OrderModule
|
|
28
|
+
* @entity Order
|
|
29
|
+
* @targetStages OrderStageActive
|
|
30
|
+
* @event k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive
|
|
31
|
+
* @permission schema.action.moveorderfromsupplytoactive.trigger
|
|
32
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
33
|
+
*/
|
|
34
|
+
class MoveOrderFromSupplyToActiveDto 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 = 'MoveOrderFromSupplyToActive';
|
|
44
|
+
this.schemaActionId = '03257b42-d641-4fc8-9e9d-91e8c660d4e8';
|
|
45
|
+
this.entity = 'OrderModule:Order';
|
|
46
|
+
this.stageKey = 'OrderStageActive';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.MoveOrderFromSupplyToActiveDto = MoveOrderFromSupplyToActiveDto;
|
|
50
|
+
/** Used by SDK generators to identify action type */
|
|
51
|
+
MoveOrderFromSupplyToActiveDto.ACTION_TYPE = 'UPDATE';
|
|
52
|
+
MoveOrderFromSupplyToActiveDto.ACTION_KEY = 'MoveOrderFromSupplyToActive';
|
|
53
|
+
MoveOrderFromSupplyToActiveDto.MODULE_NAME = 'OrderModule';
|
|
54
|
+
MoveOrderFromSupplyToActiveDto.ENTITIES = ['Order'];
|
|
55
|
+
MoveOrderFromSupplyToActiveDto.EVENT_NAME = 'k1.t-t-hEOJjsDb.OrderModule.Order.Transition.MoveOrderFromSupplyToActive';
|
|
56
|
+
MoveOrderFromSupplyToActiveDto.SCHEMA_ACTION_ID = '03257b42-d641-4fc8-9e9d-91e8c660d4e8';
|
|
57
|
+
MoveOrderFromSupplyToActiveDto.PERMISSION = 'schema.action.moveorderfromsupplytoactive.trigger';
|
|
58
|
+
MoveOrderFromSupplyToActiveDto.TARGET_STAGES = ['OrderStageActive'];
|
|
59
|
+
MoveOrderFromSupplyToActiveDto.IS_STAGE_TRANSITION = true;
|
|
60
|
+
MoveOrderFromSupplyToActiveDto.IS_MULTI_STEP_FLOW = false;
|
|
61
|
+
MoveOrderFromSupplyToActiveDto.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
|
+
MoveOrderFromSupplyToActiveDto.stepDefinitions = [
|
|
67
|
+
{
|
|
68
|
+
stepKey: 'step_1',
|
|
69
|
+
dtoClass: 'unknown',
|
|
70
|
+
entity: 'unknown',
|
|
71
|
+
linksTo: null
|
|
72
|
+
}
|
|
73
|
+
];
|
|
74
|
+
/** Type-safe step key accessor */
|
|
75
|
+
MoveOrderFromSupplyToActiveDto.Steps = exports.MoveOrderFromSupplyToActiveSteps;
|
|
76
|
+
/** Step classes that can be used with this action */
|
|
77
|
+
MoveOrderFromSupplyToActiveDto.stepClasses = [];
|
|
@@ -21,8 +21,18 @@ export interface UpdateAccountCreditBalanceMessage extends OdinRecordUpdatedEven
|
|
|
21
21
|
/**
|
|
22
22
|
* Properties for UpdateAccountCreditBalance action
|
|
23
23
|
*
|
|
24
|
+
* @property Required fields: 1
|
|
25
|
+
* @property Optional fields: 0
|
|
24
26
|
*/
|
|
25
27
|
export interface UpdateAccountCreditBalanceProperties {
|
|
28
|
+
/**
|
|
29
|
+
* CreditBalance
|
|
30
|
+
*
|
|
31
|
+
* Credit Balance
|
|
32
|
+
* @type {CURRENCY}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
CreditBalance: string;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
38
|
* UpdateAccountCreditBalance
|
|
@@ -17,9 +17,11 @@ export declare class AccountCreditApi extends ApiProvider {
|
|
|
17
17
|
private readonly moduleName;
|
|
18
18
|
private readonly entityName;
|
|
19
19
|
private sourceRecord;
|
|
20
|
+
private _creditnote?;
|
|
20
21
|
private _contact?;
|
|
21
22
|
private _invoice?;
|
|
22
23
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
24
|
+
get creditnote(): ApiRecordLinkManager;
|
|
23
25
|
get contact(): ApiRecordLinkManager;
|
|
24
26
|
get invoice(): ApiRecordLinkManager;
|
|
25
27
|
setRecord(sourceRecord: any): void;
|
|
@@ -33,6 +33,12 @@ class AccountCreditApi extends api_provider_1.ApiProvider {
|
|
|
33
33
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
34
34
|
// ============================================
|
|
35
35
|
// Usage remains identical: api.address.list(recordId)
|
|
36
|
+
get creditnote() {
|
|
37
|
+
if (!this._creditnote) {
|
|
38
|
+
this._creditnote = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:AccountCredit', 'BillingModule:CreditNote', 'AccountCredit__CreditNote');
|
|
39
|
+
}
|
|
40
|
+
return this._creditnote;
|
|
41
|
+
}
|
|
36
42
|
get contact() {
|
|
37
43
|
if (!this._contact) {
|
|
38
44
|
this._contact = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:AccountCredit', 'CrmModule:Contact', 'Contact__AccountCredit');
|
|
@@ -17,11 +17,13 @@ export declare class CreditNoteApi extends ApiProvider {
|
|
|
17
17
|
private readonly moduleName;
|
|
18
18
|
private readonly entityName;
|
|
19
19
|
private sourceRecord;
|
|
20
|
+
private _accountcredit?;
|
|
20
21
|
private _transaction?;
|
|
21
22
|
private _note?;
|
|
22
23
|
private _invoice?;
|
|
23
24
|
private _file?;
|
|
24
25
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
26
|
+
get accountcredit(): ApiRecordLinkManager;
|
|
25
27
|
get transaction(): ApiRecordLinkManager;
|
|
26
28
|
get note(): ApiRecordLinkManager;
|
|
27
29
|
get invoice(): ApiRecordLinkManager;
|
|
@@ -33,6 +33,12 @@ class CreditNoteApi extends api_provider_1.ApiProvider {
|
|
|
33
33
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
34
34
|
// ============================================
|
|
35
35
|
// Usage remains identical: api.address.list(recordId)
|
|
36
|
+
get accountcredit() {
|
|
37
|
+
if (!this._accountcredit) {
|
|
38
|
+
this._accountcredit = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:CreditNote', 'BillingModule:AccountCredit', 'AccountCredit__CreditNote');
|
|
39
|
+
}
|
|
40
|
+
return this._accountcredit;
|
|
41
|
+
}
|
|
36
42
|
get transaction() {
|
|
37
43
|
if (!this._transaction) {
|
|
38
44
|
this._transaction = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:CreditNote', 'BillingModule:Transaction', 'CreditNote__Transaction');
|
|
@@ -21,9 +21,11 @@ export declare class AccountCreditDb extends DbProvider {
|
|
|
21
21
|
private readonly moduleName;
|
|
22
22
|
private readonly entityName;
|
|
23
23
|
private sourceRecord;
|
|
24
|
+
private _creditnote?;
|
|
24
25
|
private _contact?;
|
|
25
26
|
private _invoice?;
|
|
26
27
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
28
|
+
get creditnote(): DbRecordLinkManager;
|
|
27
29
|
get contact(): DbRecordLinkManager;
|
|
28
30
|
get invoice(): DbRecordLinkManager;
|
|
29
31
|
setRecord(sourceRecord: any): void;
|
|
@@ -38,6 +38,12 @@ class AccountCreditDb extends db_provider_1.DbProvider {
|
|
|
38
38
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
39
39
|
// ============================================
|
|
40
40
|
// Usage remains identical: db.address.list(recordId)
|
|
41
|
+
get creditnote() {
|
|
42
|
+
if (!this._creditnote) {
|
|
43
|
+
this._creditnote = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:AccountCredit', 'BillingModule:CreditNote', 'AccountCredit__CreditNote');
|
|
44
|
+
}
|
|
45
|
+
return this._creditnote;
|
|
46
|
+
}
|
|
41
47
|
get contact() {
|
|
42
48
|
if (!this._contact) {
|
|
43
49
|
this._contact = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:AccountCredit', 'CrmModule:Contact', 'Contact__AccountCredit');
|
|
@@ -21,11 +21,13 @@ export declare class CreditNoteDb extends DbProvider {
|
|
|
21
21
|
private readonly moduleName;
|
|
22
22
|
private readonly entityName;
|
|
23
23
|
private sourceRecord;
|
|
24
|
+
private _accountcredit?;
|
|
24
25
|
private _transaction?;
|
|
25
26
|
private _note?;
|
|
26
27
|
private _invoice?;
|
|
27
28
|
private _file?;
|
|
28
29
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
30
|
+
get accountcredit(): DbRecordLinkManager;
|
|
29
31
|
get transaction(): DbRecordLinkManager;
|
|
30
32
|
get note(): DbRecordLinkManager;
|
|
31
33
|
get invoice(): DbRecordLinkManager;
|
|
@@ -38,6 +38,12 @@ class CreditNoteDb extends db_provider_1.DbProvider {
|
|
|
38
38
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
39
39
|
// ============================================
|
|
40
40
|
// Usage remains identical: db.address.list(recordId)
|
|
41
|
+
get accountcredit() {
|
|
42
|
+
if (!this._accountcredit) {
|
|
43
|
+
this._accountcredit = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:CreditNote', 'BillingModule:AccountCredit', 'AccountCredit__CreditNote');
|
|
44
|
+
}
|
|
45
|
+
return this._accountcredit;
|
|
46
|
+
}
|
|
41
47
|
get transaction() {
|
|
42
48
|
if (!this._transaction) {
|
|
43
49
|
this._transaction = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:CreditNote', 'BillingModule:Transaction', 'CreditNote__Transaction');
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* Generated from Odin schema definition
|
|
12
12
|
*/
|
|
13
13
|
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
+
import { CreditNoteProperties } from './CreditNote';
|
|
14
15
|
import { ContactProperties } from './Contact';
|
|
15
16
|
import { InvoiceProperties } from './Invoice';
|
|
16
17
|
/**
|
|
@@ -188,6 +189,8 @@ export declare class AccountCredit extends OdinRecord<AccountCreditProperties> {
|
|
|
188
189
|
type: AccountCreditEntityTypes;
|
|
189
190
|
schemaId: '5871ead3-e07b-44b8-a480-0c1152211a2b';
|
|
190
191
|
properties: AccountCreditProperties;
|
|
192
|
+
/** Linked CreditNote records (AccountCredit__CreditNote) */
|
|
193
|
+
CreditNote: OdinLink<LinkedOdinRecord<CreditNoteProperties>>;
|
|
191
194
|
/** Linked Contact records (Contact__AccountCredit) */
|
|
192
195
|
Contact: OdinLink<LinkedOdinRecord<ContactProperties>>;
|
|
193
196
|
/** Linked Invoice records (AccountCredit__Invoice) */
|
|
@@ -209,6 +212,10 @@ export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = "BillingModule
|
|
|
209
212
|
export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = "BillingModule.AccountCredit.DEFAULT.SubDbRecordUpdated";
|
|
210
213
|
/** This is the default record type deleted */
|
|
211
214
|
export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = "BillingModule.AccountCredit.DEFAULT.SubDbRecordDeleted";
|
|
215
|
+
/** Event: AccountCredit__CreditNote link created */
|
|
216
|
+
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_CREATED = "BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationCreated";
|
|
217
|
+
/** Event: AccountCredit__CreditNote link deleted */
|
|
218
|
+
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_DELETED = "BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationDeleted";
|
|
212
219
|
/** Event: AccountCredit__Invoice link created */
|
|
213
220
|
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = "BillingModule.AccountCredit.Invoice.SubDbRecordAssociationCreated";
|
|
214
221
|
/** Event: AccountCredit__Invoice link deleted */
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Generated from Odin schema definition
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_CREATED = exports.AccountCredit = exports.AccountCreditPropertyKeys = exports.AccountCreditReason = exports.AccountCreditSource = exports.DefaultAccountCreditStageKeys = exports.DefaultAccountCreditStageNames = exports.AccountCreditEntityTypes = void 0;
|
|
15
|
+
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_CREATED = exports.AccountCredit = exports.AccountCreditPropertyKeys = exports.AccountCreditReason = exports.AccountCreditSource = exports.DefaultAccountCreditStageKeys = exports.DefaultAccountCreditStageNames = exports.AccountCreditEntityTypes = void 0;
|
|
16
16
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
17
|
/**
|
|
18
18
|
* Available types for AccountCredit records
|
|
@@ -172,6 +172,10 @@ exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = 'BillingModule.AccountCredi
|
|
|
172
172
|
exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = 'BillingModule.AccountCredit.DEFAULT.SubDbRecordUpdated';
|
|
173
173
|
/** This is the default record type deleted */
|
|
174
174
|
exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = 'BillingModule.AccountCredit.DEFAULT.SubDbRecordDeleted';
|
|
175
|
+
/** Event: AccountCredit__CreditNote link created */
|
|
176
|
+
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_CREATED = 'BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationCreated';
|
|
177
|
+
/** Event: AccountCredit__CreditNote link deleted */
|
|
178
|
+
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_CREDIT_NOTE_DELETED = 'BillingModule.AccountCredit.CreditNote.SubDbRecordAssociationDeleted';
|
|
175
179
|
/** Event: AccountCredit__Invoice link created */
|
|
176
180
|
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = 'BillingModule.AccountCredit.Invoice.SubDbRecordAssociationCreated';
|
|
177
181
|
/** Event: AccountCredit__Invoice link deleted */
|
|
@@ -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
|
-
/**
|
|
27
|
-
|
|
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
|
-
/**
|
|
31
|
-
|
|
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
|
-
/**
|
|
39
|
+
/** the name of the app this config relates to (Platform - Config)
|
|
40
40
|
*
|
|
41
41
|
* @type {TEXT}
|
|
42
42
|
*/
|
|
43
|
-
|
|
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
|
-
/**
|
|
49
|
+
/** Data field for Config records. Used by Platform team.
|
|
50
50
|
*
|
|
51
51
|
* @type {TEXT}
|
|
52
52
|
*/
|
|
53
|
-
|
|
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
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* Generated from Odin schema definition
|
|
12
12
|
*/
|
|
13
13
|
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
+
import { AccountCreditProperties } from './AccountCredit';
|
|
14
15
|
import { TransactionProperties } from './Transaction';
|
|
15
16
|
import { NoteProperties } from './Note';
|
|
16
17
|
import { InvoiceProperties } from './Invoice';
|
|
@@ -142,6 +143,8 @@ export declare class CreditNote extends OdinRecord<CreditNoteProperties> {
|
|
|
142
143
|
type: CreditNoteEntityTypes;
|
|
143
144
|
schemaId: 'ee80aeca-5653-494a-80bf-1994b6df1cd0';
|
|
144
145
|
properties: CreditNoteProperties;
|
|
146
|
+
/** Linked AccountCredit records (AccountCredit__CreditNote) */
|
|
147
|
+
AccountCredit: OdinLink<LinkedOdinRecord<AccountCreditProperties>>;
|
|
145
148
|
/** Linked Transaction records (CreditNote__Transaction) */
|
|
146
149
|
Transaction: OdinLink<LinkedOdinRecord<TransactionProperties>>;
|
|
147
150
|
/** Linked Note records (CreditNote__Note) */
|
|
@@ -25,6 +25,7 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { AccountCreditProperties } from '../entities-v2/AccountCredit';
|
|
26
26
|
import { CreateAccountCreditProperties } from '../actions-v2/CreateAccountCreditDto';
|
|
27
27
|
import { UpdateAccountCreditBalanceProperties } from '../actions-v2/UpdateAccountCreditBalanceDto';
|
|
28
|
+
import { CreditNoteRecord } from './CreditNoteRecord';
|
|
28
29
|
import { ContactRecord } from './ContactRecord';
|
|
29
30
|
import { InvoiceRecord } from './InvoiceRecord';
|
|
30
31
|
/** Valid entity types for AccountCredit */
|
|
@@ -92,6 +93,7 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
92
93
|
private _provider;
|
|
93
94
|
private _pendingLinks;
|
|
94
95
|
private _preGeneratedId;
|
|
96
|
+
private _creditNotes?;
|
|
95
97
|
private _contacts?;
|
|
96
98
|
private _invoices?;
|
|
97
99
|
/**
|
|
@@ -135,6 +137,24 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
135
137
|
* @remarks This is the default record type
|
|
136
138
|
*/
|
|
137
139
|
isDefault(): this is AccountCreditRecord<AccountCreditProperties>;
|
|
140
|
+
/** Valid labels for CreditNote associations */
|
|
141
|
+
static readonly creditNotesLabels: readonly ["AccountCredit__CreditNote"];
|
|
142
|
+
/**
|
|
143
|
+
* Access linked CreditNote records
|
|
144
|
+
* @remarks Available labels: AccountCredit__CreditNote
|
|
145
|
+
* @throws Error if called on a new (unsaved) record
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* // Get all linked CreditNote records
|
|
150
|
+
* const items = await record.creditNotes.list();
|
|
151
|
+
* const first = await record.creditNotes.first();
|
|
152
|
+
*
|
|
153
|
+
* // Filter by label
|
|
154
|
+
* const specific = await record.creditNotes.first({ label: 'AccountCredit__CreditNote' });
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
get creditNotes(): RecordLinkManager<CreditNoteRecord, typeof AccountCreditRecord['creditNotesLabels'][number]>;
|
|
138
158
|
/** Valid labels for Contact associations */
|
|
139
159
|
static readonly contactsLabels: readonly ["Contact__AccountCredit"];
|
|
140
160
|
/**
|
|
@@ -223,11 +243,13 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
223
243
|
/**
|
|
224
244
|
* UpdateAccountCreditBalance
|
|
225
245
|
*
|
|
226
|
-
* Updates this AccountCredit record.
|
|
246
|
+
* Updates this AccountCredit record with the specified properties.
|
|
227
247
|
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
228
248
|
*
|
|
229
|
-
* @param
|
|
230
|
-
* @param options - Optional settings
|
|
249
|
+
* @param properties - Required properties for this action
|
|
250
|
+
* @param options - Optional settings
|
|
251
|
+
* @param options.journeyId - Associate with a journey
|
|
252
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
231
253
|
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
232
254
|
* @throws Error if called on a new (unsaved) record
|
|
233
255
|
*
|
|
@@ -240,10 +262,7 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
240
262
|
* const payload = record.updateAccountCreditBalance({ ... }).dryRun();
|
|
241
263
|
* ```
|
|
242
264
|
*/
|
|
243
|
-
updateAccountCreditBalance(
|
|
244
|
-
journeyId?: string;
|
|
245
|
-
stageKey?: string;
|
|
246
|
-
}, options?: {
|
|
265
|
+
updateAccountCreditBalance(properties: UpdateAccountCreditBalanceProperties, options?: {
|
|
247
266
|
journeyId?: string;
|
|
248
267
|
stageKey?: string;
|
|
249
268
|
}): ActionBuilder;
|
|
@@ -32,6 +32,7 @@ exports.isAccountCreditRecord = exports.AccountCreditRecord = 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");
|
|
35
|
+
const CreditNoteRecord_1 = require("./CreditNoteRecord");
|
|
35
36
|
const ContactRecord_1 = require("./ContactRecord");
|
|
36
37
|
const InvoiceRecord_1 = require("./InvoiceRecord");
|
|
37
38
|
/**
|
|
@@ -163,6 +164,36 @@ class AccountCreditRecord {
|
|
|
163
164
|
* @remarks This is the default record type
|
|
164
165
|
*/
|
|
165
166
|
isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
|
|
167
|
+
/**
|
|
168
|
+
* Access linked CreditNote records
|
|
169
|
+
* @remarks Available labels: AccountCredit__CreditNote
|
|
170
|
+
* @throws Error if called on a new (unsaved) record
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```typescript
|
|
174
|
+
* // Get all linked CreditNote records
|
|
175
|
+
* const items = await record.creditNotes.list();
|
|
176
|
+
* const first = await record.creditNotes.first();
|
|
177
|
+
*
|
|
178
|
+
* // Filter by label
|
|
179
|
+
* const specific = await record.creditNotes.first({ label: 'AccountCredit__CreditNote' });
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
get creditNotes() {
|
|
183
|
+
var _a;
|
|
184
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
185
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
186
|
+
if (!this._creditNotes) {
|
|
187
|
+
this._creditNotes = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
188
|
+
sourceEntity: 'BillingModule:AccountCredit',
|
|
189
|
+
targetEntity: 'BillingModule:CreditNote',
|
|
190
|
+
targetModuleName: 'BillingModule',
|
|
191
|
+
targetEntityName: 'CreditNote',
|
|
192
|
+
labels: ['AccountCredit__CreditNote'],
|
|
193
|
+
}, CreditNoteRecord_1.CreditNoteRecord);
|
|
194
|
+
}
|
|
195
|
+
return this._creditNotes;
|
|
196
|
+
}
|
|
166
197
|
/**
|
|
167
198
|
* Access linked Contact records
|
|
168
199
|
* @remarks Available labels: Contact__AccountCredit
|
|
@@ -303,11 +334,13 @@ class AccountCreditRecord {
|
|
|
303
334
|
/**
|
|
304
335
|
* UpdateAccountCreditBalance
|
|
305
336
|
*
|
|
306
|
-
* Updates this AccountCredit record.
|
|
337
|
+
* Updates this AccountCredit record with the specified properties.
|
|
307
338
|
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
308
339
|
*
|
|
309
|
-
* @param
|
|
310
|
-
* @param options - Optional settings
|
|
340
|
+
* @param properties - Required properties for this action
|
|
341
|
+
* @param options - Optional settings
|
|
342
|
+
* @param options.journeyId - Associate with a journey
|
|
343
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
311
344
|
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
312
345
|
* @throws Error if called on a new (unsaved) record
|
|
313
346
|
*
|
|
@@ -320,21 +353,11 @@ class AccountCreditRecord {
|
|
|
320
353
|
* const payload = record.updateAccountCreditBalance({ ... }).dryRun();
|
|
321
354
|
* ```
|
|
322
355
|
*/
|
|
323
|
-
updateAccountCreditBalance(
|
|
356
|
+
updateAccountCreditBalance(properties, options) {
|
|
324
357
|
var _a;
|
|
325
358
|
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
326
359
|
throw new Error('updateAccountCreditBalance requires an existing record. Use accessor.get() first.');
|
|
327
|
-
|
|
328
|
-
let opts = options;
|
|
329
|
-
if (propertiesOrOptions) {
|
|
330
|
-
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
331
|
-
opts = propertiesOrOptions;
|
|
332
|
-
}
|
|
333
|
-
else {
|
|
334
|
-
properties = propertiesOrOptions;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAccountCreditBalance', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
360
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAccountCreditBalance', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
338
361
|
return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
|
|
339
362
|
}
|
|
340
363
|
}
|
|
@@ -342,6 +365,8 @@ exports.AccountCreditRecord = AccountCreditRecord;
|
|
|
342
365
|
// ============================================
|
|
343
366
|
// TYPED LINK ACCESSORS
|
|
344
367
|
// ============================================
|
|
368
|
+
/** Valid labels for CreditNote associations */
|
|
369
|
+
AccountCreditRecord.creditNotesLabels = ['AccountCredit__CreditNote'];
|
|
345
370
|
/** Valid labels for Contact associations */
|
|
346
371
|
AccountCreditRecord.contactsLabels = ['Contact__AccountCredit'];
|
|
347
372
|
/** Valid labels for Invoice associations */
|
|
@@ -23,6 +23,7 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
23
23
|
import { CreditNoteProperties } from '../entities-v2/CreditNote';
|
|
24
24
|
import { CreditNoteCreateProperties } from '../actions-v2/CreditNoteCreateDto';
|
|
25
25
|
import { CreditNoteUpdateProperties } from '../actions-v2/CreditNoteUpdateDto';
|
|
26
|
+
import { AccountCreditRecord } from './AccountCreditRecord';
|
|
26
27
|
import { TransactionRecord } from './TransactionRecord';
|
|
27
28
|
import { NoteRecord } from './NoteRecord';
|
|
28
29
|
import { InvoiceRecord } from './InvoiceRecord';
|
|
@@ -90,6 +91,7 @@ export declare class CreditNoteRecord<TProps = CreditNoteProperties> {
|
|
|
90
91
|
private _provider;
|
|
91
92
|
private _pendingLinks;
|
|
92
93
|
private _preGeneratedId;
|
|
94
|
+
private _accountCredits?;
|
|
93
95
|
private _transactions?;
|
|
94
96
|
private _notes?;
|
|
95
97
|
private _invoices?;
|
|
@@ -119,6 +121,24 @@ export declare class CreditNoteRecord<TProps = CreditNoteProperties> {
|
|
|
119
121
|
get groups(): string[];
|
|
120
122
|
/** Access the underlying OdinRecord (null for new records) */
|
|
121
123
|
get record(): OdinRecord<TProps> | null;
|
|
124
|
+
/** Valid labels for AccountCredit associations */
|
|
125
|
+
static readonly accountCreditsLabels: readonly ["AccountCredit__CreditNote"];
|
|
126
|
+
/**
|
|
127
|
+
* Access linked AccountCredit records
|
|
128
|
+
* @remarks Available labels: AccountCredit__CreditNote
|
|
129
|
+
* @throws Error if called on a new (unsaved) record
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* // Get all linked AccountCredit records
|
|
134
|
+
* const items = await record.accountCredits.list();
|
|
135
|
+
* const first = await record.accountCredits.first();
|
|
136
|
+
*
|
|
137
|
+
* // Filter by label
|
|
138
|
+
* const specific = await record.accountCredits.first({ label: 'AccountCredit__CreditNote' });
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
get accountCredits(): RecordLinkManager<AccountCreditRecord, typeof CreditNoteRecord['accountCreditsLabels'][number]>;
|
|
122
142
|
/** Valid labels for Transaction associations */
|
|
123
143
|
static readonly transactionsLabels: readonly ["CreditNote__Transaction"];
|
|
124
144
|
/**
|
|
@@ -30,6 +30,7 @@ exports.isCreditNoteRecord = exports.CreditNoteRecord = void 0;
|
|
|
30
30
|
const uuid_1 = require("uuid");
|
|
31
31
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
32
32
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
33
|
+
const AccountCreditRecord_1 = require("./AccountCreditRecord");
|
|
33
34
|
const TransactionRecord_1 = require("./TransactionRecord");
|
|
34
35
|
const NoteRecord_1 = require("./NoteRecord");
|
|
35
36
|
const InvoiceRecord_1 = require("./InvoiceRecord");
|
|
@@ -144,6 +145,36 @@ class CreditNoteRecord {
|
|
|
144
145
|
get groups() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.groups) || []; }
|
|
145
146
|
/** Access the underlying OdinRecord (null for new records) */
|
|
146
147
|
get record() { return this._record; }
|
|
148
|
+
/**
|
|
149
|
+
* Access linked AccountCredit records
|
|
150
|
+
* @remarks Available labels: AccountCredit__CreditNote
|
|
151
|
+
* @throws Error if called on a new (unsaved) record
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```typescript
|
|
155
|
+
* // Get all linked AccountCredit records
|
|
156
|
+
* const items = await record.accountCredits.list();
|
|
157
|
+
* const first = await record.accountCredits.first();
|
|
158
|
+
*
|
|
159
|
+
* // Filter by label
|
|
160
|
+
* const specific = await record.accountCredits.first({ label: 'AccountCredit__CreditNote' });
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
get accountCredits() {
|
|
164
|
+
var _a;
|
|
165
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
166
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
167
|
+
if (!this._accountCredits) {
|
|
168
|
+
this._accountCredits = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
169
|
+
sourceEntity: 'BillingModule:CreditNote',
|
|
170
|
+
targetEntity: 'BillingModule:AccountCredit',
|
|
171
|
+
targetModuleName: 'BillingModule',
|
|
172
|
+
targetEntityName: 'AccountCredit',
|
|
173
|
+
labels: ['AccountCredit__CreditNote'],
|
|
174
|
+
}, AccountCreditRecord_1.AccountCreditRecord);
|
|
175
|
+
}
|
|
176
|
+
return this._accountCredits;
|
|
177
|
+
}
|
|
147
178
|
/**
|
|
148
179
|
* Access linked Transaction records
|
|
149
180
|
* @remarks Available labels: CreditNote__Transaction
|
|
@@ -375,6 +406,8 @@ exports.CreditNoteRecord = CreditNoteRecord;
|
|
|
375
406
|
// ============================================
|
|
376
407
|
// TYPED LINK ACCESSORS
|
|
377
408
|
// ============================================
|
|
409
|
+
/** Valid labels for AccountCredit associations */
|
|
410
|
+
CreditNoteRecord.accountCreditsLabels = ['AccountCredit__CreditNote'];
|
|
378
411
|
/** Valid labels for Transaction associations */
|
|
379
412
|
CreditNoteRecord.transactionsLabels = ['CreditNote__Transaction'];
|
|
380
413
|
/** Valid labels for Note associations */
|
|
@@ -1859,6 +1859,31 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
1859
1859
|
moveOrderFromPreOrderToCancelled(options?: {
|
|
1860
1860
|
journeyId?: string;
|
|
1861
1861
|
}): ActionBuilder;
|
|
1862
|
+
/**
|
|
1863
|
+
* MoveOrderFromSupplyToActive
|
|
1864
|
+
*
|
|
1865
|
+
* Transitions this Order record to a new pipeline stage.
|
|
1866
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
1867
|
+
*
|
|
1868
|
+
* @remarks Transitions to stage: OrderStageActive
|
|
1869
|
+
*
|
|
1870
|
+
* @param options - Optional settings
|
|
1871
|
+
* @param options.journeyId - Associate with a journey
|
|
1872
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
1873
|
+
* @throws Error if called on a new (unsaved) record
|
|
1874
|
+
*
|
|
1875
|
+
* @example
|
|
1876
|
+
* ```typescript
|
|
1877
|
+
* const record = await odinClient.orders.get(id);
|
|
1878
|
+
* await record.moveOrderFromSupplyToActive().execute();
|
|
1879
|
+
*
|
|
1880
|
+
* // Dry run (for debugging)
|
|
1881
|
+
* const payload = record.moveOrderFromSupplyToActive().dryRun();
|
|
1882
|
+
* ```
|
|
1883
|
+
*/
|
|
1884
|
+
moveOrderFromSupplyToActive(options?: {
|
|
1885
|
+
journeyId?: string;
|
|
1886
|
+
}): ActionBuilder;
|
|
1862
1887
|
/**
|
|
1863
1888
|
* MoveOrderToActive
|
|
1864
1889
|
*
|
|
@@ -2719,6 +2719,35 @@ class OrderRecord {
|
|
|
2719
2719
|
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);
|
|
2720
2720
|
return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
|
|
2721
2721
|
}
|
|
2722
|
+
/**
|
|
2723
|
+
* MoveOrderFromSupplyToActive
|
|
2724
|
+
*
|
|
2725
|
+
* Transitions this Order record to a new pipeline stage.
|
|
2726
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
2727
|
+
*
|
|
2728
|
+
* @remarks Transitions to stage: OrderStageActive
|
|
2729
|
+
*
|
|
2730
|
+
* @param options - Optional settings
|
|
2731
|
+
* @param options.journeyId - Associate with a journey
|
|
2732
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
2733
|
+
* @throws Error if called on a new (unsaved) record
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
* ```typescript
|
|
2737
|
+
* const record = await odinClient.orders.get(id);
|
|
2738
|
+
* await record.moveOrderFromSupplyToActive().execute();
|
|
2739
|
+
*
|
|
2740
|
+
* // Dry run (for debugging)
|
|
2741
|
+
* const payload = record.moveOrderFromSupplyToActive().dryRun();
|
|
2742
|
+
* ```
|
|
2743
|
+
*/
|
|
2744
|
+
moveOrderFromSupplyToActive(options) {
|
|
2745
|
+
var _a;
|
|
2746
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
2747
|
+
throw new Error('moveOrderFromSupplyToActive requires an existing record. Use accessor.get() first.');
|
|
2748
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveOrderFromSupplyToActive', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'OrderStageActive' }, options);
|
|
2749
|
+
return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
|
|
2750
|
+
}
|
|
2722
2751
|
/**
|
|
2723
2752
|
* MoveOrderToActive
|
|
2724
2753
|
*
|
|
@@ -456,7 +456,7 @@ export declare class ServiceAppointmentConfigRecord<TProps = ServiceAppointmentC
|
|
|
456
456
|
stageKey?: string;
|
|
457
457
|
}): ActionBuilder;
|
|
458
458
|
/**
|
|
459
|
-
*
|
|
459
|
+
* CreateINSTALL
|
|
460
460
|
*
|
|
461
461
|
* Creates a new ServiceAppointmentConfig record with the specified properties.
|
|
462
462
|
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
@@ -566,7 +566,7 @@ class ServiceAppointmentConfigRecord {
|
|
|
566
566
|
return new ActionBuilder(this._provider, 'FieldServiceModule', 'ServiceAppointmentConfig', payload, () => { this._pendingLinks = []; });
|
|
567
567
|
}
|
|
568
568
|
/**
|
|
569
|
-
*
|
|
569
|
+
* CreateINSTALL
|
|
570
570
|
*
|
|
571
571
|
* Creates a new ServiceAppointmentConfig record with the specified properties.
|
|
572
572
|
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
@@ -593,7 +593,7 @@ class ServiceAppointmentConfigRecord {
|
|
|
593
593
|
const payload = {
|
|
594
594
|
entity: 'FieldServiceModule:ServiceAppointmentConfig',
|
|
595
595
|
type: 'INSTALL',
|
|
596
|
-
actionName: '
|
|
596
|
+
actionName: 'CreateINSTALL',
|
|
597
597
|
properties: properties || {},
|
|
598
598
|
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
599
599
|
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|