@d19n/youfibre-odin-sdk 2.0.121 → 2.0.122
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 +3 -1
- package/dist/actions-v2/UpdateCallAnalyticsDto.d.ts +129 -0
- package/dist/actions-v2/UpdateCallAnalyticsDto.js +56 -0
- package/dist/actions-v2/UpdateOfferTemplateDto.d.ts +149 -0
- package/dist/actions-v2/UpdateOfferTemplateDto.js +59 -0
- package/dist/api-sdk-v2/OfferApi.d.ts +2 -0
- package/dist/api-sdk-v2/OfferApi.js +6 -0
- package/dist/api-sdk-v2/PriceBookApi.d.ts +2 -0
- package/dist/api-sdk-v2/PriceBookApi.js +6 -0
- package/dist/db-sdk-v2/OfferDb.d.ts +2 -0
- package/dist/db-sdk-v2/OfferDb.js +6 -0
- package/dist/db-sdk-v2/PriceBookDb.d.ts +2 -0
- package/dist/db-sdk-v2/PriceBookDb.js +6 -0
- package/dist/entities-v2/Offer.d.ts +3 -0
- package/dist/entities-v2/PriceBook.d.ts +7 -0
- package/dist/entities-v2/PriceBook.js +5 -1
- package/dist/records-v2/CallRecord.d.ts +27 -0
- package/dist/records-v2/CallRecord.js +29 -0
- package/dist/records-v2/OfferRecord.d.ts +20 -0
- package/dist/records-v2/OfferRecord.js +33 -0
- package/dist/records-v2/OfferTemplateRecord.d.ts +27 -0
- package/dist/records-v2/OfferTemplateRecord.js +32 -0
- package/dist/records-v2/PriceBookRecord.d.ts +20 -0
- package/dist/records-v2/PriceBookRecord.js +33 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -353,7 +353,7 @@ This SDK includes **165** entities across **12** modules.
|
|
|
353
353
|
|
|
354
354
|
## Actions
|
|
355
355
|
|
|
356
|
-
This SDK includes **
|
|
356
|
+
This SDK includes **650** actions.
|
|
357
357
|
|
|
358
358
|
### Action Types
|
|
359
359
|
|
|
@@ -1204,6 +1204,7 @@ This SDK includes **648** actions.
|
|
|
1204
1204
|
| `CreateCall` | CREATE | k1.t-hEOJjsDb.NotificationModule.Call.Create.CreateCall |
|
|
1205
1205
|
| `CreateInboundCall` | CREATE | k1.t-hEOJjsDb.NotificationModule.Call.Create.CreateInboundCall |
|
|
1206
1206
|
| `CreateOutboundCall` | CREATE | k1.t-hEOJjsDb.NotificationModule.Call.Create.CreateOutboundCall |
|
|
1207
|
+
| `UpdateCallAnalytics` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics |
|
|
1207
1208
|
| `UpdateCallOnInboundCallAnswered` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnInboundCallAnswered |
|
|
1208
1209
|
| `UpdateCallOnInboundCallCanceled` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnInboundCallCanceled |
|
|
1209
1210
|
| `UpdateCallOnInboundCallCompleted` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnInboundCallCompleted |
|
|
@@ -1410,6 +1411,7 @@ This SDK includes **648** actions.
|
|
|
1410
1411
|
| Action | Type | Event |
|
|
1411
1412
|
|--------|------|-------|
|
|
1412
1413
|
| `CreateOfferTemplate` | CREATE | k1.t-hEOJjsDb.ProductModule.OfferTemplate.Create.CreateOfferTemplate |
|
|
1414
|
+
| `UpdateOfferTemplate` | UPDATE | k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate |
|
|
1413
1415
|
|
|
1414
1416
|
#### OneTouchSwitch
|
|
1415
1417
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateCallAnalytics Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Update call analytics
|
|
5
|
+
*
|
|
6
|
+
* @module NotificationModule
|
|
7
|
+
* @entity Call
|
|
8
|
+
* @actionKey UpdateCallAnalytics
|
|
9
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for UpdateCallAnalytics updated events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics
|
|
18
|
+
*/
|
|
19
|
+
export interface UpdateCallAnalyticsMessage extends OdinRecordUpdatedEvent<UpdateCallAnalyticsDto, UpdateCallAnalyticsProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for UpdateCallAnalytics action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 8
|
|
25
|
+
* @property Optional fields: 0
|
|
26
|
+
*/
|
|
27
|
+
export interface UpdateCallAnalyticsProperties {
|
|
28
|
+
/**
|
|
29
|
+
* TimeInQueued
|
|
30
|
+
*
|
|
31
|
+
* TimeInQueued (Communications - Call)
|
|
32
|
+
* @type {TEXT}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
TimeInQueued: string;
|
|
36
|
+
/**
|
|
37
|
+
* TimeInRinging
|
|
38
|
+
*
|
|
39
|
+
* TimeInRinging (Communications - Call)
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
* @required
|
|
42
|
+
*/
|
|
43
|
+
TimeInRinging: string;
|
|
44
|
+
/**
|
|
45
|
+
* TimeInProgress
|
|
46
|
+
*
|
|
47
|
+
* TimeInProgress (Communications - Call)
|
|
48
|
+
* @type {TEXT}
|
|
49
|
+
* @required
|
|
50
|
+
*/
|
|
51
|
+
TimeInProgress: string;
|
|
52
|
+
/**
|
|
53
|
+
* TimeInInitiated
|
|
54
|
+
*
|
|
55
|
+
* TimeInInitiated (Communications - Call)
|
|
56
|
+
* @type {TEXT}
|
|
57
|
+
* @required
|
|
58
|
+
*/
|
|
59
|
+
TimeInInitiated: string;
|
|
60
|
+
/**
|
|
61
|
+
* CustomerHoldTotalSec
|
|
62
|
+
*
|
|
63
|
+
* CustomerHoldTotalSec
|
|
64
|
+
* @type {TEXT}
|
|
65
|
+
* @required
|
|
66
|
+
*/
|
|
67
|
+
CustomerHoldTotalSec: string;
|
|
68
|
+
/**
|
|
69
|
+
* AgentHoldTotalSec
|
|
70
|
+
*
|
|
71
|
+
* AgentHoldTotalSec
|
|
72
|
+
* @type {TEXT}
|
|
73
|
+
* @required
|
|
74
|
+
*/
|
|
75
|
+
AgentHoldTotalSec: string;
|
|
76
|
+
/**
|
|
77
|
+
* MuteTotalSec
|
|
78
|
+
*
|
|
79
|
+
* MuteTotalSec
|
|
80
|
+
* @type {TEXT}
|
|
81
|
+
* @required
|
|
82
|
+
*/
|
|
83
|
+
MuteTotalSec: string;
|
|
84
|
+
/**
|
|
85
|
+
* RingingTimeTotalSec
|
|
86
|
+
*
|
|
87
|
+
* RingingTimeTotalSec
|
|
88
|
+
* @type {TEXT}
|
|
89
|
+
* @required
|
|
90
|
+
*/
|
|
91
|
+
RingingTimeTotalSec: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* UpdateCallAnalytics
|
|
95
|
+
*
|
|
96
|
+
* Update call analytics
|
|
97
|
+
*
|
|
98
|
+
* @actionType UPDATE - Updates an existing Call record
|
|
99
|
+
* @module NotificationModule
|
|
100
|
+
* @entity Call
|
|
101
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics
|
|
102
|
+
* @permission schema.action.updatecallanalytics.trigger
|
|
103
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
104
|
+
*/
|
|
105
|
+
export declare class UpdateCallAnalyticsDto extends OdinRecordUpdateDto<UpdateCallAnalyticsProperties> {
|
|
106
|
+
/** Used by SDK generators to identify action type */
|
|
107
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
108
|
+
static readonly ACTION_KEY = "UpdateCallAnalytics";
|
|
109
|
+
static readonly MODULE_NAME = "NotificationModule";
|
|
110
|
+
static readonly ENTITIES: string[];
|
|
111
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics";
|
|
112
|
+
static readonly PERMISSION = "schema.action.updatecallanalytics.trigger";
|
|
113
|
+
/** Step metadata - entity this action targets */
|
|
114
|
+
static readonly STEP_ENTITY = "NotificationModule:Call";
|
|
115
|
+
static readonly STEP_SCHEMA_ID = "e157f15c-6846-4bfb-bc92-aed4c4084e9f";
|
|
116
|
+
static readonly STEP_SCHEMA_ACTION_ID = "06992e25-833f-4b79-aae7-9d5026d2cd9e";
|
|
117
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
118
|
+
readonly actionName: string;
|
|
119
|
+
readonly schemaActionId: string;
|
|
120
|
+
readonly entity: string;
|
|
121
|
+
constructor(record: OdinRecord<any> | {
|
|
122
|
+
id: string;
|
|
123
|
+
entity: string;
|
|
124
|
+
type?: string;
|
|
125
|
+
}, properties: UpdateCallAnalyticsProperties, options?: {
|
|
126
|
+
journeyId?: string;
|
|
127
|
+
stageKey?: string;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateCallAnalytics Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Update call analytics
|
|
6
|
+
*
|
|
7
|
+
* @module NotificationModule
|
|
8
|
+
* @entity Call
|
|
9
|
+
* @actionKey UpdateCallAnalytics
|
|
10
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UpdateCallAnalyticsDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* UpdateCallAnalytics
|
|
19
|
+
*
|
|
20
|
+
* Update call analytics
|
|
21
|
+
*
|
|
22
|
+
* @actionType UPDATE - Updates an existing Call record
|
|
23
|
+
* @module NotificationModule
|
|
24
|
+
* @entity Call
|
|
25
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics
|
|
26
|
+
* @permission schema.action.updatecallanalytics.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class UpdateCallAnalyticsDto extends core_1.OdinRecordUpdateDto {
|
|
30
|
+
constructor(record, properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
id: record.id,
|
|
33
|
+
entity: record.entity,
|
|
34
|
+
type: record.type,
|
|
35
|
+
properties,
|
|
36
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
37
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'UpdateCallAnalytics';
|
|
40
|
+
this.schemaActionId = '06992e25-833f-4b79-aae7-9d5026d2cd9e';
|
|
41
|
+
this.entity = 'NotificationModule:Call';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateCallAnalyticsDto = UpdateCallAnalyticsDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
UpdateCallAnalyticsDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
+
UpdateCallAnalyticsDto.ACTION_KEY = 'UpdateCallAnalytics';
|
|
48
|
+
UpdateCallAnalyticsDto.MODULE_NAME = 'NotificationModule';
|
|
49
|
+
UpdateCallAnalyticsDto.ENTITIES = ['Call'];
|
|
50
|
+
UpdateCallAnalyticsDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallAnalytics';
|
|
51
|
+
UpdateCallAnalyticsDto.PERMISSION = 'schema.action.updatecallanalytics.trigger';
|
|
52
|
+
/** Step metadata - entity this action targets */
|
|
53
|
+
UpdateCallAnalyticsDto.STEP_ENTITY = 'NotificationModule:Call';
|
|
54
|
+
UpdateCallAnalyticsDto.STEP_SCHEMA_ID = 'e157f15c-6846-4bfb-bc92-aed4c4084e9f';
|
|
55
|
+
UpdateCallAnalyticsDto.STEP_SCHEMA_ACTION_ID = '06992e25-833f-4b79-aae7-9d5026d2cd9e';
|
|
56
|
+
UpdateCallAnalyticsDto.AUTO_LINK_PARENT = false;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateOfferTemplate Action DTO
|
|
3
|
+
*
|
|
4
|
+
* UpdateOfferTemplate
|
|
5
|
+
*
|
|
6
|
+
* @module ProductModule
|
|
7
|
+
* @entity OfferTemplate
|
|
8
|
+
* @entityType DEFAULT
|
|
9
|
+
* @actionKey UpdateOfferTemplate
|
|
10
|
+
* @event k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
/**
|
|
16
|
+
* RabbitMQ message payload for UpdateOfferTemplate updated events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate
|
|
19
|
+
*/
|
|
20
|
+
export interface UpdateOfferTemplateMessage extends OdinRecordUpdatedEvent<UpdateOfferTemplateDto, UpdateOfferTemplateProperties> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for UpdateOfferTemplate action
|
|
24
|
+
*
|
|
25
|
+
* @property Required fields: 4
|
|
26
|
+
* @property Optional fields: 7
|
|
27
|
+
*/
|
|
28
|
+
export interface UpdateOfferTemplateProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Name
|
|
31
|
+
*
|
|
32
|
+
* Display name/title for Offer records. Primary identifier for Product Management team.
|
|
33
|
+
* @type {TEXT}
|
|
34
|
+
* @required
|
|
35
|
+
*/
|
|
36
|
+
Name: string;
|
|
37
|
+
/**
|
|
38
|
+
* CustomerType
|
|
39
|
+
*
|
|
40
|
+
* customer type the product is available to (Product Management - Offer)
|
|
41
|
+
* @type {ENUM}
|
|
42
|
+
* @required
|
|
43
|
+
*/
|
|
44
|
+
CustomerType: string;
|
|
45
|
+
/**
|
|
46
|
+
* Channel
|
|
47
|
+
*
|
|
48
|
+
* channel for the offer (Product Management - Offer)
|
|
49
|
+
* @type {ENUM}
|
|
50
|
+
* @required
|
|
51
|
+
*/
|
|
52
|
+
Channel: string;
|
|
53
|
+
/**
|
|
54
|
+
* Code
|
|
55
|
+
*
|
|
56
|
+
* code to retrieve offer (Product Management - Offer)
|
|
57
|
+
* @type {TEXT}
|
|
58
|
+
* @required
|
|
59
|
+
*/
|
|
60
|
+
Code: string;
|
|
61
|
+
/**
|
|
62
|
+
* ContractType
|
|
63
|
+
*
|
|
64
|
+
* contract type based on monthly / in contract products (Product Management - Offer)
|
|
65
|
+
* @type {ENUM}
|
|
66
|
+
*/
|
|
67
|
+
ContractType?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* PriceMatch
|
|
70
|
+
*
|
|
71
|
+
* Price Match (Product Management - Offer)
|
|
72
|
+
* @type {BOOLEAN}
|
|
73
|
+
*/
|
|
74
|
+
PriceMatch?: boolean | null;
|
|
75
|
+
/**
|
|
76
|
+
* ContractBuyout
|
|
77
|
+
*
|
|
78
|
+
* Contract buyout option for an Order (Product Management - Offer)
|
|
79
|
+
* @type {BOOLEAN}
|
|
80
|
+
*/
|
|
81
|
+
ContractBuyout?: boolean | null;
|
|
82
|
+
/**
|
|
83
|
+
* ExPolygonId
|
|
84
|
+
*
|
|
85
|
+
* the id of the ex polygon, use 000 for global region configurations (Product Management - Offer)
|
|
86
|
+
* @type {TEXT}
|
|
87
|
+
*/
|
|
88
|
+
ExPolygonId?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* Description
|
|
91
|
+
*
|
|
92
|
+
* description of the offer (Product Management - Offer)
|
|
93
|
+
* @type {TEXT}
|
|
94
|
+
*/
|
|
95
|
+
Description?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* IsDefault
|
|
98
|
+
*
|
|
99
|
+
* is the default offer (Product Management - Offer)
|
|
100
|
+
* @type {BOOLEAN}
|
|
101
|
+
*/
|
|
102
|
+
IsDefault?: boolean | null;
|
|
103
|
+
/**
|
|
104
|
+
* AvailableFrom
|
|
105
|
+
*
|
|
106
|
+
* offer is available from this date (Product Management - Offer)
|
|
107
|
+
* @type {DATE}
|
|
108
|
+
*/
|
|
109
|
+
AvailableFrom?: string | null;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* UpdateOfferTemplate
|
|
113
|
+
*
|
|
114
|
+
* @actionType UPDATE - Updates an existing OfferTemplate record
|
|
115
|
+
* @module ProductModule
|
|
116
|
+
* @entity OfferTemplate
|
|
117
|
+
* @entityType DEFAULT (Default)
|
|
118
|
+
* @event k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate
|
|
119
|
+
* @permission schema.action.updateoffertemplate.trigger
|
|
120
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
121
|
+
*/
|
|
122
|
+
export declare class UpdateOfferTemplateDto extends OdinRecordUpdateDto<UpdateOfferTemplateProperties> {
|
|
123
|
+
/** Used by SDK generators to identify action type */
|
|
124
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
125
|
+
static readonly ACTION_KEY = "UpdateOfferTemplate";
|
|
126
|
+
static readonly MODULE_NAME = "ProductModule";
|
|
127
|
+
static readonly ENTITIES: string[];
|
|
128
|
+
static readonly ENTITY_TYPE = "DEFAULT";
|
|
129
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate";
|
|
130
|
+
static readonly PERMISSION = "schema.action.updateoffertemplate.trigger";
|
|
131
|
+
/** Step metadata - entity this action targets */
|
|
132
|
+
static readonly STEP_ENTITY = "ProductModule:OfferTemplate";
|
|
133
|
+
static readonly STEP_SCHEMA_ID = "91d64071-eb58-462d-b6cf-b5981182aa91";
|
|
134
|
+
static readonly STEP_SCHEMA_ACTION_ID = "130e8085-8039-4a71-983d-3971a8701110";
|
|
135
|
+
static readonly STEP_SCHEMA_TYPE_ID = "fda09d53-2abf-4b0b-a068-60fdd4cac1a2";
|
|
136
|
+
static readonly STEP_TYPE = "DEFAULT";
|
|
137
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
138
|
+
readonly actionName: string;
|
|
139
|
+
readonly schemaActionId: string;
|
|
140
|
+
readonly entity: string;
|
|
141
|
+
constructor(record: OdinRecord<any> | {
|
|
142
|
+
id: string;
|
|
143
|
+
entity: string;
|
|
144
|
+
type?: string;
|
|
145
|
+
}, properties: UpdateOfferTemplateProperties, options?: {
|
|
146
|
+
journeyId?: string;
|
|
147
|
+
stageKey?: string;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateOfferTemplate Action DTO
|
|
4
|
+
*
|
|
5
|
+
* UpdateOfferTemplate
|
|
6
|
+
*
|
|
7
|
+
* @module ProductModule
|
|
8
|
+
* @entity OfferTemplate
|
|
9
|
+
* @entityType DEFAULT
|
|
10
|
+
* @actionKey UpdateOfferTemplate
|
|
11
|
+
* @event k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateOfferTemplateDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* UpdateOfferTemplate
|
|
20
|
+
*
|
|
21
|
+
* @actionType UPDATE - Updates an existing OfferTemplate record
|
|
22
|
+
* @module ProductModule
|
|
23
|
+
* @entity OfferTemplate
|
|
24
|
+
* @entityType DEFAULT (Default)
|
|
25
|
+
* @event k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate
|
|
26
|
+
* @permission schema.action.updateoffertemplate.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class UpdateOfferTemplateDto extends core_1.OdinRecordUpdateDto {
|
|
30
|
+
constructor(record, properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
id: record.id,
|
|
33
|
+
entity: record.entity,
|
|
34
|
+
type: record.type,
|
|
35
|
+
properties,
|
|
36
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
37
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'UpdateOfferTemplate';
|
|
40
|
+
this.schemaActionId = '130e8085-8039-4a71-983d-3971a8701110';
|
|
41
|
+
this.entity = 'ProductModule:OfferTemplate';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateOfferTemplateDto = UpdateOfferTemplateDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
UpdateOfferTemplateDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
+
UpdateOfferTemplateDto.ACTION_KEY = 'UpdateOfferTemplate';
|
|
48
|
+
UpdateOfferTemplateDto.MODULE_NAME = 'ProductModule';
|
|
49
|
+
UpdateOfferTemplateDto.ENTITIES = ['OfferTemplate'];
|
|
50
|
+
UpdateOfferTemplateDto.ENTITY_TYPE = 'DEFAULT';
|
|
51
|
+
UpdateOfferTemplateDto.EVENT_NAME = 'k1.t-hEOJjsDb.ProductModule.OfferTemplate.Update.UpdateOfferTemplate';
|
|
52
|
+
UpdateOfferTemplateDto.PERMISSION = 'schema.action.updateoffertemplate.trigger';
|
|
53
|
+
/** Step metadata - entity this action targets */
|
|
54
|
+
UpdateOfferTemplateDto.STEP_ENTITY = 'ProductModule:OfferTemplate';
|
|
55
|
+
UpdateOfferTemplateDto.STEP_SCHEMA_ID = '91d64071-eb58-462d-b6cf-b5981182aa91';
|
|
56
|
+
UpdateOfferTemplateDto.STEP_SCHEMA_ACTION_ID = '130e8085-8039-4a71-983d-3971a8701110';
|
|
57
|
+
UpdateOfferTemplateDto.STEP_SCHEMA_TYPE_ID = 'fda09d53-2abf-4b0b-a068-60fdd4cac1a2';
|
|
58
|
+
UpdateOfferTemplateDto.STEP_TYPE = 'DEFAULT';
|
|
59
|
+
UpdateOfferTemplateDto.AUTO_LINK_PARENT = false;
|
|
@@ -22,12 +22,14 @@ export declare class OfferApi extends ApiProvider {
|
|
|
22
22
|
private _orderitem?;
|
|
23
23
|
private _product?;
|
|
24
24
|
private _offer?;
|
|
25
|
+
private _pricebook?;
|
|
25
26
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
26
27
|
get lead(): ApiRecordLinkManager;
|
|
27
28
|
get discount(): ApiRecordLinkManager;
|
|
28
29
|
get orderitem(): ApiRecordLinkManager;
|
|
29
30
|
get product(): ApiRecordLinkManager;
|
|
30
31
|
get offer(): ApiRecordLinkManager;
|
|
32
|
+
get pricebook(): ApiRecordLinkManager;
|
|
31
33
|
setRecord(sourceRecord: any): void;
|
|
32
34
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
33
35
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<OfferProperties>>>;
|
|
@@ -63,6 +63,12 @@ class OfferApi extends api_provider_1.ApiProvider {
|
|
|
63
63
|
}
|
|
64
64
|
return this._offer;
|
|
65
65
|
}
|
|
66
|
+
get pricebook() {
|
|
67
|
+
if (!this._pricebook) {
|
|
68
|
+
this._pricebook = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'ProductModule:Offer', 'ProductModule:PriceBook', 'PriceBook__Offer');
|
|
69
|
+
}
|
|
70
|
+
return this._pricebook;
|
|
71
|
+
}
|
|
66
72
|
// ============================================
|
|
67
73
|
// STANDARD METHODS (Unchanged API)
|
|
68
74
|
// ============================================
|
|
@@ -19,9 +19,11 @@ export declare class PriceBookApi extends ApiProvider {
|
|
|
19
19
|
private sourceRecord;
|
|
20
20
|
private _product?;
|
|
21
21
|
private _vendor?;
|
|
22
|
+
private _offer?;
|
|
22
23
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
23
24
|
get product(): ApiRecordLinkManager;
|
|
24
25
|
get vendor(): ApiRecordLinkManager;
|
|
26
|
+
get offer(): ApiRecordLinkManager;
|
|
25
27
|
setRecord(sourceRecord: any): void;
|
|
26
28
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
27
29
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<PriceBookProperties>>>;
|
|
@@ -45,6 +45,12 @@ class PriceBookApi extends api_provider_1.ApiProvider {
|
|
|
45
45
|
}
|
|
46
46
|
return this._vendor;
|
|
47
47
|
}
|
|
48
|
+
get offer() {
|
|
49
|
+
if (!this._offer) {
|
|
50
|
+
this._offer = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'ProductModule:PriceBook', 'ProductModule:Offer', 'PriceBook__Offer');
|
|
51
|
+
}
|
|
52
|
+
return this._offer;
|
|
53
|
+
}
|
|
48
54
|
// ============================================
|
|
49
55
|
// STANDARD METHODS (Unchanged API)
|
|
50
56
|
// ============================================
|
|
@@ -26,12 +26,14 @@ export declare class OfferDb extends DbProvider {
|
|
|
26
26
|
private _orderitem?;
|
|
27
27
|
private _product?;
|
|
28
28
|
private _offer?;
|
|
29
|
+
private _pricebook?;
|
|
29
30
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
30
31
|
get lead(): DbRecordLinkManager;
|
|
31
32
|
get discount(): DbRecordLinkManager;
|
|
32
33
|
get orderitem(): DbRecordLinkManager;
|
|
33
34
|
get product(): DbRecordLinkManager;
|
|
34
35
|
get offer(): DbRecordLinkManager;
|
|
36
|
+
get pricebook(): DbRecordLinkManager;
|
|
35
37
|
setRecord(sourceRecord: any): void;
|
|
36
38
|
/**
|
|
37
39
|
* Search records with manual pagination control
|
|
@@ -68,6 +68,12 @@ class OfferDb extends db_provider_1.DbProvider {
|
|
|
68
68
|
}
|
|
69
69
|
return this._offer;
|
|
70
70
|
}
|
|
71
|
+
get pricebook() {
|
|
72
|
+
if (!this._pricebook) {
|
|
73
|
+
this._pricebook = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ProductModule:Offer', 'ProductModule:PriceBook', 'PriceBook__Offer');
|
|
74
|
+
}
|
|
75
|
+
return this._pricebook;
|
|
76
|
+
}
|
|
71
77
|
// ============================================
|
|
72
78
|
// STANDARD METHODS
|
|
73
79
|
// ============================================
|
|
@@ -23,9 +23,11 @@ export declare class PriceBookDb extends DbProvider {
|
|
|
23
23
|
private sourceRecord;
|
|
24
24
|
private _product?;
|
|
25
25
|
private _vendor?;
|
|
26
|
+
private _offer?;
|
|
26
27
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
27
28
|
get product(): DbRecordLinkManager;
|
|
28
29
|
get vendor(): DbRecordLinkManager;
|
|
30
|
+
get offer(): DbRecordLinkManager;
|
|
29
31
|
setRecord(sourceRecord: any): void;
|
|
30
32
|
/**
|
|
31
33
|
* Search records with manual pagination control
|
|
@@ -50,6 +50,12 @@ class PriceBookDb extends db_provider_1.DbProvider {
|
|
|
50
50
|
}
|
|
51
51
|
return this._vendor;
|
|
52
52
|
}
|
|
53
|
+
get offer() {
|
|
54
|
+
if (!this._offer) {
|
|
55
|
+
this._offer = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ProductModule:PriceBook', 'ProductModule:Offer', 'PriceBook__Offer');
|
|
56
|
+
}
|
|
57
|
+
return this._offer;
|
|
58
|
+
}
|
|
53
59
|
// ============================================
|
|
54
60
|
// STANDARD METHODS
|
|
55
61
|
// ============================================
|
|
@@ -15,6 +15,7 @@ import { LeadProperties } from './Lead';
|
|
|
15
15
|
import { DiscountProperties } from './Discount';
|
|
16
16
|
import { OrderItemProperties } from './OrderItem';
|
|
17
17
|
import { ProductProperties } from './Product';
|
|
18
|
+
import { PriceBookProperties } from './PriceBook';
|
|
18
19
|
/**
|
|
19
20
|
* Available types for Offer records
|
|
20
21
|
*/
|
|
@@ -351,6 +352,8 @@ export declare class Offer extends OdinRecord<OfferProperties> {
|
|
|
351
352
|
Product: OdinLink<LinkedOdinRecord<ProductProperties>>;
|
|
352
353
|
/** Linked Offer records (Offer__Offer) */
|
|
353
354
|
Offer: OdinLink<LinkedOdinRecord<OfferProperties>>;
|
|
355
|
+
/** Linked PriceBook records (PriceBook__Offer) */
|
|
356
|
+
PriceBook: OdinLink<LinkedOdinRecord<PriceBookProperties>>;
|
|
354
357
|
}
|
|
355
358
|
/**
|
|
356
359
|
* RabbitMQ routing keys for Offer events
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
14
|
import { ProductProperties } from './Product';
|
|
15
15
|
import { VendorProperties } from './Vendor';
|
|
16
|
+
import { OfferProperties } from './Offer';
|
|
16
17
|
/**
|
|
17
18
|
* Available types for PriceBook records
|
|
18
19
|
*/
|
|
@@ -128,6 +129,8 @@ export declare class PriceBook extends OdinRecord<PriceBookProperties> {
|
|
|
128
129
|
Product: OdinLink<LinkedOdinRecord<ProductProperties>>;
|
|
129
130
|
/** Linked Vendor records (Vendor__PriceBook) */
|
|
130
131
|
Vendor: OdinLink<LinkedOdinRecord<VendorProperties>>;
|
|
132
|
+
/** Linked Offer records (PriceBook__Offer) */
|
|
133
|
+
Offer: OdinLink<LinkedOdinRecord<OfferProperties>>;
|
|
131
134
|
}
|
|
132
135
|
/**
|
|
133
136
|
* RabbitMQ routing keys for PriceBook events
|
|
@@ -149,3 +152,7 @@ export declare const ROUTING_KEY_PRICE_BOOK_DEFAULT_DELETED = "ProductModule.Pri
|
|
|
149
152
|
export declare const ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_CREATED = "ProductModule.PriceBook.Product.SubDbRecordAssociationCreated";
|
|
150
153
|
/** Event: PriceBook__Product link deleted */
|
|
151
154
|
export declare const ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_DELETED = "ProductModule.PriceBook.Product.SubDbRecordAssociationDeleted";
|
|
155
|
+
/** Event: PriceBook__Offer link created */
|
|
156
|
+
export declare const ROUTING_KEY_LINK_PRICE_BOOK_OFFER_CREATED = "ProductModule.PriceBook.Offer.SubDbRecordAssociationCreated";
|
|
157
|
+
/** Event: PriceBook__Offer link deleted */
|
|
158
|
+
export declare const ROUTING_KEY_LINK_PRICE_BOOK_OFFER_DELETED = "ProductModule.PriceBook.Offer.SubDbRecordAssociationDeleted";
|
|
@@ -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_PRICE_BOOK_PRODUCT_DELETED = exports.ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_CREATED = exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_DELETED = exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_UPDATED = exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_CREATED = exports.ROUTING_KEY_PRICE_BOOK_DELETED = exports.ROUTING_KEY_PRICE_BOOK_UPDATED = exports.ROUTING_KEY_PRICE_BOOK_CREATED = exports.PriceBook = exports.PriceBookPropertyKeys = exports.PriceBookCustomerType = exports.PriceBookContractType = exports.PriceBookEntityTypes = void 0;
|
|
15
|
+
exports.ROUTING_KEY_LINK_PRICE_BOOK_OFFER_DELETED = exports.ROUTING_KEY_LINK_PRICE_BOOK_OFFER_CREATED = exports.ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_DELETED = exports.ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_CREATED = exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_DELETED = exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_UPDATED = exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_CREATED = exports.ROUTING_KEY_PRICE_BOOK_DELETED = exports.ROUTING_KEY_PRICE_BOOK_UPDATED = exports.ROUTING_KEY_PRICE_BOOK_CREATED = exports.PriceBook = exports.PriceBookPropertyKeys = exports.PriceBookCustomerType = exports.PriceBookContractType = exports.PriceBookEntityTypes = void 0;
|
|
16
16
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
17
|
/**
|
|
18
18
|
* Available types for PriceBook records
|
|
@@ -109,3 +109,7 @@ exports.ROUTING_KEY_PRICE_BOOK_DEFAULT_DELETED = 'ProductModule.PriceBook.DEFAUL
|
|
|
109
109
|
exports.ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_CREATED = 'ProductModule.PriceBook.Product.SubDbRecordAssociationCreated';
|
|
110
110
|
/** Event: PriceBook__Product link deleted */
|
|
111
111
|
exports.ROUTING_KEY_LINK_PRICE_BOOK_PRODUCT_DELETED = 'ProductModule.PriceBook.Product.SubDbRecordAssociationDeleted';
|
|
112
|
+
/** Event: PriceBook__Offer link created */
|
|
113
|
+
exports.ROUTING_KEY_LINK_PRICE_BOOK_OFFER_CREATED = 'ProductModule.PriceBook.Offer.SubDbRecordAssociationCreated';
|
|
114
|
+
/** Event: PriceBook__Offer link deleted */
|
|
115
|
+
exports.ROUTING_KEY_LINK_PRICE_BOOK_OFFER_DELETED = 'ProductModule.PriceBook.Offer.SubDbRecordAssociationDeleted';
|
|
@@ -29,6 +29,7 @@ import { CreateInboundCallProperties } from '../actions-v2/CreateInboundCallDto'
|
|
|
29
29
|
import { CreateInboundCallBuilder } from '../actions-v2/CreateInboundCallDto';
|
|
30
30
|
import { CreateOutboundCallProperties } from '../actions-v2/CreateOutboundCallDto';
|
|
31
31
|
import { CreateOutboundCallBuilder } from '../actions-v2/CreateOutboundCallDto';
|
|
32
|
+
import { UpdateCallAnalyticsProperties } from '../actions-v2/UpdateCallAnalyticsDto';
|
|
32
33
|
import { UpdateCallOnInboundCallAnsweredProperties } from '../actions-v2/UpdateCallOnInboundCallAnsweredDto';
|
|
33
34
|
import { UpdateCallOnInboundCallCanceledProperties } from '../actions-v2/UpdateCallOnInboundCallCanceledDto';
|
|
34
35
|
import { UpdateCallOnInboundCallCompletedProperties } from '../actions-v2/UpdateCallOnInboundCallCompletedDto';
|
|
@@ -421,6 +422,32 @@ export declare class CallRecord<TProps = CallProperties> {
|
|
|
421
422
|
journeyId?: string;
|
|
422
423
|
stageKey?: string;
|
|
423
424
|
}): CreateOutboundCallBuilder;
|
|
425
|
+
/**
|
|
426
|
+
* UpdateCallAnalytics
|
|
427
|
+
*
|
|
428
|
+
* Updates this Call record with the specified properties.
|
|
429
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
430
|
+
*
|
|
431
|
+
* @param properties - Required properties for this action
|
|
432
|
+
* @param options - Optional settings
|
|
433
|
+
* @param options.journeyId - Associate with a journey
|
|
434
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
435
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
436
|
+
* @throws Error if called on a new (unsaved) record
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* ```typescript
|
|
440
|
+
* const record = await odinClient.calls.get(id);
|
|
441
|
+
* await record.updateCallAnalytics({ ... }).execute();
|
|
442
|
+
*
|
|
443
|
+
* // Dry run (for debugging)
|
|
444
|
+
* const payload = record.updateCallAnalytics({ ... }).dryRun();
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
updateCallAnalytics(properties: UpdateCallAnalyticsProperties, options?: {
|
|
448
|
+
journeyId?: string;
|
|
449
|
+
stageKey?: string;
|
|
450
|
+
}): ActionBuilder;
|
|
424
451
|
/**
|
|
425
452
|
* UpdateCallOnInboundCallAnswered
|
|
426
453
|
*
|
|
@@ -556,6 +556,35 @@ class CallRecord {
|
|
|
556
556
|
// ============================================
|
|
557
557
|
// UPDATE ACTIONS (require existing record)
|
|
558
558
|
// ============================================
|
|
559
|
+
/**
|
|
560
|
+
* UpdateCallAnalytics
|
|
561
|
+
*
|
|
562
|
+
* Updates this Call record with the specified properties.
|
|
563
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
564
|
+
*
|
|
565
|
+
* @param properties - Required properties for this action
|
|
566
|
+
* @param options - Optional settings
|
|
567
|
+
* @param options.journeyId - Associate with a journey
|
|
568
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
569
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
570
|
+
* @throws Error if called on a new (unsaved) record
|
|
571
|
+
*
|
|
572
|
+
* @example
|
|
573
|
+
* ```typescript
|
|
574
|
+
* const record = await odinClient.calls.get(id);
|
|
575
|
+
* await record.updateCallAnalytics({ ... }).execute();
|
|
576
|
+
*
|
|
577
|
+
* // Dry run (for debugging)
|
|
578
|
+
* const payload = record.updateCallAnalytics({ ... }).dryRun();
|
|
579
|
+
* ```
|
|
580
|
+
*/
|
|
581
|
+
updateCallAnalytics(properties, options) {
|
|
582
|
+
var _a;
|
|
583
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
584
|
+
throw new Error('updateCallAnalytics requires an existing record. Use accessor.get() first.');
|
|
585
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateCallAnalytics', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
586
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'Call', payload, () => { this._pendingLinks = []; });
|
|
587
|
+
}
|
|
559
588
|
/**
|
|
560
589
|
* UpdateCallOnInboundCallAnswered
|
|
561
590
|
*
|
|
@@ -29,6 +29,7 @@ import { LeadRecord } from './LeadRecord';
|
|
|
29
29
|
import { DiscountRecord } from './DiscountRecord';
|
|
30
30
|
import { OrderItemRecord } from './OrderItemRecord';
|
|
31
31
|
import { ProductRecord } from './ProductRecord';
|
|
32
|
+
import { PriceBookRecord } from './PriceBookRecord';
|
|
32
33
|
/** Valid entity types for Offer */
|
|
33
34
|
export declare type OfferType = 'DEFAULT' | 'RECONTRACT' | 'STANDARD';
|
|
34
35
|
/**
|
|
@@ -99,6 +100,7 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
99
100
|
private _orderItems?;
|
|
100
101
|
private _products?;
|
|
101
102
|
private _offers?;
|
|
103
|
+
private _priceBooks?;
|
|
102
104
|
/**
|
|
103
105
|
* Create a record wrapper.
|
|
104
106
|
* @param record - The underlying record, or null for create operations
|
|
@@ -262,6 +264,24 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
262
264
|
* ```
|
|
263
265
|
*/
|
|
264
266
|
get offers(): RecordLinkManager<OfferRecord, typeof OfferRecord['offersLabels'][number]>;
|
|
267
|
+
/** Valid labels for PriceBook associations */
|
|
268
|
+
static readonly priceBooksLabels: readonly ["PriceBook__Offer"];
|
|
269
|
+
/**
|
|
270
|
+
* Access linked PriceBook records
|
|
271
|
+
* @remarks Available labels: PriceBook__Offer
|
|
272
|
+
* @throws Error if called on a new (unsaved) record
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* // Get all linked PriceBook records
|
|
277
|
+
* const items = await record.priceBooks.list();
|
|
278
|
+
* const first = await record.priceBooks.first();
|
|
279
|
+
*
|
|
280
|
+
* // Filter by label
|
|
281
|
+
* const specific = await record.priceBooks.first({ label: 'PriceBook__Offer' });
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
get priceBooks(): RecordLinkManager<PriceBookRecord, typeof OfferRecord['priceBooksLabels'][number]>;
|
|
265
285
|
/**
|
|
266
286
|
* Queue a link to be created with the next action.
|
|
267
287
|
* Works for both create and update actions.
|
|
@@ -36,6 +36,7 @@ const LeadRecord_1 = require("./LeadRecord");
|
|
|
36
36
|
const DiscountRecord_1 = require("./DiscountRecord");
|
|
37
37
|
const OrderItemRecord_1 = require("./OrderItemRecord");
|
|
38
38
|
const ProductRecord_1 = require("./ProductRecord");
|
|
39
|
+
const PriceBookRecord_1 = require("./PriceBookRecord");
|
|
39
40
|
/**
|
|
40
41
|
* Builder for action execution with dryRun support
|
|
41
42
|
*
|
|
@@ -347,6 +348,36 @@ class OfferRecord {
|
|
|
347
348
|
}
|
|
348
349
|
return this._offers;
|
|
349
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* Access linked PriceBook records
|
|
353
|
+
* @remarks Available labels: PriceBook__Offer
|
|
354
|
+
* @throws Error if called on a new (unsaved) record
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* ```typescript
|
|
358
|
+
* // Get all linked PriceBook records
|
|
359
|
+
* const items = await record.priceBooks.list();
|
|
360
|
+
* const first = await record.priceBooks.first();
|
|
361
|
+
*
|
|
362
|
+
* // Filter by label
|
|
363
|
+
* const specific = await record.priceBooks.first({ label: 'PriceBook__Offer' });
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
get priceBooks() {
|
|
367
|
+
var _a;
|
|
368
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
369
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
370
|
+
if (!this._priceBooks) {
|
|
371
|
+
this._priceBooks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
372
|
+
sourceEntity: 'ProductModule:Offer',
|
|
373
|
+
targetEntity: 'ProductModule:PriceBook',
|
|
374
|
+
targetModuleName: 'ProductModule',
|
|
375
|
+
targetEntityName: 'PriceBook',
|
|
376
|
+
labels: ['PriceBook__Offer'],
|
|
377
|
+
}, PriceBookRecord_1.PriceBookRecord);
|
|
378
|
+
}
|
|
379
|
+
return this._priceBooks;
|
|
380
|
+
}
|
|
350
381
|
// ============================================
|
|
351
382
|
// LINK MANAGEMENT
|
|
352
383
|
// ============================================
|
|
@@ -468,6 +499,8 @@ OfferRecord.orderItemsLabels = ['OrderItem__Offer'];
|
|
|
468
499
|
OfferRecord.productsLabels = ['Offer__Product'];
|
|
469
500
|
/** Valid labels for Offer associations */
|
|
470
501
|
OfferRecord.offersLabels = ['Offer__Offer'];
|
|
502
|
+
/** Valid labels for PriceBook associations */
|
|
503
|
+
OfferRecord.priceBooksLabels = ['PriceBook__Offer'];
|
|
471
504
|
/** Type guard to check if an object is a OfferRecord */
|
|
472
505
|
function isOfferRecord(obj) {
|
|
473
506
|
return obj instanceof OfferRecord;
|
|
@@ -23,6 +23,7 @@ import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/
|
|
|
23
23
|
import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
24
24
|
import { OfferTemplateProperties } from '../entities-v2/OfferTemplate';
|
|
25
25
|
import { CreateOfferTemplateProperties } from '../actions-v2/CreateOfferTemplateDto';
|
|
26
|
+
import { UpdateOfferTemplateProperties } from '../actions-v2/UpdateOfferTemplateDto';
|
|
26
27
|
/** Valid entity types for OfferTemplate */
|
|
27
28
|
export declare type OfferTemplateType = 'DEFAULT';
|
|
28
29
|
/**
|
|
@@ -178,6 +179,32 @@ export declare class OfferTemplateRecord<TProps = OfferTemplateProperties> {
|
|
|
178
179
|
journeyId?: string;
|
|
179
180
|
stageKey?: string;
|
|
180
181
|
}): ActionBuilder;
|
|
182
|
+
/**
|
|
183
|
+
* UpdateOfferTemplate
|
|
184
|
+
*
|
|
185
|
+
* Updates this OfferTemplate record with the specified properties.
|
|
186
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
187
|
+
*
|
|
188
|
+
* @param properties - Required properties for this action
|
|
189
|
+
* @param options - Optional settings
|
|
190
|
+
* @param options.journeyId - Associate with a journey
|
|
191
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
192
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
193
|
+
* @throws Error if called on a new (unsaved) record
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```typescript
|
|
197
|
+
* const record = await odinClient.offerTemplates.get(id);
|
|
198
|
+
* await record.updateOfferTemplate({ ... }).execute();
|
|
199
|
+
*
|
|
200
|
+
* // Dry run (for debugging)
|
|
201
|
+
* const payload = record.updateOfferTemplate({ ... }).dryRun();
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
updateOfferTemplate(properties: UpdateOfferTemplateProperties, options?: {
|
|
205
|
+
journeyId?: string;
|
|
206
|
+
stageKey?: string;
|
|
207
|
+
}): ActionBuilder;
|
|
181
208
|
}
|
|
182
209
|
/** Type guard to check if an object is a OfferTemplateRecord */
|
|
183
210
|
export declare function isOfferTemplateRecord(obj: any): obj is OfferTemplateRecord;
|
|
@@ -234,6 +234,38 @@ class OfferTemplateRecord {
|
|
|
234
234
|
};
|
|
235
235
|
return new ActionBuilder(this._provider, 'ProductModule', 'OfferTemplate', payload, () => { this._pendingLinks = []; });
|
|
236
236
|
}
|
|
237
|
+
// ============================================
|
|
238
|
+
// UPDATE ACTIONS (require existing record)
|
|
239
|
+
// ============================================
|
|
240
|
+
/**
|
|
241
|
+
* UpdateOfferTemplate
|
|
242
|
+
*
|
|
243
|
+
* Updates this OfferTemplate record with the specified properties.
|
|
244
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
245
|
+
*
|
|
246
|
+
* @param properties - Required properties for this action
|
|
247
|
+
* @param options - Optional settings
|
|
248
|
+
* @param options.journeyId - Associate with a journey
|
|
249
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
250
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
251
|
+
* @throws Error if called on a new (unsaved) record
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```typescript
|
|
255
|
+
* const record = await odinClient.offerTemplates.get(id);
|
|
256
|
+
* await record.updateOfferTemplate({ ... }).execute();
|
|
257
|
+
*
|
|
258
|
+
* // Dry run (for debugging)
|
|
259
|
+
* const payload = record.updateOfferTemplate({ ... }).dryRun();
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
updateOfferTemplate(properties, options) {
|
|
263
|
+
var _a;
|
|
264
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
265
|
+
throw new Error('updateOfferTemplate requires an existing record. Use accessor.get() first.');
|
|
266
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateOfferTemplate', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
267
|
+
return new ActionBuilder(this._provider, 'ProductModule', 'OfferTemplate', payload, () => { this._pendingLinks = []; });
|
|
268
|
+
}
|
|
237
269
|
}
|
|
238
270
|
exports.OfferTemplateRecord = OfferTemplateRecord;
|
|
239
271
|
/** Type guard to check if an object is a OfferTemplateRecord */
|
|
@@ -24,6 +24,7 @@ import { PriceBookProperties } from '../entities-v2/PriceBook';
|
|
|
24
24
|
import { PriceBookCreateActionProperties } from '../actions-v2/PriceBookCreateActionDto';
|
|
25
25
|
import { PriceBookUpdateActionProperties } from '../actions-v2/PriceBookUpdateActionDto';
|
|
26
26
|
import { ProductRecord } from './ProductRecord';
|
|
27
|
+
import { OfferRecord } from './OfferRecord';
|
|
27
28
|
/**
|
|
28
29
|
* Builder for action execution with dryRun support
|
|
29
30
|
*
|
|
@@ -88,6 +89,7 @@ export declare class PriceBookRecord<TProps = PriceBookProperties> {
|
|
|
88
89
|
private _pendingLinks;
|
|
89
90
|
private _preGeneratedId;
|
|
90
91
|
private _products?;
|
|
92
|
+
private _offers?;
|
|
91
93
|
/**
|
|
92
94
|
* Create a record wrapper.
|
|
93
95
|
* @param record - The underlying record, or null for create operations
|
|
@@ -131,6 +133,24 @@ export declare class PriceBookRecord<TProps = PriceBookProperties> {
|
|
|
131
133
|
* ```
|
|
132
134
|
*/
|
|
133
135
|
get products(): RecordLinkManager<ProductRecord, typeof PriceBookRecord['productsLabels'][number]>;
|
|
136
|
+
/** Valid labels for Offer associations */
|
|
137
|
+
static readonly offersLabels: readonly ["PriceBook__Offer"];
|
|
138
|
+
/**
|
|
139
|
+
* Access linked Offer records
|
|
140
|
+
* @remarks Available labels: PriceBook__Offer
|
|
141
|
+
* @throws Error if called on a new (unsaved) record
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* // Get all linked Offer records
|
|
146
|
+
* const items = await record.offers.list();
|
|
147
|
+
* const first = await record.offers.first();
|
|
148
|
+
*
|
|
149
|
+
* // Filter by label
|
|
150
|
+
* const specific = await record.offers.first({ label: 'PriceBook__Offer' });
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
get offers(): RecordLinkManager<OfferRecord, typeof PriceBookRecord['offersLabels'][number]>;
|
|
134
154
|
/**
|
|
135
155
|
* Queue a link to be created with the next action.
|
|
136
156
|
* Works for both create and update actions.
|
|
@@ -31,6 +31,7 @@ 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
33
|
const ProductRecord_1 = require("./ProductRecord");
|
|
34
|
+
const OfferRecord_1 = require("./OfferRecord");
|
|
34
35
|
/**
|
|
35
36
|
* Builder for action execution with dryRun support
|
|
36
37
|
*
|
|
@@ -171,6 +172,36 @@ class PriceBookRecord {
|
|
|
171
172
|
}
|
|
172
173
|
return this._products;
|
|
173
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Access linked Offer records
|
|
177
|
+
* @remarks Available labels: PriceBook__Offer
|
|
178
|
+
* @throws Error if called on a new (unsaved) record
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* // Get all linked Offer records
|
|
183
|
+
* const items = await record.offers.list();
|
|
184
|
+
* const first = await record.offers.first();
|
|
185
|
+
*
|
|
186
|
+
* // Filter by label
|
|
187
|
+
* const specific = await record.offers.first({ label: 'PriceBook__Offer' });
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
get offers() {
|
|
191
|
+
var _a;
|
|
192
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
193
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
194
|
+
if (!this._offers) {
|
|
195
|
+
this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
196
|
+
sourceEntity: 'ProductModule:PriceBook',
|
|
197
|
+
targetEntity: 'ProductModule:Offer',
|
|
198
|
+
targetModuleName: 'ProductModule',
|
|
199
|
+
targetEntityName: 'Offer',
|
|
200
|
+
labels: ['PriceBook__Offer'],
|
|
201
|
+
}, OfferRecord_1.OfferRecord);
|
|
202
|
+
}
|
|
203
|
+
return this._offers;
|
|
204
|
+
}
|
|
174
205
|
// ============================================
|
|
175
206
|
// LINK MANAGEMENT
|
|
176
207
|
// ============================================
|
|
@@ -284,6 +315,8 @@ exports.PriceBookRecord = PriceBookRecord;
|
|
|
284
315
|
// ============================================
|
|
285
316
|
/** Valid labels for Product associations */
|
|
286
317
|
PriceBookRecord.productsLabels = ['PriceBook__Product'];
|
|
318
|
+
/** Valid labels for Offer associations */
|
|
319
|
+
PriceBookRecord.offersLabels = ['PriceBook__Offer'];
|
|
287
320
|
/** Type guard to check if an object is a PriceBookRecord */
|
|
288
321
|
function isPriceBookRecord(obj) {
|
|
289
322
|
return obj instanceof PriceBookRecord;
|