@d19n/youfibre-odin-sdk 2.0.308 → 2.0.309
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/AssignEngineerDto.d.ts +1 -1
- package/dist/actions-v2/CreateContactSalesAppDto.d.ts +98 -0
- package/dist/actions-v2/CreateContactSalesAppDto.js +54 -0
- package/dist/actions-v2/CreateLeadFromAddressSalesAppDto.d.ts +58 -0
- package/dist/actions-v2/CreateLeadFromAddressSalesAppDto.js +54 -0
- package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +92 -0
- package/dist/actions-v2/CreateLeadSalesAppDto.js +54 -0
- package/dist/api-sdk-v2/EmailApi.d.ts +2 -0
- package/dist/api-sdk-v2/EmailApi.js +6 -0
- package/dist/api-sdk-v2/OrderApi.d.ts +2 -0
- package/dist/api-sdk-v2/OrderApi.js +6 -0
- package/dist/db-sdk-v2/EmailDb.d.ts +2 -0
- package/dist/db-sdk-v2/EmailDb.js +6 -0
- package/dist/db-sdk-v2/OrderDb.d.ts +2 -0
- package/dist/db-sdk-v2/OrderDb.js +6 -0
- package/dist/entities-v2/AgentStatus.d.ts +33 -33
- package/dist/entities-v2/AgentStatus.js +21 -21
- package/dist/entities-v2/Email.d.ts +3 -0
- package/dist/entities-v2/Order.d.ts +7 -0
- package/dist/entities-v2/Order.js +5 -1
- package/dist/records-v2/ContactRecord.d.ts +29 -0
- package/dist/records-v2/ContactRecord.js +36 -0
- package/dist/records-v2/EmailRecord.d.ts +20 -0
- package/dist/records-v2/EmailRecord.js +33 -0
- package/dist/records-v2/LeadRecord.d.ts +58 -0
- package/dist/records-v2/LeadRecord.js +72 -0
- package/dist/records-v2/OrderRecord.d.ts +20 -0
- package/dist/records-v2/OrderRecord.js +33 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -369,7 +369,7 @@ This SDK includes **181** entities across **12** modules.
|
|
|
369
369
|
|
|
370
370
|
## Actions
|
|
371
371
|
|
|
372
|
-
This SDK includes **
|
|
372
|
+
This SDK includes **873** actions.
|
|
373
373
|
|
|
374
374
|
### Action Types
|
|
375
375
|
|
|
@@ -1566,6 +1566,7 @@ This SDK includes **870** actions.
|
|
|
1566
1566
|
| Action | Type | Event |
|
|
1567
1567
|
|--------|------|-------|
|
|
1568
1568
|
| `CreateContact` | CREATE | k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContact |
|
|
1569
|
+
| `CreateContactSalesApp` | CREATE | k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp |
|
|
1569
1570
|
| `UpdateAdditionalCare` | UPDATE | k1.t-hEOJjsDb.CrmModule.Contact.Update.UpdateAdditionalCare |
|
|
1570
1571
|
| `UpdateContact` | UPDATE | k1.t-hEOJjsDb.CrmModule.Contact.Update.UpdateContact |
|
|
1571
1572
|
| `UpdateReferralCode` | UPDATE | k1.t-hEOJjsDb.CrmModule.Contact.Update.UpdateReferralCode |
|
|
@@ -1671,6 +1672,8 @@ This SDK includes **870** actions.
|
|
|
1671
1672
|
|--------|------|-------|
|
|
1672
1673
|
| `CreateLead` | CREATE | k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLead |
|
|
1673
1674
|
| `CreateLeadFromAddress` | CREATE | k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLead |
|
|
1675
|
+
| `CreateLeadFromAddressSalesApp` | CREATE | k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp |
|
|
1676
|
+
| `CreateLeadSalesApp` | CREATE | k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp |
|
|
1674
1677
|
| `MoveLeadToContacted` | STAGE_TRANSITION | k1.t-hEOJjsDb.CrmModule.Lead.Transition.MoveLeadToContacted |
|
|
1675
1678
|
| `MoveLeadToLost` | STAGE_TRANSITION | k1.t-hEOJjsDb.CrmModule.Lead.Transition.MoveLeadToLost |
|
|
1676
1679
|
| `MoveLeadToQualified` | STAGE_TRANSITION | k1.t-hEOJjsDb.CrmModule.Lead.Transition.MoveLeadToQualified |
|
|
@@ -30,7 +30,7 @@ export interface AssignEngineerProperties {
|
|
|
30
30
|
*
|
|
31
31
|
* Reference identifier for WorkOrder relationships. Used for data integrity.
|
|
32
32
|
* @type {LOOKUP}
|
|
33
|
-
* @visibleWhen ScheduleIdDummy = ["*"]
|
|
33
|
+
* @visibleWhen ScheduleIdDummy = ["*any"]
|
|
34
34
|
*/
|
|
35
35
|
EngineerId?: string | null;
|
|
36
36
|
/**
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateContactSalesApp Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Contact create action (Sales App)
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity Contact
|
|
8
|
+
* @actionKey CreateContactSalesApp
|
|
9
|
+
* @event k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for CreateContactSalesApp created events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateContactSalesAppMessage extends OdinRecordCreatedEvent<CreateContactSalesAppDto, CreateContactSalesAppProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for CreateContactSalesApp action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 3
|
|
25
|
+
* @property Optional fields: 2
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateContactSalesAppProperties {
|
|
28
|
+
/**
|
|
29
|
+
* FirstName
|
|
30
|
+
*
|
|
31
|
+
* Contacts First Name (Sales - Contact)
|
|
32
|
+
* @type {TEXT}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
FirstName: string;
|
|
36
|
+
/**
|
|
37
|
+
* LastName
|
|
38
|
+
*
|
|
39
|
+
* Contacts Last Name (Sales - Contact)
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
* @required
|
|
42
|
+
*/
|
|
43
|
+
LastName: string;
|
|
44
|
+
/**
|
|
45
|
+
* EmailAddress
|
|
46
|
+
*
|
|
47
|
+
* Contacts Email Address (Sales - Contact)
|
|
48
|
+
* @type {EMAIL}
|
|
49
|
+
* @required
|
|
50
|
+
*/
|
|
51
|
+
EmailAddress: string;
|
|
52
|
+
/**
|
|
53
|
+
* Phone
|
|
54
|
+
*
|
|
55
|
+
* Phone number (Sales - Contact)
|
|
56
|
+
* @type {PHONE_NUMBER_E164_GB}
|
|
57
|
+
*/
|
|
58
|
+
Phone?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Marketing Consent
|
|
61
|
+
*
|
|
62
|
+
* I am happy to hear from YouFibre by email, WhatsApp and SMS about YouFibre’s broadband packages and any special offers. I am aware that I can opt-out at any time. For details on how we manage your data, please see our privacy policy.
|
|
63
|
+
* @type {BOOLEAN}
|
|
64
|
+
*/
|
|
65
|
+
MarketingConsent?: boolean | null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* CreateContactSalesApp
|
|
69
|
+
*
|
|
70
|
+
* Contact create action (Sales App)
|
|
71
|
+
*
|
|
72
|
+
* @actionType CREATE - Creates a new Contact record
|
|
73
|
+
* @module CrmModule
|
|
74
|
+
* @entity Contact
|
|
75
|
+
* @event k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp
|
|
76
|
+
* @permission schema.action.createcontactsalesapp.trigger
|
|
77
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
78
|
+
*/
|
|
79
|
+
export declare class CreateContactSalesAppDto extends OdinRecordCreateDto<CreateContactSalesAppProperties> {
|
|
80
|
+
/** Used by SDK generators to identify action type */
|
|
81
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
82
|
+
static readonly ACTION_KEY = "CreateContactSalesApp";
|
|
83
|
+
static readonly MODULE_NAME = "CrmModule";
|
|
84
|
+
static readonly ENTITIES: string[];
|
|
85
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp";
|
|
86
|
+
static readonly PERMISSION = "schema.action.createcontactsalesapp.trigger";
|
|
87
|
+
/** Step metadata - entity this action targets */
|
|
88
|
+
static readonly STEP_ENTITY = "CrmModule:Contact";
|
|
89
|
+
static readonly STEP_SCHEMA_ID = "33643a0d-5b77-4895-a2da-991e0fd3432f";
|
|
90
|
+
static readonly STEP_SCHEMA_ACTION_ID = "bce4c6cb-32ef-4d48-8b64-1503e219b3f3";
|
|
91
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
92
|
+
readonly actionName: string;
|
|
93
|
+
readonly schemaActionId: string;
|
|
94
|
+
readonly entity: string;
|
|
95
|
+
constructor(properties: CreateContactSalesAppProperties, options?: {
|
|
96
|
+
journeyId?: string;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateContactSalesApp Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Contact create action (Sales App)
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity Contact
|
|
9
|
+
* @actionKey CreateContactSalesApp
|
|
10
|
+
* @event k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateContactSalesAppDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* CreateContactSalesApp
|
|
19
|
+
*
|
|
20
|
+
* Contact create action (Sales App)
|
|
21
|
+
*
|
|
22
|
+
* @actionType CREATE - Creates a new Contact record
|
|
23
|
+
* @module CrmModule
|
|
24
|
+
* @entity Contact
|
|
25
|
+
* @event k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp
|
|
26
|
+
* @permission schema.action.createcontactsalesapp.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class CreateContactSalesAppDto extends core_1.OdinRecordCreateDto {
|
|
30
|
+
constructor(properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
entity: 'CrmModule:Contact',
|
|
33
|
+
type: undefined,
|
|
34
|
+
properties,
|
|
35
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
36
|
+
});
|
|
37
|
+
this.actionName = 'CreateContactSalesApp';
|
|
38
|
+
this.schemaActionId = 'bce4c6cb-32ef-4d48-8b64-1503e219b3f3';
|
|
39
|
+
this.entity = 'CrmModule:Contact';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CreateContactSalesAppDto = CreateContactSalesAppDto;
|
|
43
|
+
/** Used by SDK generators to identify action type */
|
|
44
|
+
CreateContactSalesAppDto.ACTION_TYPE = 'CREATE';
|
|
45
|
+
CreateContactSalesAppDto.ACTION_KEY = 'CreateContactSalesApp';
|
|
46
|
+
CreateContactSalesAppDto.MODULE_NAME = 'CrmModule';
|
|
47
|
+
CreateContactSalesAppDto.ENTITIES = ['Contact'];
|
|
48
|
+
CreateContactSalesAppDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.Contact.Create.CreateContactSalesApp';
|
|
49
|
+
CreateContactSalesAppDto.PERMISSION = 'schema.action.createcontactsalesapp.trigger';
|
|
50
|
+
/** Step metadata - entity this action targets */
|
|
51
|
+
CreateContactSalesAppDto.STEP_ENTITY = 'CrmModule:Contact';
|
|
52
|
+
CreateContactSalesAppDto.STEP_SCHEMA_ID = '33643a0d-5b77-4895-a2da-991e0fd3432f';
|
|
53
|
+
CreateContactSalesAppDto.STEP_SCHEMA_ACTION_ID = 'bce4c6cb-32ef-4d48-8b64-1503e219b3f3';
|
|
54
|
+
CreateContactSalesAppDto.AUTO_LINK_PARENT = true;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateLeadFromAddressSalesApp Action DTO
|
|
3
|
+
*
|
|
4
|
+
* MULTI_STEP: Create Lead then Contact (Sales App)
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity Lead
|
|
8
|
+
* @actionKey CreateLeadFromAddressSalesApp
|
|
9
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for CreateLeadFromAddressSalesApp created events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateLeadFromAddressSalesAppMessage extends OdinRecordCreatedEvent<CreateLeadFromAddressSalesAppDto, CreateLeadFromAddressSalesAppProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for CreateLeadFromAddressSalesApp action
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export interface CreateLeadFromAddressSalesAppProperties {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create Lead
|
|
29
|
+
*
|
|
30
|
+
* MULTI_STEP: Create Lead then Contact (Sales App)
|
|
31
|
+
*
|
|
32
|
+
* @actionType CREATE - Creates a new Lead record
|
|
33
|
+
* @module CrmModule
|
|
34
|
+
* @entity Lead
|
|
35
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp
|
|
36
|
+
* @permission schema.action.createleadfromaddresssalesapp.trigger
|
|
37
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
38
|
+
*/
|
|
39
|
+
export declare class CreateLeadFromAddressSalesAppDto extends OdinRecordCreateDto<CreateLeadFromAddressSalesAppProperties> {
|
|
40
|
+
/** Used by SDK generators to identify action type */
|
|
41
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
42
|
+
static readonly ACTION_KEY = "CreateLeadFromAddressSalesApp";
|
|
43
|
+
static readonly MODULE_NAME = "CrmModule";
|
|
44
|
+
static readonly ENTITIES: string[];
|
|
45
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp";
|
|
46
|
+
static readonly PERMISSION = "schema.action.createleadfromaddresssalesapp.trigger";
|
|
47
|
+
/** Step metadata - entity this action targets */
|
|
48
|
+
static readonly STEP_ENTITY = "CrmModule:Lead";
|
|
49
|
+
static readonly STEP_SCHEMA_ID = "44f23adb-9ea5-4ce1-af8f-71fd05c75615";
|
|
50
|
+
static readonly STEP_SCHEMA_ACTION_ID = "f356b018-a3dd-4010-8a14-d0fb8e20a509";
|
|
51
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
52
|
+
readonly actionName: string;
|
|
53
|
+
readonly schemaActionId: string;
|
|
54
|
+
readonly entity: string;
|
|
55
|
+
constructor(properties: CreateLeadFromAddressSalesAppProperties, options?: {
|
|
56
|
+
journeyId?: string;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateLeadFromAddressSalesApp Action DTO
|
|
4
|
+
*
|
|
5
|
+
* MULTI_STEP: Create Lead then Contact (Sales App)
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity Lead
|
|
9
|
+
* @actionKey CreateLeadFromAddressSalesApp
|
|
10
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateLeadFromAddressSalesAppDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Create Lead
|
|
19
|
+
*
|
|
20
|
+
* MULTI_STEP: Create Lead then Contact (Sales App)
|
|
21
|
+
*
|
|
22
|
+
* @actionType CREATE - Creates a new Lead record
|
|
23
|
+
* @module CrmModule
|
|
24
|
+
* @entity Lead
|
|
25
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp
|
|
26
|
+
* @permission schema.action.createleadfromaddresssalesapp.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class CreateLeadFromAddressSalesAppDto extends core_1.OdinRecordCreateDto {
|
|
30
|
+
constructor(properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
entity: 'CrmModule:Lead',
|
|
33
|
+
type: undefined,
|
|
34
|
+
properties,
|
|
35
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
36
|
+
});
|
|
37
|
+
this.actionName = 'CreateLeadFromAddressSalesApp';
|
|
38
|
+
this.schemaActionId = 'f356b018-a3dd-4010-8a14-d0fb8e20a509';
|
|
39
|
+
this.entity = 'CrmModule:Lead';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CreateLeadFromAddressSalesAppDto = CreateLeadFromAddressSalesAppDto;
|
|
43
|
+
/** Used by SDK generators to identify action type */
|
|
44
|
+
CreateLeadFromAddressSalesAppDto.ACTION_TYPE = 'CREATE';
|
|
45
|
+
CreateLeadFromAddressSalesAppDto.ACTION_KEY = 'CreateLeadFromAddressSalesApp';
|
|
46
|
+
CreateLeadFromAddressSalesAppDto.MODULE_NAME = 'CrmModule';
|
|
47
|
+
CreateLeadFromAddressSalesAppDto.ENTITIES = ['Lead'];
|
|
48
|
+
CreateLeadFromAddressSalesAppDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadFromAddressSalesApp';
|
|
49
|
+
CreateLeadFromAddressSalesAppDto.PERMISSION = 'schema.action.createleadfromaddresssalesapp.trigger';
|
|
50
|
+
/** Step metadata - entity this action targets */
|
|
51
|
+
CreateLeadFromAddressSalesAppDto.STEP_ENTITY = 'CrmModule:Lead';
|
|
52
|
+
CreateLeadFromAddressSalesAppDto.STEP_SCHEMA_ID = '44f23adb-9ea5-4ce1-af8f-71fd05c75615';
|
|
53
|
+
CreateLeadFromAddressSalesAppDto.STEP_SCHEMA_ACTION_ID = 'f356b018-a3dd-4010-8a14-d0fb8e20a509';
|
|
54
|
+
CreateLeadFromAddressSalesAppDto.AUTO_LINK_PARENT = true;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateLeadSalesApp Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Create Lead action (Sales App)
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity Lead
|
|
8
|
+
* @actionKey CreateLeadSalesApp
|
|
9
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for CreateLeadSalesApp created events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateLeadSalesAppMessage extends OdinRecordCreatedEvent<CreateLeadSalesAppDto, CreateLeadSalesAppProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for CreateLeadSalesApp action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 4
|
|
25
|
+
* @property Optional fields: 1
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateLeadSalesAppProperties {
|
|
28
|
+
/**
|
|
29
|
+
* Name
|
|
30
|
+
*
|
|
31
|
+
* Copy and paste address title please
|
|
32
|
+
* @type {TEXT}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
Name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Type
|
|
38
|
+
*
|
|
39
|
+
* Type of lead (Sales - Lead)
|
|
40
|
+
* @type {ENUM}
|
|
41
|
+
* @required
|
|
42
|
+
*/
|
|
43
|
+
Type: string;
|
|
44
|
+
/**
|
|
45
|
+
* Source
|
|
46
|
+
*
|
|
47
|
+
* Lead source (Sales - Lead)
|
|
48
|
+
* @type {ENUM}
|
|
49
|
+
* @required
|
|
50
|
+
*/
|
|
51
|
+
Source: string;
|
|
52
|
+
/**
|
|
53
|
+
* EmailAddress
|
|
54
|
+
*
|
|
55
|
+
* email address (Sales - Lead)
|
|
56
|
+
* @type {EMAIL}
|
|
57
|
+
* @required
|
|
58
|
+
*/
|
|
59
|
+
EmailAddress: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* CreateLeadSalesApp
|
|
63
|
+
*
|
|
64
|
+
* Create Lead action (Sales App)
|
|
65
|
+
*
|
|
66
|
+
* @actionType CREATE - Creates a new Lead record
|
|
67
|
+
* @module CrmModule
|
|
68
|
+
* @entity Lead
|
|
69
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp
|
|
70
|
+
* @permission schema.action.createleadsalesapp.trigger
|
|
71
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
72
|
+
*/
|
|
73
|
+
export declare class CreateLeadSalesAppDto extends OdinRecordCreateDto<CreateLeadSalesAppProperties> {
|
|
74
|
+
/** Used by SDK generators to identify action type */
|
|
75
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
76
|
+
static readonly ACTION_KEY = "CreateLeadSalesApp";
|
|
77
|
+
static readonly MODULE_NAME = "CrmModule";
|
|
78
|
+
static readonly ENTITIES: string[];
|
|
79
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp";
|
|
80
|
+
static readonly PERMISSION = "schema.action.createleadsalesapp.trigger";
|
|
81
|
+
/** Step metadata - entity this action targets */
|
|
82
|
+
static readonly STEP_ENTITY = "CrmModule:Lead";
|
|
83
|
+
static readonly STEP_SCHEMA_ID = "44f23adb-9ea5-4ce1-af8f-71fd05c75615";
|
|
84
|
+
static readonly STEP_SCHEMA_ACTION_ID = "ce5b1648-cf4f-4e7d-a960-cab81b1c8b5b";
|
|
85
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
86
|
+
readonly actionName: string;
|
|
87
|
+
readonly schemaActionId: string;
|
|
88
|
+
readonly entity: string;
|
|
89
|
+
constructor(properties: CreateLeadSalesAppProperties, options?: {
|
|
90
|
+
journeyId?: string;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateLeadSalesApp Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Create Lead action (Sales App)
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity Lead
|
|
9
|
+
* @actionKey CreateLeadSalesApp
|
|
10
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateLeadSalesAppDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* CreateLeadSalesApp
|
|
19
|
+
*
|
|
20
|
+
* Create Lead action (Sales App)
|
|
21
|
+
*
|
|
22
|
+
* @actionType CREATE - Creates a new Lead record
|
|
23
|
+
* @module CrmModule
|
|
24
|
+
* @entity Lead
|
|
25
|
+
* @event k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp
|
|
26
|
+
* @permission schema.action.createleadsalesapp.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class CreateLeadSalesAppDto extends core_1.OdinRecordCreateDto {
|
|
30
|
+
constructor(properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
entity: 'CrmModule:Lead',
|
|
33
|
+
type: undefined,
|
|
34
|
+
properties,
|
|
35
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
36
|
+
});
|
|
37
|
+
this.actionName = 'CreateLeadSalesApp';
|
|
38
|
+
this.schemaActionId = 'ce5b1648-cf4f-4e7d-a960-cab81b1c8b5b';
|
|
39
|
+
this.entity = 'CrmModule:Lead';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CreateLeadSalesAppDto = CreateLeadSalesAppDto;
|
|
43
|
+
/** Used by SDK generators to identify action type */
|
|
44
|
+
CreateLeadSalesAppDto.ACTION_TYPE = 'CREATE';
|
|
45
|
+
CreateLeadSalesAppDto.ACTION_KEY = 'CreateLeadSalesApp';
|
|
46
|
+
CreateLeadSalesAppDto.MODULE_NAME = 'CrmModule';
|
|
47
|
+
CreateLeadSalesAppDto.ENTITIES = ['Lead'];
|
|
48
|
+
CreateLeadSalesAppDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.Lead.Create.CreateLeadSalesApp';
|
|
49
|
+
CreateLeadSalesAppDto.PERMISSION = 'schema.action.createleadsalesapp.trigger';
|
|
50
|
+
/** Step metadata - entity this action targets */
|
|
51
|
+
CreateLeadSalesAppDto.STEP_ENTITY = 'CrmModule:Lead';
|
|
52
|
+
CreateLeadSalesAppDto.STEP_SCHEMA_ID = '44f23adb-9ea5-4ce1-af8f-71fd05c75615';
|
|
53
|
+
CreateLeadSalesAppDto.STEP_SCHEMA_ACTION_ID = 'ce5b1648-cf4f-4e7d-a960-cab81b1c8b5b';
|
|
54
|
+
CreateLeadSalesAppDto.AUTO_LINK_PARENT = true;
|
|
@@ -25,6 +25,7 @@ export declare class EmailApi extends ApiProvider {
|
|
|
25
25
|
private _case?;
|
|
26
26
|
private _file?;
|
|
27
27
|
private _workorder?;
|
|
28
|
+
private _order?;
|
|
28
29
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
29
30
|
get referral(): ApiRecordLinkManager;
|
|
30
31
|
get emailsender(): ApiRecordLinkManager;
|
|
@@ -34,6 +35,7 @@ export declare class EmailApi extends ApiProvider {
|
|
|
34
35
|
get case(): ApiRecordLinkManager;
|
|
35
36
|
get file(): ApiRecordLinkManager;
|
|
36
37
|
get workorder(): ApiRecordLinkManager;
|
|
38
|
+
get order(): ApiRecordLinkManager;
|
|
37
39
|
setRecord(sourceRecord: any): void;
|
|
38
40
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
39
41
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<EmailProperties>>>;
|
|
@@ -81,6 +81,12 @@ class EmailApi extends api_provider_1.ApiProvider {
|
|
|
81
81
|
}
|
|
82
82
|
return this._workorder;
|
|
83
83
|
}
|
|
84
|
+
get order() {
|
|
85
|
+
if (!this._order) {
|
|
86
|
+
this._order = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'NotificationModule:Email', 'OrderModule:Order', 'Order__Email');
|
|
87
|
+
}
|
|
88
|
+
return this._order;
|
|
89
|
+
}
|
|
84
90
|
// ============================================
|
|
85
91
|
// STANDARD METHODS (Unchanged API)
|
|
86
92
|
// ============================================
|
|
@@ -58,6 +58,7 @@ export declare class OrderApi extends ApiProvider {
|
|
|
58
58
|
private _recontract?;
|
|
59
59
|
private _dataissue?;
|
|
60
60
|
private _workorder?;
|
|
61
|
+
private _email?;
|
|
61
62
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
62
63
|
get note(): ApiRecordLinkManager;
|
|
63
64
|
get lead(): ApiRecordLinkManager;
|
|
@@ -100,6 +101,7 @@ export declare class OrderApi extends ApiProvider {
|
|
|
100
101
|
get recontract(): ApiRecordLinkManager;
|
|
101
102
|
get dataissue(): ApiRecordLinkManager;
|
|
102
103
|
get workorder(): ApiRecordLinkManager;
|
|
104
|
+
get email(): ApiRecordLinkManager;
|
|
103
105
|
setRecord(sourceRecord: any): void;
|
|
104
106
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
105
107
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<OrderProperties>>>;
|
|
@@ -279,6 +279,12 @@ class OrderApi extends api_provider_1.ApiProvider {
|
|
|
279
279
|
}
|
|
280
280
|
return this._workorder;
|
|
281
281
|
}
|
|
282
|
+
get email() {
|
|
283
|
+
if (!this._email) {
|
|
284
|
+
this._email = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'OrderModule:Order', 'NotificationModule:Email', 'Order__Email');
|
|
285
|
+
}
|
|
286
|
+
return this._email;
|
|
287
|
+
}
|
|
282
288
|
// ============================================
|
|
283
289
|
// STANDARD METHODS (Unchanged API)
|
|
284
290
|
// ============================================
|
|
@@ -29,6 +29,7 @@ export declare class EmailDb extends DbProvider {
|
|
|
29
29
|
private _case?;
|
|
30
30
|
private _file?;
|
|
31
31
|
private _workorder?;
|
|
32
|
+
private _order?;
|
|
32
33
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
33
34
|
get referral(): DbRecordLinkManager;
|
|
34
35
|
get emailsender(): DbRecordLinkManager;
|
|
@@ -38,6 +39,7 @@ export declare class EmailDb extends DbProvider {
|
|
|
38
39
|
get case(): DbRecordLinkManager;
|
|
39
40
|
get file(): DbRecordLinkManager;
|
|
40
41
|
get workorder(): DbRecordLinkManager;
|
|
42
|
+
get order(): DbRecordLinkManager;
|
|
41
43
|
setRecord(sourceRecord: any): void;
|
|
42
44
|
/**
|
|
43
45
|
* Search records with manual pagination control
|
|
@@ -86,6 +86,12 @@ class EmailDb extends db_provider_1.DbProvider {
|
|
|
86
86
|
}
|
|
87
87
|
return this._workorder;
|
|
88
88
|
}
|
|
89
|
+
get order() {
|
|
90
|
+
if (!this._order) {
|
|
91
|
+
this._order = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'NotificationModule:Email', 'OrderModule:Order', 'Order__Email');
|
|
92
|
+
}
|
|
93
|
+
return this._order;
|
|
94
|
+
}
|
|
89
95
|
// ============================================
|
|
90
96
|
// STANDARD METHODS
|
|
91
97
|
// ============================================
|
|
@@ -62,6 +62,7 @@ export declare class OrderDb extends DbProvider {
|
|
|
62
62
|
private _recontract?;
|
|
63
63
|
private _dataissue?;
|
|
64
64
|
private _workorder?;
|
|
65
|
+
private _email?;
|
|
65
66
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
66
67
|
get note(): DbRecordLinkManager;
|
|
67
68
|
get lead(): DbRecordLinkManager;
|
|
@@ -104,6 +105,7 @@ export declare class OrderDb extends DbProvider {
|
|
|
104
105
|
get recontract(): DbRecordLinkManager;
|
|
105
106
|
get dataissue(): DbRecordLinkManager;
|
|
106
107
|
get workorder(): DbRecordLinkManager;
|
|
108
|
+
get email(): DbRecordLinkManager;
|
|
107
109
|
setRecord(sourceRecord: any): void;
|
|
108
110
|
/**
|
|
109
111
|
* Search records with manual pagination control
|
|
@@ -284,6 +284,12 @@ class OrderDb extends db_provider_1.DbProvider {
|
|
|
284
284
|
}
|
|
285
285
|
return this._workorder;
|
|
286
286
|
}
|
|
287
|
+
get email() {
|
|
288
|
+
if (!this._email) {
|
|
289
|
+
this._email = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'OrderModule:Order', 'NotificationModule:Email', 'Order__Email');
|
|
290
|
+
}
|
|
291
|
+
return this._email;
|
|
292
|
+
}
|
|
287
293
|
// ============================================
|
|
288
294
|
// STANDARD METHODS
|
|
289
295
|
// ============================================
|
|
@@ -19,6 +19,21 @@ export declare enum AgentStatusEntityTypes {
|
|
|
19
19
|
/** This is the default record type */
|
|
20
20
|
DEFAULT = "DEFAULT"
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Valid values for AgentStatus.Source
|
|
24
|
+
*
|
|
25
|
+
* What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change.
|
|
26
|
+
*
|
|
27
|
+
* @remarks Available options:
|
|
28
|
+
* - `Manual` - Manual agent selection
|
|
29
|
+
* - `System` - System-generated change
|
|
30
|
+
* - `Voice` - Voice or Twilio event
|
|
31
|
+
*/
|
|
32
|
+
export declare enum AgentStatusSource {
|
|
33
|
+
MANUAL_AGENT_SELECTION = "Manual",
|
|
34
|
+
SYSTEM_GENERATED_CHANGE = "System",
|
|
35
|
+
VOICE_OR_TWILIO_EVENT = "Voice"
|
|
36
|
+
}
|
|
22
37
|
/**
|
|
23
38
|
* Valid values for AgentStatus.Status
|
|
24
39
|
*
|
|
@@ -85,38 +100,23 @@ export declare enum AgentStatusPreviousStatus {
|
|
|
85
100
|
UNAVAILABLE = "Unavailable",
|
|
86
101
|
UNPLANNED_BREAK = "Unplanned Break"
|
|
87
102
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Valid values for AgentStatus.Source
|
|
90
|
-
*
|
|
91
|
-
* What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change.
|
|
92
|
-
*
|
|
93
|
-
* @remarks Available options:
|
|
94
|
-
* - `Manual` - Manual agent selection
|
|
95
|
-
* - `System` - System-generated change
|
|
96
|
-
* - `Voice` - Voice or Twilio event
|
|
97
|
-
*/
|
|
98
|
-
export declare enum AgentStatusSource {
|
|
99
|
-
MANUAL_AGENT_SELECTION = "Manual",
|
|
100
|
-
SYSTEM_GENERATED_CHANGE = "System",
|
|
101
|
-
VOICE_OR_TWILIO_EVENT = "Voice"
|
|
102
|
-
}
|
|
103
103
|
/**
|
|
104
104
|
* Property keys for AgentStatus
|
|
105
105
|
* Use these constants instead of string literals for type safety
|
|
106
106
|
*/
|
|
107
107
|
export declare enum AgentStatusPropertyKeys {
|
|
108
|
+
/** What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change. */
|
|
109
|
+
Source = "Source",
|
|
108
110
|
/** The Odin user this status belongs to. One AgentStatus row per user (UNIQUE) — the natural key upsertOnCreate upserts against. */
|
|
109
111
|
UserId = "UserId",
|
|
110
112
|
/** Current channel-agnostic availability status. Values mirror TwilioActivity.Name. */
|
|
111
113
|
Status = "Status",
|
|
112
|
-
/** The status immediately before the current one. Null on a user’s first-ever status write. */
|
|
113
|
-
PreviousStatus = "PreviousStatus",
|
|
114
114
|
/** Whether this user’s Odin status should sync to their Twilio Worker. Phase 1: stored only, never read by any sync (no Twilio calls happen yet) — the field exists now so Phase 2 does not need a schema change to turn sync on. */
|
|
115
115
|
VoiceEnabled = "VoiceEnabled",
|
|
116
|
+
/** The status immediately before the current one. Null on a user’s first-ever status write. */
|
|
117
|
+
PreviousStatus = "PreviousStatus",
|
|
116
118
|
/** When the current Status began. Reset on every status change. */
|
|
117
|
-
StatusStartedAt = "StatusStartedAt"
|
|
118
|
-
/** What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change. */
|
|
119
|
-
Source = "Source"
|
|
119
|
+
StatusStartedAt = "StatusStartedAt"
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Properties for AgentStatus records
|
|
@@ -124,6 +124,13 @@ export declare enum AgentStatusPropertyKeys {
|
|
|
124
124
|
* @see SupportModule:AgentStatus
|
|
125
125
|
*/
|
|
126
126
|
export interface AgentStatusProperties {
|
|
127
|
+
/** What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change.
|
|
128
|
+
*
|
|
129
|
+
* @type {ENUM}
|
|
130
|
+
* @default Manual
|
|
131
|
+
* @enum {AgentStatusSource}
|
|
132
|
+
*/
|
|
133
|
+
Source: AgentStatusSource;
|
|
127
134
|
/** The Odin user this status belongs to. One AgentStatus row per user (UNIQUE) — the natural key upsertOnCreate upserts against.
|
|
128
135
|
*
|
|
129
136
|
* @type {LOOKUP}
|
|
@@ -137,6 +144,12 @@ export interface AgentStatusProperties {
|
|
|
137
144
|
* @enum {AgentStatusStatus}
|
|
138
145
|
*/
|
|
139
146
|
Status: AgentStatusStatus;
|
|
147
|
+
/** Whether this user’s Odin status should sync to their Twilio Worker. Phase 1: stored only, never read by any sync (no Twilio calls happen yet) — the field exists now so Phase 2 does not need a schema change to turn sync on.
|
|
148
|
+
*
|
|
149
|
+
* @type {BOOLEAN}
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
VoiceEnabled: boolean;
|
|
140
153
|
/** The status immediately before the current one. Null on a user’s first-ever status write.
|
|
141
154
|
*
|
|
142
155
|
* @type {ENUM}
|
|
@@ -144,25 +157,12 @@ export interface AgentStatusProperties {
|
|
|
144
157
|
* @enum {AgentStatusPreviousStatus}
|
|
145
158
|
*/
|
|
146
159
|
PreviousStatus: AgentStatusPreviousStatus;
|
|
147
|
-
/** Whether this user’s Odin status should sync to their Twilio Worker. Phase 1: stored only, never read by any sync (no Twilio calls happen yet) — the field exists now so Phase 2 does not need a schema change to turn sync on.
|
|
148
|
-
*
|
|
149
|
-
* @type {BOOLEAN}
|
|
150
|
-
* @default false
|
|
151
|
-
*/
|
|
152
|
-
VoiceEnabled: boolean;
|
|
153
160
|
/** When the current Status began. Reset on every status change.
|
|
154
161
|
*
|
|
155
162
|
* @type {DATE_TIME}
|
|
156
163
|
* @default
|
|
157
164
|
*/
|
|
158
165
|
StatusStartedAt: string;
|
|
159
|
-
/** What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change.
|
|
160
|
-
*
|
|
161
|
-
* @type {ENUM}
|
|
162
|
-
* @default Manual
|
|
163
|
-
* @enum {AgentStatusSource}
|
|
164
|
-
*/
|
|
165
|
-
Source: AgentStatusSource;
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* AgentStatus entity from SupportModule
|
|
@@ -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_AGENT_STATUS_USER_DELETED = exports.ROUTING_KEY_LINK_AGENT_STATUS_USER_CREATED = exports.ROUTING_KEY_AGENT_STATUS_DEFAULT_DELETED = exports.ROUTING_KEY_AGENT_STATUS_DEFAULT_UPDATED = exports.ROUTING_KEY_AGENT_STATUS_DEFAULT_CREATED = exports.ROUTING_KEY_AGENT_STATUS_DELETED = exports.ROUTING_KEY_AGENT_STATUS_UPDATED = exports.ROUTING_KEY_AGENT_STATUS_CREATED = exports.AgentStatus = exports.AgentStatusPropertyKeys = exports.
|
|
15
|
+
exports.ROUTING_KEY_LINK_AGENT_STATUS_USER_DELETED = exports.ROUTING_KEY_LINK_AGENT_STATUS_USER_CREATED = exports.ROUTING_KEY_AGENT_STATUS_DEFAULT_DELETED = exports.ROUTING_KEY_AGENT_STATUS_DEFAULT_UPDATED = exports.ROUTING_KEY_AGENT_STATUS_DEFAULT_CREATED = exports.ROUTING_KEY_AGENT_STATUS_DELETED = exports.ROUTING_KEY_AGENT_STATUS_UPDATED = exports.ROUTING_KEY_AGENT_STATUS_CREATED = exports.AgentStatus = exports.AgentStatusPropertyKeys = exports.AgentStatusPreviousStatus = exports.AgentStatusStatus = exports.AgentStatusSource = exports.AgentStatusEntityTypes = void 0;
|
|
16
16
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
17
|
/**
|
|
18
18
|
* Available types for AgentStatus records
|
|
@@ -22,6 +22,22 @@ var AgentStatusEntityTypes;
|
|
|
22
22
|
/** This is the default record type */
|
|
23
23
|
AgentStatusEntityTypes["DEFAULT"] = "DEFAULT";
|
|
24
24
|
})(AgentStatusEntityTypes = exports.AgentStatusEntityTypes || (exports.AgentStatusEntityTypes = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Valid values for AgentStatus.Source
|
|
27
|
+
*
|
|
28
|
+
* What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change.
|
|
29
|
+
*
|
|
30
|
+
* @remarks Available options:
|
|
31
|
+
* - `Manual` - Manual agent selection
|
|
32
|
+
* - `System` - System-generated change
|
|
33
|
+
* - `Voice` - Voice or Twilio event
|
|
34
|
+
*/
|
|
35
|
+
var AgentStatusSource;
|
|
36
|
+
(function (AgentStatusSource) {
|
|
37
|
+
AgentStatusSource["MANUAL_AGENT_SELECTION"] = "Manual";
|
|
38
|
+
AgentStatusSource["SYSTEM_GENERATED_CHANGE"] = "System";
|
|
39
|
+
AgentStatusSource["VOICE_OR_TWILIO_EVENT"] = "Voice";
|
|
40
|
+
})(AgentStatusSource = exports.AgentStatusSource || (exports.AgentStatusSource = {}));
|
|
25
41
|
/**
|
|
26
42
|
* Valid values for AgentStatus.Status
|
|
27
43
|
*
|
|
@@ -90,40 +106,24 @@ var AgentStatusPreviousStatus;
|
|
|
90
106
|
AgentStatusPreviousStatus["UNAVAILABLE"] = "Unavailable";
|
|
91
107
|
AgentStatusPreviousStatus["UNPLANNED_BREAK"] = "Unplanned Break";
|
|
92
108
|
})(AgentStatusPreviousStatus = exports.AgentStatusPreviousStatus || (exports.AgentStatusPreviousStatus = {}));
|
|
93
|
-
/**
|
|
94
|
-
* Valid values for AgentStatus.Source
|
|
95
|
-
*
|
|
96
|
-
* What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change.
|
|
97
|
-
*
|
|
98
|
-
* @remarks Available options:
|
|
99
|
-
* - `Manual` - Manual agent selection
|
|
100
|
-
* - `System` - System-generated change
|
|
101
|
-
* - `Voice` - Voice or Twilio event
|
|
102
|
-
*/
|
|
103
|
-
var AgentStatusSource;
|
|
104
|
-
(function (AgentStatusSource) {
|
|
105
|
-
AgentStatusSource["MANUAL_AGENT_SELECTION"] = "Manual";
|
|
106
|
-
AgentStatusSource["SYSTEM_GENERATED_CHANGE"] = "System";
|
|
107
|
-
AgentStatusSource["VOICE_OR_TWILIO_EVENT"] = "Voice";
|
|
108
|
-
})(AgentStatusSource = exports.AgentStatusSource || (exports.AgentStatusSource = {}));
|
|
109
109
|
/**
|
|
110
110
|
* Property keys for AgentStatus
|
|
111
111
|
* Use these constants instead of string literals for type safety
|
|
112
112
|
*/
|
|
113
113
|
var AgentStatusPropertyKeys;
|
|
114
114
|
(function (AgentStatusPropertyKeys) {
|
|
115
|
+
/** What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change. */
|
|
116
|
+
AgentStatusPropertyKeys["Source"] = "Source";
|
|
115
117
|
/** The Odin user this status belongs to. One AgentStatus row per user (UNIQUE) — the natural key upsertOnCreate upserts against. */
|
|
116
118
|
AgentStatusPropertyKeys["UserId"] = "UserId";
|
|
117
119
|
/** Current channel-agnostic availability status. Values mirror TwilioActivity.Name. */
|
|
118
120
|
AgentStatusPropertyKeys["Status"] = "Status";
|
|
119
|
-
/** The status immediately before the current one. Null on a user’s first-ever status write. */
|
|
120
|
-
AgentStatusPropertyKeys["PreviousStatus"] = "PreviousStatus";
|
|
121
121
|
/** Whether this user’s Odin status should sync to their Twilio Worker. Phase 1: stored only, never read by any sync (no Twilio calls happen yet) — the field exists now so Phase 2 does not need a schema change to turn sync on. */
|
|
122
122
|
AgentStatusPropertyKeys["VoiceEnabled"] = "VoiceEnabled";
|
|
123
|
+
/** The status immediately before the current one. Null on a user’s first-ever status write. */
|
|
124
|
+
AgentStatusPropertyKeys["PreviousStatus"] = "PreviousStatus";
|
|
123
125
|
/** When the current Status began. Reset on every status change. */
|
|
124
126
|
AgentStatusPropertyKeys["StatusStartedAt"] = "StatusStartedAt";
|
|
125
|
-
/** What triggered the current Status: manual agent selection, a voice/Twilio event, or a system-generated change. */
|
|
126
|
-
AgentStatusPropertyKeys["Source"] = "Source";
|
|
127
127
|
})(AgentStatusPropertyKeys = exports.AgentStatusPropertyKeys || (exports.AgentStatusPropertyKeys = {}));
|
|
128
128
|
/**
|
|
129
129
|
* AgentStatus entity from SupportModule
|
|
@@ -18,6 +18,7 @@ import { UserProperties } from './User';
|
|
|
18
18
|
import { CaseProperties } from './Case';
|
|
19
19
|
import { FileProperties } from './File';
|
|
20
20
|
import { WorkOrderProperties } from './WorkOrder';
|
|
21
|
+
import { OrderProperties } from './Order';
|
|
21
22
|
/**
|
|
22
23
|
* Available types for Email records
|
|
23
24
|
*/
|
|
@@ -737,6 +738,8 @@ export declare class Email extends OdinRecord<EmailProperties> {
|
|
|
737
738
|
File: OdinLink<LinkedOdinRecord<FileProperties>>;
|
|
738
739
|
/** Linked WorkOrder records (WorkOrder__Email) */
|
|
739
740
|
WorkOrder: OdinLink<LinkedOdinRecord<WorkOrderProperties>>;
|
|
741
|
+
/** Linked Order records (Order__Email) */
|
|
742
|
+
Order: OdinLink<LinkedOdinRecord<OrderProperties>>;
|
|
740
743
|
}
|
|
741
744
|
/**
|
|
742
745
|
* RabbitMQ routing keys for Email events
|
|
@@ -50,6 +50,7 @@ import { ContactProperties } from './Contact';
|
|
|
50
50
|
import { RecontractProperties } from './Recontract';
|
|
51
51
|
import { DataIssueProperties } from './DataIssue';
|
|
52
52
|
import { WorkOrderProperties } from './WorkOrder';
|
|
53
|
+
import { EmailProperties } from './Email';
|
|
53
54
|
/**
|
|
54
55
|
* Available types for Order records
|
|
55
56
|
*/
|
|
@@ -1324,6 +1325,8 @@ export declare class Order extends OdinRecord<OrderProperties> {
|
|
|
1324
1325
|
DataIssue: OdinLink<LinkedOdinRecord<DataIssueProperties>>;
|
|
1325
1326
|
/** Linked WorkOrder records (Order__WorkOrder) */
|
|
1326
1327
|
WorkOrder: OdinLink<LinkedOdinRecord<WorkOrderProperties>>;
|
|
1328
|
+
/** Linked Email records (Order__Email) */
|
|
1329
|
+
Email: OdinLink<LinkedOdinRecord<EmailProperties>>;
|
|
1327
1330
|
}
|
|
1328
1331
|
/**
|
|
1329
1332
|
* RabbitMQ routing keys for Order events
|
|
@@ -1441,3 +1444,7 @@ export declare const ROUTING_KEY_LINK_ORDER_CONTACT_DELETED = "OrderModule.Order
|
|
|
1441
1444
|
export declare const ROUTING_KEY_LINK_ORDER_WORK_ORDER_CREATED = "OrderModule.Order.WorkOrder.SubDbRecordAssociationCreated";
|
|
1442
1445
|
/** Event: Order__WorkOrder link deleted */
|
|
1443
1446
|
export declare const ROUTING_KEY_LINK_ORDER_WORK_ORDER_DELETED = "OrderModule.Order.WorkOrder.SubDbRecordAssociationDeleted";
|
|
1447
|
+
/** Event: Order__Email link created */
|
|
1448
|
+
export declare const ROUTING_KEY_LINK_ORDER_EMAIL_CREATED = "OrderModule.Order.Email.SubDbRecordAssociationCreated";
|
|
1449
|
+
/** Event: Order__Email link deleted */
|
|
1450
|
+
export declare const ROUTING_KEY_LINK_ORDER_EMAIL_DELETED = "OrderModule.Order.Email.SubDbRecordAssociationDeleted";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ROUTING_KEY_LINK_ORDER_APPOINTMENT_DELETED = exports.ROUTING_KEY_LINK_ORDER_APPOINTMENT_CREATED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ROUTER_DELETED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ROUTER_CREATED = exports.ROUTING_KEY_LINK_ORDER_SMS_MESSAGE_DELETED = exports.ROUTING_KEY_LINK_ORDER_SMS_MESSAGE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CREATED = exports.ROUTING_KEY_LINK_ORDER_FILE_DELETED = exports.ROUTING_KEY_LINK_ORDER_FILE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_ITEM_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_ITEM_CREATED = exports.ROUTING_KEY_LINK_ORDER_BILLING_ADJUSTMENT_DELETED = exports.ROUTING_KEY_LINK_ORDER_BILLING_ADJUSTMENT_CREATED = exports.ROUTING_KEY_LINK_ORDER_PUSH_NOTIFICATION_DELETED = exports.ROUTING_KEY_LINK_ORDER_PUSH_NOTIFICATION_CREATED = exports.ROUTING_KEY_LINK_ORDER_DISCOUNT_DELETED = exports.ROUTING_KEY_LINK_ORDER_DISCOUNT_CREATED = exports.ROUTING_KEY_LINK_ORDER_ADDRESS_DELETED = exports.ROUTING_KEY_LINK_ORDER_ADDRESS_CREATED = exports.ROUTING_KEY_LINK_ORDER_PHONE_NUMBER_DELETED = exports.ROUTING_KEY_LINK_ORDER_PHONE_NUMBER_CREATED = exports.ROUTING_KEY_LINK_ORDER_NOTE_DELETED = exports.ROUTING_KEY_LINK_ORDER_NOTE_CREATED = exports.ROUTING_KEY_ORDER_DEFAULT_DELETED = exports.ROUTING_KEY_ORDER_DEFAULT_UPDATED = exports.ROUTING_KEY_ORDER_DEFAULT_CREATED = exports.ROUTING_KEY_ORDER_DELETED = exports.ROUTING_KEY_ORDER_UPDATED = exports.ROUTING_KEY_ORDER_CREATED = exports.Order = exports.OrderPropertyKeys = exports.OrderActivationStatus = exports.OrderSupplierOrderType = exports.OrderOtsNotRequiredReason = exports.OrderBatteryPackRequired = exports.OrderMobileCoverage = exports.OrderAltContactMethod = exports.OrderProvider = exports.OrderBillingTerms = exports.OrderDeactivationReason = exports.OrderDiscountType = exports.OrderWithholdCommissionReason = exports.OrderDiscountUnit = exports.OrderTrialUnit = exports.OrderContractType = exports.OrderCurrencyCode = exports.DefaultOrderStageKeys = exports.DefaultOrderStageNames = exports.OrderEntityTypes = void 0;
|
|
16
|
-
exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_CREATED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_CREATED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_CREATED = exports.ROUTING_KEY_LINK_ORDER_VISIT_DELETED = exports.ROUTING_KEY_LINK_ORDER_VISIT_CREATED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_DELETED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_CREATED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_DELETED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_CREATED = void 0;
|
|
16
|
+
exports.ROUTING_KEY_LINK_ORDER_EMAIL_DELETED = exports.ROUTING_KEY_LINK_ORDER_EMAIL_CREATED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_CREATED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ORDER_INVOICE_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_LOG_CREATED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_ACTIVITY_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_CHECK_CREATED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CUSTOMER_DEVICE_ONT_CREATED = exports.ROUTING_KEY_LINK_ORDER_VISIT_DELETED = exports.ROUTING_KEY_LINK_ORDER_VISIT_CREATED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_DELETED = exports.ROUTING_KEY_LINK_ORDER_COMMISSION_CREATED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_DELETED = exports.ROUTING_KEY_LINK_ORDER_ORDER_KCI_CREATED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_DELETED = exports.ROUTING_KEY_LINK_ORDER_REFERRAL_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTRACT_BUY_OUT_CREATED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_DELETED = exports.ROUTING_KEY_LINK_ORDER_CONTACT_IDENTITY_CREATED = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
18
|
/**
|
|
19
19
|
* Available types for Order records
|
|
@@ -695,3 +695,7 @@ exports.ROUTING_KEY_LINK_ORDER_CONTACT_DELETED = 'OrderModule.Order.Contact.SubD
|
|
|
695
695
|
exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_CREATED = 'OrderModule.Order.WorkOrder.SubDbRecordAssociationCreated';
|
|
696
696
|
/** Event: Order__WorkOrder link deleted */
|
|
697
697
|
exports.ROUTING_KEY_LINK_ORDER_WORK_ORDER_DELETED = 'OrderModule.Order.WorkOrder.SubDbRecordAssociationDeleted';
|
|
698
|
+
/** Event: Order__Email link created */
|
|
699
|
+
exports.ROUTING_KEY_LINK_ORDER_EMAIL_CREATED = 'OrderModule.Order.Email.SubDbRecordAssociationCreated';
|
|
700
|
+
/** Event: Order__Email link deleted */
|
|
701
|
+
exports.ROUTING_KEY_LINK_ORDER_EMAIL_DELETED = 'OrderModule.Order.Email.SubDbRecordAssociationDeleted';
|
|
@@ -23,6 +23,7 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
23
23
|
import { ContactProperties } from '../entities-v2/Contact';
|
|
24
24
|
import { CreateCaseProperties } from '../actions-v2/CreateCaseFromContactDto';
|
|
25
25
|
import { CreateContactProperties } from '../actions-v2/CreateContactDto';
|
|
26
|
+
import { CreateContactSalesAppProperties } from '../actions-v2/CreateContactSalesAppDto';
|
|
26
27
|
import { UpdateAdditionalCareProperties } from '../actions-v2/UpdateAdditionalCareDto';
|
|
27
28
|
import { UpdateContactProperties } from '../actions-v2/UpdateContactDto';
|
|
28
29
|
import { UpdateReferralCodeProperties } from '../actions-v2/UpdateReferralCodeDto';
|
|
@@ -766,6 +767,34 @@ export declare class ContactRecord<TProps = ContactProperties> {
|
|
|
766
767
|
journeyId?: string;
|
|
767
768
|
stageKey?: string;
|
|
768
769
|
}): ActionBuilder;
|
|
770
|
+
/**
|
|
771
|
+
* CreateContactSalesApp
|
|
772
|
+
*
|
|
773
|
+
* Creates a new Contact record with the specified properties.
|
|
774
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
775
|
+
*
|
|
776
|
+
* @param properties - The properties for the new record
|
|
777
|
+
* @param options - Optional settings
|
|
778
|
+
* @param options.type - Override the record type
|
|
779
|
+
* @param options.journeyId - Associate with a journey
|
|
780
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
781
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
782
|
+
*
|
|
783
|
+
* @example
|
|
784
|
+
* ```typescript
|
|
785
|
+
* // Create with properties
|
|
786
|
+
* const record = odinClient.contacts.new();
|
|
787
|
+
* await record.createContactSalesApp({ ... }).execute();
|
|
788
|
+
*
|
|
789
|
+
* // Dry run (for debugging)
|
|
790
|
+
* const payload = record.createContactSalesApp({ ... }).dryRun();
|
|
791
|
+
* ```
|
|
792
|
+
*/
|
|
793
|
+
createContactSalesApp(properties: CreateContactSalesAppProperties, options?: {
|
|
794
|
+
type?: string;
|
|
795
|
+
journeyId?: string;
|
|
796
|
+
stageKey?: string;
|
|
797
|
+
}): ActionBuilder;
|
|
769
798
|
/**
|
|
770
799
|
* CreateCaseFromContact
|
|
771
800
|
*
|
|
@@ -1155,6 +1155,42 @@ class ContactRecord {
|
|
|
1155
1155
|
};
|
|
1156
1156
|
return new ActionBuilder(this._provider, 'CrmModule', 'Contact', payload, () => { this._pendingLinks = []; });
|
|
1157
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* CreateContactSalesApp
|
|
1160
|
+
*
|
|
1161
|
+
* Creates a new Contact record with the specified properties.
|
|
1162
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1163
|
+
*
|
|
1164
|
+
* @param properties - The properties for the new record
|
|
1165
|
+
* @param options - Optional settings
|
|
1166
|
+
* @param options.type - Override the record type
|
|
1167
|
+
* @param options.journeyId - Associate with a journey
|
|
1168
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
1169
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1170
|
+
*
|
|
1171
|
+
* @example
|
|
1172
|
+
* ```typescript
|
|
1173
|
+
* // Create with properties
|
|
1174
|
+
* const record = odinClient.contacts.new();
|
|
1175
|
+
* await record.createContactSalesApp({ ... }).execute();
|
|
1176
|
+
*
|
|
1177
|
+
* // Dry run (for debugging)
|
|
1178
|
+
* const payload = record.createContactSalesApp({ ... }).dryRun();
|
|
1179
|
+
* ```
|
|
1180
|
+
*/
|
|
1181
|
+
createContactSalesApp(properties, options) {
|
|
1182
|
+
var _a, _b;
|
|
1183
|
+
const payload = {
|
|
1184
|
+
entity: 'CrmModule:Contact',
|
|
1185
|
+
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
|
|
1186
|
+
actionName: 'CreateContactSalesApp',
|
|
1187
|
+
properties: properties || {},
|
|
1188
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
1189
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
1190
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
1191
|
+
};
|
|
1192
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'Contact', payload, () => { this._pendingLinks = []; });
|
|
1193
|
+
}
|
|
1158
1194
|
// ============================================
|
|
1159
1195
|
// UPDATE ACTIONS (require existing record)
|
|
1160
1196
|
// ============================================
|
|
@@ -95,6 +95,7 @@ import { UserRecord } from './UserRecord';
|
|
|
95
95
|
import { CaseRecord } from './CaseRecord';
|
|
96
96
|
import { FileRecord } from './FileRecord';
|
|
97
97
|
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
98
|
+
import { OrderRecord } from './OrderRecord';
|
|
98
99
|
/** Valid entity types for Email */
|
|
99
100
|
export declare type EmailType = 'DEFAULT' | 'REFERRAL' | 'SUPPORT' | 'TRANSACTIONAL';
|
|
100
101
|
/**
|
|
@@ -168,6 +169,7 @@ export declare class EmailRecord<TProps = EmailProperties> {
|
|
|
168
169
|
private _cases?;
|
|
169
170
|
private _files?;
|
|
170
171
|
private _workOrders?;
|
|
172
|
+
private _orders?;
|
|
171
173
|
/**
|
|
172
174
|
* Create a record wrapper.
|
|
173
175
|
* @param record - The underlying record, or null for create operations
|
|
@@ -403,6 +405,24 @@ export declare class EmailRecord<TProps = EmailProperties> {
|
|
|
403
405
|
* ```
|
|
404
406
|
*/
|
|
405
407
|
get workOrders(): RecordLinkManager<WorkOrderRecord, typeof EmailRecord['workOrdersLabels'][number]>;
|
|
408
|
+
/** Valid labels for Order associations */
|
|
409
|
+
static readonly ordersLabels: readonly ["Order__Email"];
|
|
410
|
+
/**
|
|
411
|
+
* Access linked Order records
|
|
412
|
+
* @remarks Available labels: Order__Email
|
|
413
|
+
* @throws Error if called on a new (unsaved) record
|
|
414
|
+
*
|
|
415
|
+
* @example
|
|
416
|
+
* ```typescript
|
|
417
|
+
* // Get all linked Order records
|
|
418
|
+
* const items = await record.orders.list();
|
|
419
|
+
* const first = await record.orders.first();
|
|
420
|
+
*
|
|
421
|
+
* // Filter by label
|
|
422
|
+
* const specific = await record.orders.first({ label: 'Order__Email' });
|
|
423
|
+
* ```
|
|
424
|
+
*/
|
|
425
|
+
get orders(): RecordLinkManager<OrderRecord, typeof EmailRecord['ordersLabels'][number]>;
|
|
406
426
|
/**
|
|
407
427
|
* Queue a link to be created with the next action.
|
|
408
428
|
* Works for both create and update actions.
|
|
@@ -39,6 +39,7 @@ const UserRecord_1 = require("./UserRecord");
|
|
|
39
39
|
const CaseRecord_1 = require("./CaseRecord");
|
|
40
40
|
const FileRecord_1 = require("./FileRecord");
|
|
41
41
|
const WorkOrderRecord_1 = require("./WorkOrderRecord");
|
|
42
|
+
const OrderRecord_1 = require("./OrderRecord");
|
|
42
43
|
/**
|
|
43
44
|
* Builder for action execution with dryRun support
|
|
44
45
|
*
|
|
@@ -458,6 +459,36 @@ class EmailRecord {
|
|
|
458
459
|
}
|
|
459
460
|
return this._workOrders;
|
|
460
461
|
}
|
|
462
|
+
/**
|
|
463
|
+
* Access linked Order records
|
|
464
|
+
* @remarks Available labels: Order__Email
|
|
465
|
+
* @throws Error if called on a new (unsaved) record
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```typescript
|
|
469
|
+
* // Get all linked Order records
|
|
470
|
+
* const items = await record.orders.list();
|
|
471
|
+
* const first = await record.orders.first();
|
|
472
|
+
*
|
|
473
|
+
* // Filter by label
|
|
474
|
+
* const specific = await record.orders.first({ label: 'Order__Email' });
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
get orders() {
|
|
478
|
+
var _a;
|
|
479
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
480
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
481
|
+
if (!this._orders) {
|
|
482
|
+
this._orders = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
483
|
+
sourceEntity: 'NotificationModule:Email',
|
|
484
|
+
targetEntity: 'OrderModule:Order',
|
|
485
|
+
targetModuleName: 'OrderModule',
|
|
486
|
+
targetEntityName: 'Order',
|
|
487
|
+
labels: ['Order__Email'],
|
|
488
|
+
}, OrderRecord_1.OrderRecord);
|
|
489
|
+
}
|
|
490
|
+
return this._orders;
|
|
491
|
+
}
|
|
461
492
|
// ============================================
|
|
462
493
|
// LINK MANAGEMENT
|
|
463
494
|
// ============================================
|
|
@@ -2858,6 +2889,8 @@ EmailRecord.casesLabels = ['Case__Email'];
|
|
|
2858
2889
|
EmailRecord.filesLabels = ['Attachments'];
|
|
2859
2890
|
/** Valid labels for WorkOrder associations */
|
|
2860
2891
|
EmailRecord.workOrdersLabels = ['WorkOrder__Email'];
|
|
2892
|
+
/** Valid labels for Order associations */
|
|
2893
|
+
EmailRecord.ordersLabels = ['Order__Email'];
|
|
2861
2894
|
/** Type guard to check if an object is a EmailRecord */
|
|
2862
2895
|
function isEmailRecord(obj) {
|
|
2863
2896
|
return obj instanceof EmailRecord;
|
|
@@ -22,6 +22,8 @@ import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
|
22
22
|
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
23
23
|
import { LeadProperties } from '../entities-v2/Lead';
|
|
24
24
|
import { CreateLeadProperties } from '../actions-v2/CreateLeadDto';
|
|
25
|
+
import { CreateLeadFromAddressSalesAppProperties } from '../actions-v2/CreateLeadFromAddressSalesAppDto';
|
|
26
|
+
import { CreateLeadSalesAppProperties } from '../actions-v2/CreateLeadSalesAppDto';
|
|
25
27
|
import { UpdateLeadProperties } from '../actions-v2/UpdateLeadDto';
|
|
26
28
|
import { NoteRecord } from './NoteRecord';
|
|
27
29
|
import { DiscountRecord } from './DiscountRecord';
|
|
@@ -422,6 +424,62 @@ export declare class LeadRecord<TProps = LeadProperties> {
|
|
|
422
424
|
journeyId?: string;
|
|
423
425
|
stageKey?: string;
|
|
424
426
|
}): ActionBuilder;
|
|
427
|
+
/**
|
|
428
|
+
* CreateLeadFromAddressSalesApp
|
|
429
|
+
*
|
|
430
|
+
* Creates a new Lead record with the specified properties.
|
|
431
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
432
|
+
*
|
|
433
|
+
* @param properties - The properties for the new record
|
|
434
|
+
* @param options - Optional settings
|
|
435
|
+
* @param options.type - Override the record type
|
|
436
|
+
* @param options.journeyId - Associate with a journey
|
|
437
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
438
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* ```typescript
|
|
442
|
+
* // Create with properties
|
|
443
|
+
* const record = odinClient.leads.new();
|
|
444
|
+
* await record.createLeadFromAddressSalesApp({ ... }).execute();
|
|
445
|
+
*
|
|
446
|
+
* // Dry run (for debugging)
|
|
447
|
+
* const payload = record.createLeadFromAddressSalesApp({ ... }).dryRun();
|
|
448
|
+
* ```
|
|
449
|
+
*/
|
|
450
|
+
createLeadFromAddressSalesApp(properties?: CreateLeadFromAddressSalesAppProperties, options?: {
|
|
451
|
+
type?: string;
|
|
452
|
+
journeyId?: string;
|
|
453
|
+
stageKey?: string;
|
|
454
|
+
}): ActionBuilder;
|
|
455
|
+
/**
|
|
456
|
+
* CreateLeadSalesApp
|
|
457
|
+
*
|
|
458
|
+
* Creates a new Lead record with the specified properties.
|
|
459
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
460
|
+
*
|
|
461
|
+
* @param properties - The properties for the new record
|
|
462
|
+
* @param options - Optional settings
|
|
463
|
+
* @param options.type - Override the record type
|
|
464
|
+
* @param options.journeyId - Associate with a journey
|
|
465
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
466
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* ```typescript
|
|
470
|
+
* // Create with properties
|
|
471
|
+
* const record = odinClient.leads.new();
|
|
472
|
+
* await record.createLeadSalesApp({ ... }).execute();
|
|
473
|
+
*
|
|
474
|
+
* // Dry run (for debugging)
|
|
475
|
+
* const payload = record.createLeadSalesApp({ ... }).dryRun();
|
|
476
|
+
* ```
|
|
477
|
+
*/
|
|
478
|
+
createLeadSalesApp(properties: CreateLeadSalesAppProperties, options?: {
|
|
479
|
+
type?: string;
|
|
480
|
+
journeyId?: string;
|
|
481
|
+
stageKey?: string;
|
|
482
|
+
}): ActionBuilder;
|
|
425
483
|
/**
|
|
426
484
|
* MoveLeadToContacted
|
|
427
485
|
*
|
|
@@ -619,6 +619,78 @@ class LeadRecord {
|
|
|
619
619
|
};
|
|
620
620
|
return new ActionBuilder(this._provider, 'CrmModule', 'Lead', payload, () => { this._pendingLinks = []; });
|
|
621
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* CreateLeadFromAddressSalesApp
|
|
624
|
+
*
|
|
625
|
+
* Creates a new Lead record with the specified properties.
|
|
626
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
627
|
+
*
|
|
628
|
+
* @param properties - The properties for the new record
|
|
629
|
+
* @param options - Optional settings
|
|
630
|
+
* @param options.type - Override the record type
|
|
631
|
+
* @param options.journeyId - Associate with a journey
|
|
632
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
633
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
634
|
+
*
|
|
635
|
+
* @example
|
|
636
|
+
* ```typescript
|
|
637
|
+
* // Create with properties
|
|
638
|
+
* const record = odinClient.leads.new();
|
|
639
|
+
* await record.createLeadFromAddressSalesApp({ ... }).execute();
|
|
640
|
+
*
|
|
641
|
+
* // Dry run (for debugging)
|
|
642
|
+
* const payload = record.createLeadFromAddressSalesApp({ ... }).dryRun();
|
|
643
|
+
* ```
|
|
644
|
+
*/
|
|
645
|
+
createLeadFromAddressSalesApp(properties, options) {
|
|
646
|
+
var _a, _b;
|
|
647
|
+
const payload = {
|
|
648
|
+
entity: 'CrmModule:Lead',
|
|
649
|
+
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
|
|
650
|
+
actionName: 'CreateLeadFromAddressSalesApp',
|
|
651
|
+
properties: properties || {},
|
|
652
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
653
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
654
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
655
|
+
};
|
|
656
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'Lead', payload, () => { this._pendingLinks = []; });
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* CreateLeadSalesApp
|
|
660
|
+
*
|
|
661
|
+
* Creates a new Lead record with the specified properties.
|
|
662
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
663
|
+
*
|
|
664
|
+
* @param properties - The properties for the new record
|
|
665
|
+
* @param options - Optional settings
|
|
666
|
+
* @param options.type - Override the record type
|
|
667
|
+
* @param options.journeyId - Associate with a journey
|
|
668
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
669
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
670
|
+
*
|
|
671
|
+
* @example
|
|
672
|
+
* ```typescript
|
|
673
|
+
* // Create with properties
|
|
674
|
+
* const record = odinClient.leads.new();
|
|
675
|
+
* await record.createLeadSalesApp({ ... }).execute();
|
|
676
|
+
*
|
|
677
|
+
* // Dry run (for debugging)
|
|
678
|
+
* const payload = record.createLeadSalesApp({ ... }).dryRun();
|
|
679
|
+
* ```
|
|
680
|
+
*/
|
|
681
|
+
createLeadSalesApp(properties, options) {
|
|
682
|
+
var _a, _b;
|
|
683
|
+
const payload = {
|
|
684
|
+
entity: 'CrmModule:Lead',
|
|
685
|
+
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
|
|
686
|
+
actionName: 'CreateLeadSalesApp',
|
|
687
|
+
properties: properties || {},
|
|
688
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
689
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
690
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
691
|
+
};
|
|
692
|
+
return new ActionBuilder(this._provider, 'CrmModule', 'Lead', payload, () => { this._pendingLinks = []; });
|
|
693
|
+
}
|
|
622
694
|
// ============================================
|
|
623
695
|
// UPDATE ACTIONS (require existing record)
|
|
624
696
|
// ============================================
|
|
@@ -73,6 +73,7 @@ import { ContactRecord } from './ContactRecord';
|
|
|
73
73
|
import { RecontractRecord } from './RecontractRecord';
|
|
74
74
|
import { DataIssueRecord } from './DataIssueRecord';
|
|
75
75
|
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
76
|
+
import { EmailRecord } from './EmailRecord';
|
|
76
77
|
/**
|
|
77
78
|
* Builder for action execution with dryRun support
|
|
78
79
|
*
|
|
@@ -731,6 +732,7 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
731
732
|
private _recontracts?;
|
|
732
733
|
private _dataIssues?;
|
|
733
734
|
private _workOrders?;
|
|
735
|
+
private _emails?;
|
|
734
736
|
/**
|
|
735
737
|
* Create a record wrapper.
|
|
736
738
|
* @param record - The underlying record, or null for create operations
|
|
@@ -1370,6 +1372,24 @@ export declare class OrderRecord<TProps = OrderProperties> {
|
|
|
1370
1372
|
* ```
|
|
1371
1373
|
*/
|
|
1372
1374
|
get workOrders(): RecordLinkManager<WorkOrderRecord, typeof OrderRecord['workOrdersLabels'][number]>;
|
|
1375
|
+
/** Valid labels for Email associations */
|
|
1376
|
+
static readonly emailsLabels: readonly ["Order__Email"];
|
|
1377
|
+
/**
|
|
1378
|
+
* Access linked Email records
|
|
1379
|
+
* @remarks Available labels: Order__Email
|
|
1380
|
+
* @throws Error if called on a new (unsaved) record
|
|
1381
|
+
*
|
|
1382
|
+
* @example
|
|
1383
|
+
* ```typescript
|
|
1384
|
+
* // Get all linked Email records
|
|
1385
|
+
* const items = await record.emails.list();
|
|
1386
|
+
* const first = await record.emails.first();
|
|
1387
|
+
*
|
|
1388
|
+
* // Filter by label
|
|
1389
|
+
* const specific = await record.emails.first({ label: 'Order__Email' });
|
|
1390
|
+
* ```
|
|
1391
|
+
*/
|
|
1392
|
+
get emails(): RecordLinkManager<EmailRecord, typeof OrderRecord['emailsLabels'][number]>;
|
|
1373
1393
|
/**
|
|
1374
1394
|
* Queue a link to be created with the next action.
|
|
1375
1395
|
* Works for both create and update actions.
|
|
@@ -63,6 +63,7 @@ const ContactRecord_1 = require("./ContactRecord");
|
|
|
63
63
|
const RecontractRecord_1 = require("./RecontractRecord");
|
|
64
64
|
const DataIssueRecord_1 = require("./DataIssueRecord");
|
|
65
65
|
const WorkOrderRecord_1 = require("./WorkOrderRecord");
|
|
66
|
+
const EmailRecord_1 = require("./EmailRecord");
|
|
66
67
|
/**
|
|
67
68
|
* Builder for action execution with dryRun support
|
|
68
69
|
*
|
|
@@ -2153,6 +2154,36 @@ class OrderRecord {
|
|
|
2153
2154
|
}
|
|
2154
2155
|
return this._workOrders;
|
|
2155
2156
|
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Access linked Email records
|
|
2159
|
+
* @remarks Available labels: Order__Email
|
|
2160
|
+
* @throws Error if called on a new (unsaved) record
|
|
2161
|
+
*
|
|
2162
|
+
* @example
|
|
2163
|
+
* ```typescript
|
|
2164
|
+
* // Get all linked Email records
|
|
2165
|
+
* const items = await record.emails.list();
|
|
2166
|
+
* const first = await record.emails.first();
|
|
2167
|
+
*
|
|
2168
|
+
* // Filter by label
|
|
2169
|
+
* const specific = await record.emails.first({ label: 'Order__Email' });
|
|
2170
|
+
* ```
|
|
2171
|
+
*/
|
|
2172
|
+
get emails() {
|
|
2173
|
+
var _a;
|
|
2174
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
2175
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
2176
|
+
if (!this._emails) {
|
|
2177
|
+
this._emails = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
2178
|
+
sourceEntity: 'OrderModule:Order',
|
|
2179
|
+
targetEntity: 'NotificationModule:Email',
|
|
2180
|
+
targetModuleName: 'NotificationModule',
|
|
2181
|
+
targetEntityName: 'Email',
|
|
2182
|
+
labels: ['Order__Email'],
|
|
2183
|
+
}, EmailRecord_1.EmailRecord);
|
|
2184
|
+
}
|
|
2185
|
+
return this._emails;
|
|
2186
|
+
}
|
|
2156
2187
|
// ============================================
|
|
2157
2188
|
// LINK MANAGEMENT
|
|
2158
2189
|
// ============================================
|
|
@@ -3407,6 +3438,8 @@ OrderRecord.recontractsLabels = ['Recontract__Order'];
|
|
|
3407
3438
|
OrderRecord.dataIssuesLabels = ['DataIssue__Order'];
|
|
3408
3439
|
/** Valid labels for WorkOrder associations */
|
|
3409
3440
|
OrderRecord.workOrdersLabels = ['Order__WorkOrder'];
|
|
3441
|
+
/** Valid labels for Email associations */
|
|
3442
|
+
OrderRecord.emailsLabels = ['Order__Email'];
|
|
3410
3443
|
/** Type guard to check if an object is a OrderRecord */
|
|
3411
3444
|
function isOrderRecord(obj) {
|
|
3412
3445
|
return obj instanceof OrderRecord;
|