@d19n/youfibre-odin-sdk 2.0.208-beta.6 → 2.0.208
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 +2 -1
- package/dist/actions-v2/CreateCityfibreKciDto.d.ts +1 -1
- package/dist/actions-v2/CreateCityfibreOrderKciCompletedDto.d.ts +1 -1
- package/dist/actions-v2/CreatePreContractOrderSummaryDto.d.ts +128 -0
- package/dist/actions-v2/CreatePreContractOrderSummaryDto.js +59 -0
- package/dist/actions-v2/CreateTwilioWorkerDto.d.ts +118 -8
- package/dist/actions-v2/CreateTwilioWorkerDto.js +136 -1
- package/dist/actions-v2/SyncTwilioWorkerDto.d.ts +8 -1
- package/dist/actions-v2/UpdateTwilioWorkerDto.d.ts +110 -2
- package/dist/actions-v2/UpdateTwilioWorkerDto.js +123 -3
- package/dist/entities-v2/User.d.ts +7 -0
- package/dist/entities-v2/User.js +2 -0
- package/dist/records-v2/EmailRecord.d.ts +29 -0
- package/dist/records-v2/EmailRecord.js +36 -0
- package/dist/records-v2/TwilioWorkerRecord.d.ts +20 -24
- package/dist/records-v2/TwilioWorkerRecord.js +19 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -357,7 +357,7 @@ This SDK includes **169** entities across **12** modules.
|
|
|
357
357
|
|
|
358
358
|
## Actions
|
|
359
359
|
|
|
360
|
-
This SDK includes **
|
|
360
|
+
This SDK includes **705** actions.
|
|
361
361
|
|
|
362
362
|
### Action Types
|
|
363
363
|
|
|
@@ -1312,6 +1312,7 @@ This SDK includes **704** actions.
|
|
|
1312
1312
|
| `CreateOrderReferralReferrerNotQualifiedEmail` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.CreateOrderReferralReferrerNotQualifiedEmail |
|
|
1313
1313
|
| `CreateOrderReferralReferrerPendingEmail` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.CreateOrderReferralReferrerPendingEmail |
|
|
1314
1314
|
| `CreateOrderReferralReferrerQualifiedEmail` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.CreateOrderReferralReferrerQualifiedEmail |
|
|
1315
|
+
| `CreatePreContractOrderSummary` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary |
|
|
1315
1316
|
| `CreateRecontractReminderEmail` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.CreateRecontractReminderEmail |
|
|
1316
1317
|
| `CreateTransactionalEmail` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.CreateTransactionalEmail |
|
|
1317
1318
|
| `SendDirectDebitCreatedEmail` | CREATE | k1.t-hEOJjsDb.NotificationModule.Email.Create.SendDirectDebitCreatedEmail |
|
|
@@ -89,7 +89,7 @@ export declare class CreateCityfibreOrderKciCommittedDto extends OdinRecordCreat
|
|
|
89
89
|
* Properties for CreateCityfibreOrderKciCompleted action
|
|
90
90
|
*
|
|
91
91
|
* @property Required fields: 3
|
|
92
|
-
* @property Optional fields:
|
|
92
|
+
* @property Optional fields: 2
|
|
93
93
|
*/
|
|
94
94
|
export interface CreateCityfibreOrderKciCompletedProperties {
|
|
95
95
|
/**
|
|
@@ -23,7 +23,7 @@ export interface CreateCityfibreOrderKciCompletedMessage extends OdinRecordCreat
|
|
|
23
23
|
* Properties for CreateCityfibreOrderKciCompleted action
|
|
24
24
|
*
|
|
25
25
|
* @property Required fields: 3
|
|
26
|
-
* @property Optional fields:
|
|
26
|
+
* @property Optional fields: 2
|
|
27
27
|
*/
|
|
28
28
|
export interface CreateCityfibreOrderKciCompletedProperties {
|
|
29
29
|
/**
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreatePreContractOrderSummary Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Send Pre Contact order summary email
|
|
5
|
+
*
|
|
6
|
+
* @module NotificationModule
|
|
7
|
+
* @entity Email
|
|
8
|
+
* @entityType TRANSACTIONAL
|
|
9
|
+
* @actionKey CreatePreContractOrderSummary
|
|
10
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
/**
|
|
16
|
+
* RabbitMQ message payload for CreatePreContractOrderSummary created events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary
|
|
19
|
+
*/
|
|
20
|
+
export interface CreatePreContractOrderSummaryMessage extends OdinRecordCreatedEvent<CreatePreContractOrderSummaryDto, CreatePreContractOrderSummaryProperties> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for CreatePreContractOrderSummary action
|
|
24
|
+
*
|
|
25
|
+
* @property Required fields: 0
|
|
26
|
+
* @property Optional fields: 9
|
|
27
|
+
*/
|
|
28
|
+
export interface CreatePreContractOrderSummaryProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Date
|
|
31
|
+
*
|
|
32
|
+
* Date field for Email records. Used by Communications team.
|
|
33
|
+
* @type {DATE_TIME}
|
|
34
|
+
*/
|
|
35
|
+
Date?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* EmailingService
|
|
38
|
+
*
|
|
39
|
+
* The provider we use to send email (eg. Sendgrid)
|
|
40
|
+
* @type {ENUM}
|
|
41
|
+
*/
|
|
42
|
+
EmailingService?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* ContactId
|
|
45
|
+
*
|
|
46
|
+
* The related Contact to send the email
|
|
47
|
+
* @type {LOOKUP}
|
|
48
|
+
*/
|
|
49
|
+
ContactId?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* TemplateLabel
|
|
52
|
+
*
|
|
53
|
+
* The template label from email templates engine
|
|
54
|
+
* @type {TEXT}
|
|
55
|
+
*/
|
|
56
|
+
TemplateLabel?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* MessageId
|
|
59
|
+
*
|
|
60
|
+
* SMTP Message Id (Communications - Email)
|
|
61
|
+
* @type {TEXT}
|
|
62
|
+
*/
|
|
63
|
+
MessageId?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* EmailSenderId
|
|
66
|
+
*
|
|
67
|
+
* The Email Sender related entity
|
|
68
|
+
* @type {LOOKUP}
|
|
69
|
+
*/
|
|
70
|
+
EmailSenderId?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* DynamicData
|
|
73
|
+
*
|
|
74
|
+
* Data will pass to emailing service (variables)
|
|
75
|
+
* @type {JSON}
|
|
76
|
+
*/
|
|
77
|
+
DynamicData?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Title
|
|
80
|
+
*
|
|
81
|
+
* Used for title
|
|
82
|
+
* @type {TEXT}
|
|
83
|
+
*/
|
|
84
|
+
Title?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Subject
|
|
87
|
+
*
|
|
88
|
+
* Data field for Email records. Used by Communications team.
|
|
89
|
+
* @type {TEXT}
|
|
90
|
+
*/
|
|
91
|
+
Subject?: string | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* CreatePreContractOrderSummary
|
|
95
|
+
*
|
|
96
|
+
* Send Pre Contact order summary email
|
|
97
|
+
*
|
|
98
|
+
* @actionType CREATE - Creates a new Email record
|
|
99
|
+
* @module NotificationModule
|
|
100
|
+
* @entity Email
|
|
101
|
+
* @entityType TRANSACTIONAL (TRANSACTIONAL)
|
|
102
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary
|
|
103
|
+
* @permission schema.action.createprecontractordersummary.trigger
|
|
104
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
105
|
+
*/
|
|
106
|
+
export declare class CreatePreContractOrderSummaryDto extends OdinRecordCreateDto<CreatePreContractOrderSummaryProperties> {
|
|
107
|
+
/** Used by SDK generators to identify action type */
|
|
108
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
109
|
+
static readonly ACTION_KEY = "CreatePreContractOrderSummary";
|
|
110
|
+
static readonly MODULE_NAME = "NotificationModule";
|
|
111
|
+
static readonly ENTITIES: string[];
|
|
112
|
+
static readonly ENTITY_TYPE = "TRANSACTIONAL";
|
|
113
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary";
|
|
114
|
+
static readonly PERMISSION = "schema.action.createprecontractordersummary.trigger";
|
|
115
|
+
/** Step metadata - entity this action targets */
|
|
116
|
+
static readonly STEP_ENTITY = "NotificationModule:Email";
|
|
117
|
+
static readonly STEP_SCHEMA_ID = "cb37958c-d72f-44aa-975a-a8fae42b1b72";
|
|
118
|
+
static readonly STEP_SCHEMA_ACTION_ID = "45b985a2-d7e3-4f36-8b2f-fdaa6cd66f4c";
|
|
119
|
+
static readonly STEP_SCHEMA_TYPE_ID = "14042940-a388-44c7-87fe-3a4105d92e94";
|
|
120
|
+
static readonly STEP_TYPE = "TRANSACTIONAL";
|
|
121
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
122
|
+
readonly actionName: string;
|
|
123
|
+
readonly schemaActionId: string;
|
|
124
|
+
readonly entity: string;
|
|
125
|
+
constructor(properties: CreatePreContractOrderSummaryProperties, options?: {
|
|
126
|
+
journeyId?: string;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreatePreContractOrderSummary Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Send Pre Contact order summary email
|
|
6
|
+
*
|
|
7
|
+
* @module NotificationModule
|
|
8
|
+
* @entity Email
|
|
9
|
+
* @entityType TRANSACTIONAL
|
|
10
|
+
* @actionKey CreatePreContractOrderSummary
|
|
11
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreatePreContractOrderSummaryDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* CreatePreContractOrderSummary
|
|
20
|
+
*
|
|
21
|
+
* Send Pre Contact order summary email
|
|
22
|
+
*
|
|
23
|
+
* @actionType CREATE - Creates a new Email record
|
|
24
|
+
* @module NotificationModule
|
|
25
|
+
* @entity Email
|
|
26
|
+
* @entityType TRANSACTIONAL (TRANSACTIONAL)
|
|
27
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary
|
|
28
|
+
* @permission schema.action.createprecontractordersummary.trigger
|
|
29
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
30
|
+
*/
|
|
31
|
+
class CreatePreContractOrderSummaryDto extends core_1.OdinRecordCreateDto {
|
|
32
|
+
constructor(properties, options) {
|
|
33
|
+
super({
|
|
34
|
+
entity: 'NotificationModule:Email',
|
|
35
|
+
type: 'TRANSACTIONAL',
|
|
36
|
+
properties,
|
|
37
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'CreatePreContractOrderSummary';
|
|
40
|
+
this.schemaActionId = '45b985a2-d7e3-4f36-8b2f-fdaa6cd66f4c';
|
|
41
|
+
this.entity = 'NotificationModule:Email';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.CreatePreContractOrderSummaryDto = CreatePreContractOrderSummaryDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
CreatePreContractOrderSummaryDto.ACTION_TYPE = 'CREATE';
|
|
47
|
+
CreatePreContractOrderSummaryDto.ACTION_KEY = 'CreatePreContractOrderSummary';
|
|
48
|
+
CreatePreContractOrderSummaryDto.MODULE_NAME = 'NotificationModule';
|
|
49
|
+
CreatePreContractOrderSummaryDto.ENTITIES = ['Email'];
|
|
50
|
+
CreatePreContractOrderSummaryDto.ENTITY_TYPE = 'TRANSACTIONAL';
|
|
51
|
+
CreatePreContractOrderSummaryDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.Email.Create.CreatePreContractOrderSummary';
|
|
52
|
+
CreatePreContractOrderSummaryDto.PERMISSION = 'schema.action.createprecontractordersummary.trigger';
|
|
53
|
+
/** Step metadata - entity this action targets */
|
|
54
|
+
CreatePreContractOrderSummaryDto.STEP_ENTITY = 'NotificationModule:Email';
|
|
55
|
+
CreatePreContractOrderSummaryDto.STEP_SCHEMA_ID = 'cb37958c-d72f-44aa-975a-a8fae42b1b72';
|
|
56
|
+
CreatePreContractOrderSummaryDto.STEP_SCHEMA_ACTION_ID = '45b985a2-d7e3-4f36-8b2f-fdaa6cd66f4c';
|
|
57
|
+
CreatePreContractOrderSummaryDto.STEP_SCHEMA_TYPE_ID = '14042940-a388-44c7-87fe-3a4105d92e94';
|
|
58
|
+
CreatePreContractOrderSummaryDto.STEP_TYPE = 'TRANSACTIONAL';
|
|
59
|
+
CreatePreContractOrderSummaryDto.AUTO_LINK_PARENT = true;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
12
|
*/
|
|
13
|
-
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
13
|
+
import { OdinRecord, OdinRecordCreateDto, OdinRecordCreatedEvent, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
|
|
14
14
|
/**
|
|
15
15
|
* RabbitMQ message payload for CreateTwilioWorker created events
|
|
16
16
|
*
|
|
@@ -21,18 +21,114 @@ export interface CreateTwilioWorkerMessage extends OdinRecordCreatedEvent<Create
|
|
|
21
21
|
/**
|
|
22
22
|
* Properties for CreateTwilioWorker action
|
|
23
23
|
*
|
|
24
|
-
* @property Required fields: 1
|
|
25
|
-
* @property Optional fields: 0
|
|
26
24
|
*/
|
|
27
25
|
export interface CreateTwilioWorkerProperties {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Builder for CreateTwilioWorker action
|
|
29
|
+
*
|
|
30
|
+
* Provides fluent API for adding associations before executing the action.
|
|
31
|
+
* Use .link*() methods to add associations, then call .execute() to run.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* await record.createTwilioWorker({ ...properties })
|
|
36
|
+
* .linkAssociation_1781872155907({ id: '...', entity: '...' })
|
|
37
|
+
* .linkAssociation_1781879666149({ id: '...', entity: '...' })
|
|
38
|
+
* .execute();
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare class CreateTwilioWorkerBuilder {
|
|
42
|
+
private _associations;
|
|
43
|
+
private _properties;
|
|
44
|
+
private _pendingLinks;
|
|
45
|
+
private _options?;
|
|
46
|
+
private _provider?;
|
|
47
|
+
private _moduleName?;
|
|
48
|
+
private _entityName?;
|
|
49
|
+
private _clearPendingLinks?;
|
|
50
|
+
private _externalId?;
|
|
51
|
+
private _externalAppId?;
|
|
52
|
+
private _groups?;
|
|
53
|
+
constructor(properties: CreateTwilioWorkerProperties, pendingLinks: OdinRecordLinkDto[], options?: {
|
|
54
|
+
journeyId?: string;
|
|
55
|
+
stageKey?: string;
|
|
56
|
+
});
|
|
28
57
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* Worker name
|
|
32
|
-
* @type {TEXT}
|
|
58
|
+
* Link User__TwilioWorker
|
|
59
|
+
* @schemaAssociationId 0805e77a-9ea3-45fb-a958-959496b78234
|
|
33
60
|
* @required
|
|
61
|
+
* @param target - The record to link
|
|
62
|
+
* @returns this (for method chaining)
|
|
63
|
+
*/
|
|
64
|
+
linkAssociation_1781872155907(target: OdinRecord<any> | {
|
|
65
|
+
id: string;
|
|
66
|
+
entity: string;
|
|
67
|
+
}): this;
|
|
68
|
+
/**
|
|
69
|
+
* Link TwilioTaskQueue__TwilioWorker
|
|
70
|
+
* @schemaAssociationId 9de524e5-a0e3-4580-a5eb-e19faf5711c3
|
|
71
|
+
* @required
|
|
72
|
+
* @param target - The record to link
|
|
73
|
+
* @returns this (for method chaining)
|
|
74
|
+
*/
|
|
75
|
+
linkAssociation_1781879666149(target: OdinRecord<any> | {
|
|
76
|
+
id: string;
|
|
77
|
+
entity: string;
|
|
78
|
+
}): this;
|
|
79
|
+
/**
|
|
80
|
+
* Set an external system identifier for this record.
|
|
81
|
+
* Links the record to a corresponding entry in an external application.
|
|
82
|
+
* @param externalId - The ID in the external system
|
|
83
|
+
* @param externalAppId - The external application identifier
|
|
84
|
+
* @returns this (for chaining)
|
|
85
|
+
*/
|
|
86
|
+
withExternalId(externalId: string, externalAppId: string): this;
|
|
87
|
+
/**
|
|
88
|
+
* Set security/access groups for this record.
|
|
89
|
+
* @param groups - Array of group names
|
|
90
|
+
* @returns this (for chaining)
|
|
91
|
+
*/
|
|
92
|
+
withGroups(groups: string[]): this;
|
|
93
|
+
/**
|
|
94
|
+
* Get the action payload without executing
|
|
95
|
+
* @returns The action data that would be sent
|
|
96
|
+
*/
|
|
97
|
+
getData(): {
|
|
98
|
+
entity: string;
|
|
99
|
+
type: string | undefined;
|
|
100
|
+
actionName: string;
|
|
101
|
+
properties: CreateTwilioWorkerProperties;
|
|
102
|
+
associations?: OdinRecordLinkDto[];
|
|
103
|
+
journeyId?: string;
|
|
104
|
+
stageKey?: string;
|
|
105
|
+
externalId?: string;
|
|
106
|
+
externalAppId?: string;
|
|
107
|
+
groups?: string[];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Inject execution context (called by record wrapper)
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
withProvider(provider: {
|
|
114
|
+
_applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
|
|
115
|
+
}, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
|
|
116
|
+
/**
|
|
117
|
+
* Execute the action
|
|
118
|
+
* @returns The result from the API
|
|
119
|
+
* @throws Error if withProvider() has not been called
|
|
120
|
+
*/
|
|
121
|
+
execute(): Promise<any>;
|
|
122
|
+
/**
|
|
123
|
+
* Returns the request payload without executing (for debugging)
|
|
124
|
+
* @returns The request payload that would be sent to the API
|
|
125
|
+
*/
|
|
126
|
+
dryRun(): Record<string, any>;
|
|
127
|
+
/**
|
|
128
|
+
* Prevents accidental `await builder` without .execute()
|
|
129
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
34
130
|
*/
|
|
35
|
-
|
|
131
|
+
then(): never;
|
|
36
132
|
}
|
|
37
133
|
/**
|
|
38
134
|
* CreateTwilioWorker
|
|
@@ -59,6 +155,20 @@ export declare class CreateTwilioWorkerDto extends OdinRecordCreateDto<CreateTwi
|
|
|
59
155
|
static readonly STEP_SCHEMA_ID = "79448527-2fc1-4d0d-a9a8-67fbd58b3df4";
|
|
60
156
|
static readonly STEP_SCHEMA_ACTION_ID = "179fac43-5cac-4570-9540-f9d05043e5d9";
|
|
61
157
|
static readonly AUTO_LINK_PARENT = true;
|
|
158
|
+
static readonly HAS_ASSOCIATIONS = true;
|
|
159
|
+
static readonly HAS_REQUIRED_ASSOCIATIONS = true;
|
|
160
|
+
static readonly BUILDER_CLASS = "CreateTwilioWorkerBuilder";
|
|
161
|
+
static readonly ASSOCIATION_FIELDS: readonly [{
|
|
162
|
+
readonly name: "Association_1781872155907";
|
|
163
|
+
readonly methodName: "linkAssociation_1781872155907";
|
|
164
|
+
readonly required: true;
|
|
165
|
+
readonly schemaAssociationId: "0805e77a-9ea3-45fb-a958-959496b78234";
|
|
166
|
+
}, {
|
|
167
|
+
readonly name: "Association_1781879666149";
|
|
168
|
+
readonly methodName: "linkAssociation_1781879666149";
|
|
169
|
+
readonly required: true;
|
|
170
|
+
readonly schemaAssociationId: "9de524e5-a0e3-4580-a5eb-e19faf5711c3";
|
|
171
|
+
}];
|
|
62
172
|
readonly actionName: string;
|
|
63
173
|
readonly schemaActionId: string;
|
|
64
174
|
readonly entity: string;
|
|
@@ -11,9 +11,140 @@
|
|
|
11
11
|
*
|
|
12
12
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
13
|
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
14
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CreateTwilioWorkerDto = void 0;
|
|
24
|
+
exports.CreateTwilioWorkerDto = exports.CreateTwilioWorkerBuilder = void 0;
|
|
16
25
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
26
|
+
/**
|
|
27
|
+
* Builder for CreateTwilioWorker action
|
|
28
|
+
*
|
|
29
|
+
* Provides fluent API for adding associations before executing the action.
|
|
30
|
+
* Use .link*() methods to add associations, then call .execute() to run.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* await record.createTwilioWorker({ ...properties })
|
|
35
|
+
* .linkAssociation_1781872155907({ id: '...', entity: '...' })
|
|
36
|
+
* .linkAssociation_1781879666149({ id: '...', entity: '...' })
|
|
37
|
+
* .execute();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
class CreateTwilioWorkerBuilder {
|
|
41
|
+
constructor(properties, pendingLinks, options) {
|
|
42
|
+
this._associations = [];
|
|
43
|
+
this._properties = properties;
|
|
44
|
+
this._pendingLinks = pendingLinks;
|
|
45
|
+
this._options = options;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Link User__TwilioWorker
|
|
49
|
+
* @schemaAssociationId 0805e77a-9ea3-45fb-a958-959496b78234
|
|
50
|
+
* @required
|
|
51
|
+
* @param target - The record to link
|
|
52
|
+
* @returns this (for method chaining)
|
|
53
|
+
*/
|
|
54
|
+
linkAssociation_1781872155907(target) {
|
|
55
|
+
this._associations.push(new core_1.OdinRecordLinkDto({
|
|
56
|
+
id: target.id,
|
|
57
|
+
entity: 'entity' in target ? target.entity : target.entity,
|
|
58
|
+
}));
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Link TwilioTaskQueue__TwilioWorker
|
|
63
|
+
* @schemaAssociationId 9de524e5-a0e3-4580-a5eb-e19faf5711c3
|
|
64
|
+
* @required
|
|
65
|
+
* @param target - The record to link
|
|
66
|
+
* @returns this (for method chaining)
|
|
67
|
+
*/
|
|
68
|
+
linkAssociation_1781879666149(target) {
|
|
69
|
+
this._associations.push(new core_1.OdinRecordLinkDto({
|
|
70
|
+
id: target.id,
|
|
71
|
+
entity: 'entity' in target ? target.entity : target.entity,
|
|
72
|
+
}));
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Set an external system identifier for this record.
|
|
77
|
+
* Links the record to a corresponding entry in an external application.
|
|
78
|
+
* @param externalId - The ID in the external system
|
|
79
|
+
* @param externalAppId - The external application identifier
|
|
80
|
+
* @returns this (for chaining)
|
|
81
|
+
*/
|
|
82
|
+
withExternalId(externalId, externalAppId) {
|
|
83
|
+
this._externalId = externalId;
|
|
84
|
+
this._externalAppId = externalAppId;
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Set security/access groups for this record.
|
|
89
|
+
* @param groups - Array of group names
|
|
90
|
+
* @returns this (for chaining)
|
|
91
|
+
*/
|
|
92
|
+
withGroups(groups) {
|
|
93
|
+
this._groups = groups;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get the action payload without executing
|
|
98
|
+
* @returns The action data that would be sent
|
|
99
|
+
*/
|
|
100
|
+
getData() {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
const allAssociations = [...this._associations, ...this._pendingLinks];
|
|
103
|
+
return Object.assign(Object.assign({ entity: 'SupportModule:TwilioWorker', type: undefined, actionName: 'CreateTwilioWorker', properties: this._properties, associations: allAssociations.length > 0 ? allAssociations : undefined, journeyId: (_a = this._options) === null || _a === void 0 ? void 0 : _a.journeyId, stageKey: (_b = this._options) === null || _b === void 0 ? void 0 : _b.stageKey }, (this._externalId && { externalId: this._externalId, externalAppId: this._externalAppId })), (this._groups && { groups: this._groups }));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Inject execution context (called by record wrapper)
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
withProvider(provider, moduleName, entityName, clearPendingLinks) {
|
|
110
|
+
this._provider = provider;
|
|
111
|
+
this._moduleName = moduleName;
|
|
112
|
+
this._entityName = entityName;
|
|
113
|
+
this._clearPendingLinks = clearPendingLinks;
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Execute the action
|
|
118
|
+
* @returns The result from the API
|
|
119
|
+
* @throws Error if withProvider() has not been called
|
|
120
|
+
*/
|
|
121
|
+
execute() {
|
|
122
|
+
var _a;
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
if (!this._provider || !this._moduleName || !this._entityName) {
|
|
125
|
+
throw new Error('Builder not connected to provider. Use the record wrapper API to get an executable builder.');
|
|
126
|
+
}
|
|
127
|
+
const result = yield this._provider._applyAction(this._moduleName, this._entityName, this.getData());
|
|
128
|
+
(_a = this._clearPendingLinks) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
129
|
+
return result;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Returns the request payload without executing (for debugging)
|
|
134
|
+
* @returns The request payload that would be sent to the API
|
|
135
|
+
*/
|
|
136
|
+
dryRun() {
|
|
137
|
+
return this.getData();
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Prevents accidental `await builder` without .execute()
|
|
141
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
142
|
+
*/
|
|
143
|
+
then() {
|
|
144
|
+
throw new Error('Builder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.CreateTwilioWorkerBuilder = CreateTwilioWorkerBuilder;
|
|
17
148
|
/**
|
|
18
149
|
* CreateTwilioWorker
|
|
19
150
|
*
|
|
@@ -52,3 +183,7 @@ CreateTwilioWorkerDto.STEP_ENTITY = 'SupportModule:TwilioWorker';
|
|
|
52
183
|
CreateTwilioWorkerDto.STEP_SCHEMA_ID = '79448527-2fc1-4d0d-a9a8-67fbd58b3df4';
|
|
53
184
|
CreateTwilioWorkerDto.STEP_SCHEMA_ACTION_ID = '179fac43-5cac-4570-9540-f9d05043e5d9';
|
|
54
185
|
CreateTwilioWorkerDto.AUTO_LINK_PARENT = true;
|
|
186
|
+
CreateTwilioWorkerDto.HAS_ASSOCIATIONS = true;
|
|
187
|
+
CreateTwilioWorkerDto.HAS_REQUIRED_ASSOCIATIONS = true;
|
|
188
|
+
CreateTwilioWorkerDto.BUILDER_CLASS = 'CreateTwilioWorkerBuilder';
|
|
189
|
+
CreateTwilioWorkerDto.ASSOCIATION_FIELDS = [{ "name": "Association_1781872155907", "methodName": "linkAssociation_1781872155907", "required": true, "schemaAssociationId": "0805e77a-9ea3-45fb-a958-959496b78234" }, { "name": "Association_1781879666149", "methodName": "linkAssociation_1781879666149", "required": true, "schemaAssociationId": "9de524e5-a0e3-4580-a5eb-e19faf5711c3" }];
|
|
@@ -22,7 +22,7 @@ export interface SyncTwilioWorkerMessage extends OdinRecordUpdatedEvent<SyncTwil
|
|
|
22
22
|
* Properties for SyncTwilioWorker action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 0
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 3
|
|
26
26
|
*/
|
|
27
27
|
export interface SyncTwilioWorkerProperties {
|
|
28
28
|
/**
|
|
@@ -39,6 +39,13 @@ export interface SyncTwilioWorkerProperties {
|
|
|
39
39
|
* @type {TEXT}
|
|
40
40
|
*/
|
|
41
41
|
Activity?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Name
|
|
44
|
+
*
|
|
45
|
+
* Worker name
|
|
46
|
+
* @type {TEXT}
|
|
47
|
+
*/
|
|
48
|
+
Name?: string | null;
|
|
42
49
|
}
|
|
43
50
|
/**
|
|
44
51
|
* SyncTwilioWorker
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
12
|
*/
|
|
13
|
-
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
13
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
|
|
14
14
|
/**
|
|
15
15
|
* RabbitMQ message payload for UpdateTwilioWorker updated events
|
|
16
16
|
*
|
|
@@ -33,6 +33,105 @@ export interface UpdateTwilioWorkerProperties {
|
|
|
33
33
|
*/
|
|
34
34
|
Name?: string | null;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Builder for UpdateTwilioWorker action
|
|
38
|
+
*
|
|
39
|
+
* Provides fluent API for adding associations before executing the action.
|
|
40
|
+
* Use .link*() methods to add associations, then call .execute() to run.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* await record.updateTwilioWorker({ ...properties })
|
|
45
|
+
* .linkAssociation_1781882573777({ id: '...', entity: '...' })
|
|
46
|
+
* .execute();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare class UpdateTwilioWorkerBuilder {
|
|
50
|
+
private _associations;
|
|
51
|
+
private _properties;
|
|
52
|
+
private _pendingLinks;
|
|
53
|
+
private _options?;
|
|
54
|
+
private _record;
|
|
55
|
+
private _provider?;
|
|
56
|
+
private _moduleName?;
|
|
57
|
+
private _entityName?;
|
|
58
|
+
private _clearPendingLinks?;
|
|
59
|
+
private _externalId?;
|
|
60
|
+
private _externalAppId?;
|
|
61
|
+
private _groups?;
|
|
62
|
+
constructor(record: {
|
|
63
|
+
id: string;
|
|
64
|
+
entity: string;
|
|
65
|
+
type?: string;
|
|
66
|
+
}, properties: UpdateTwilioWorkerProperties, pendingLinks: OdinRecordLinkDto[], options?: {
|
|
67
|
+
journeyId?: string;
|
|
68
|
+
stageKey?: string;
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Link TwilioTaskQueue__TwilioWorker
|
|
72
|
+
* @schemaAssociationId 9de524e5-a0e3-4580-a5eb-e19faf5711c3
|
|
73
|
+
* @param target - The record to link
|
|
74
|
+
* @returns this (for method chaining)
|
|
75
|
+
*/
|
|
76
|
+
linkAssociation_1781882573777(target: OdinRecord<any> | {
|
|
77
|
+
id: string;
|
|
78
|
+
entity: string;
|
|
79
|
+
}): this;
|
|
80
|
+
/**
|
|
81
|
+
* Set an external system identifier for this record.
|
|
82
|
+
* Links the record to a corresponding entry in an external application.
|
|
83
|
+
* @param externalId - The ID in the external system
|
|
84
|
+
* @param externalAppId - The external application identifier
|
|
85
|
+
* @returns this (for chaining)
|
|
86
|
+
*/
|
|
87
|
+
withExternalId(externalId: string, externalAppId: string): this;
|
|
88
|
+
/**
|
|
89
|
+
* Set security/access groups for this record.
|
|
90
|
+
* @param groups - Array of group names
|
|
91
|
+
* @returns this (for chaining)
|
|
92
|
+
*/
|
|
93
|
+
withGroups(groups: string[]): this;
|
|
94
|
+
/**
|
|
95
|
+
* Get the action payload without executing
|
|
96
|
+
* @returns The action data that would be sent
|
|
97
|
+
*/
|
|
98
|
+
getData(): {
|
|
99
|
+
id: string;
|
|
100
|
+
entity: string;
|
|
101
|
+
type?: string;
|
|
102
|
+
actionName: string;
|
|
103
|
+
properties: UpdateTwilioWorkerProperties;
|
|
104
|
+
associations?: OdinRecordLinkDto[];
|
|
105
|
+
journeyId?: string;
|
|
106
|
+
stageKey?: string;
|
|
107
|
+
externalId?: string;
|
|
108
|
+
externalAppId?: string;
|
|
109
|
+
groups?: string[];
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Inject execution context (called by record wrapper)
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
withProvider(provider: {
|
|
116
|
+
_applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
|
|
117
|
+
}, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
|
|
118
|
+
/**
|
|
119
|
+
* Execute the action
|
|
120
|
+
* @returns The result from the API
|
|
121
|
+
* @throws Error if withProvider() has not been called
|
|
122
|
+
*/
|
|
123
|
+
execute(): Promise<any>;
|
|
124
|
+
/**
|
|
125
|
+
* Returns the request payload without executing (for debugging)
|
|
126
|
+
* @returns The request payload that would be sent to the API
|
|
127
|
+
*/
|
|
128
|
+
dryRun(): Record<string, any>;
|
|
129
|
+
/**
|
|
130
|
+
* Prevents accidental `await builder` without .execute()
|
|
131
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
132
|
+
*/
|
|
133
|
+
then(): never;
|
|
134
|
+
}
|
|
36
135
|
/**
|
|
37
136
|
* UpdateTwilioWorker
|
|
38
137
|
*
|
|
@@ -56,8 +155,17 @@ export declare class UpdateTwilioWorkerDto extends OdinRecordUpdateDto<UpdateTwi
|
|
|
56
155
|
/** Step metadata - entity this action targets */
|
|
57
156
|
static readonly STEP_ENTITY = "SupportModule:TwilioWorker";
|
|
58
157
|
static readonly STEP_SCHEMA_ID = "79448527-2fc1-4d0d-a9a8-67fbd58b3df4";
|
|
59
|
-
static readonly STEP_SCHEMA_ACTION_ID = "
|
|
158
|
+
static readonly STEP_SCHEMA_ACTION_ID = "0f10b303-ff0e-4ba8-ab05-97420a881066";
|
|
60
159
|
static readonly AUTO_LINK_PARENT = false;
|
|
160
|
+
static readonly HAS_ASSOCIATIONS = true;
|
|
161
|
+
static readonly HAS_REQUIRED_ASSOCIATIONS = false;
|
|
162
|
+
static readonly BUILDER_CLASS = "UpdateTwilioWorkerBuilder";
|
|
163
|
+
static readonly ASSOCIATION_FIELDS: readonly [{
|
|
164
|
+
readonly name: "Association_1781882573777";
|
|
165
|
+
readonly methodName: "linkAssociation_1781882573777";
|
|
166
|
+
readonly required: false;
|
|
167
|
+
readonly schemaAssociationId: "9de524e5-a0e3-4580-a5eb-e19faf5711c3";
|
|
168
|
+
}];
|
|
61
169
|
readonly actionName: string;
|
|
62
170
|
readonly schemaActionId: string;
|
|
63
171
|
readonly entity: string;
|
|
@@ -11,9 +11,125 @@
|
|
|
11
11
|
*
|
|
12
12
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
13
|
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
14
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.UpdateTwilioWorkerDto = void 0;
|
|
24
|
+
exports.UpdateTwilioWorkerDto = exports.UpdateTwilioWorkerBuilder = void 0;
|
|
16
25
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
26
|
+
/**
|
|
27
|
+
* Builder for UpdateTwilioWorker action
|
|
28
|
+
*
|
|
29
|
+
* Provides fluent API for adding associations before executing the action.
|
|
30
|
+
* Use .link*() methods to add associations, then call .execute() to run.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* await record.updateTwilioWorker({ ...properties })
|
|
35
|
+
* .linkAssociation_1781882573777({ id: '...', entity: '...' })
|
|
36
|
+
* .execute();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
class UpdateTwilioWorkerBuilder {
|
|
40
|
+
constructor(record, properties, pendingLinks, options) {
|
|
41
|
+
this._associations = [];
|
|
42
|
+
this._record = record;
|
|
43
|
+
this._properties = properties;
|
|
44
|
+
this._pendingLinks = pendingLinks;
|
|
45
|
+
this._options = options;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Link TwilioTaskQueue__TwilioWorker
|
|
49
|
+
* @schemaAssociationId 9de524e5-a0e3-4580-a5eb-e19faf5711c3
|
|
50
|
+
* @param target - The record to link
|
|
51
|
+
* @returns this (for method chaining)
|
|
52
|
+
*/
|
|
53
|
+
linkAssociation_1781882573777(target) {
|
|
54
|
+
this._associations.push(new core_1.OdinRecordLinkDto({
|
|
55
|
+
id: target.id,
|
|
56
|
+
entity: 'entity' in target ? target.entity : target.entity,
|
|
57
|
+
}));
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Set an external system identifier for this record.
|
|
62
|
+
* Links the record to a corresponding entry in an external application.
|
|
63
|
+
* @param externalId - The ID in the external system
|
|
64
|
+
* @param externalAppId - The external application identifier
|
|
65
|
+
* @returns this (for chaining)
|
|
66
|
+
*/
|
|
67
|
+
withExternalId(externalId, externalAppId) {
|
|
68
|
+
this._externalId = externalId;
|
|
69
|
+
this._externalAppId = externalAppId;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Set security/access groups for this record.
|
|
74
|
+
* @param groups - Array of group names
|
|
75
|
+
* @returns this (for chaining)
|
|
76
|
+
*/
|
|
77
|
+
withGroups(groups) {
|
|
78
|
+
this._groups = groups;
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the action payload without executing
|
|
83
|
+
* @returns The action data that would be sent
|
|
84
|
+
*/
|
|
85
|
+
getData() {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
const allAssociations = [...this._associations, ...this._pendingLinks];
|
|
88
|
+
return Object.assign(Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateTwilioWorker', properties: this._properties, associations: allAssociations.length > 0 ? allAssociations : undefined, journeyId: (_a = this._options) === null || _a === void 0 ? void 0 : _a.journeyId, stageKey: (_b = this._options) === null || _b === void 0 ? void 0 : _b.stageKey }, (this._externalId && { externalId: this._externalId, externalAppId: this._externalAppId })), (this._groups && { groups: this._groups }));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Inject execution context (called by record wrapper)
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
withProvider(provider, moduleName, entityName, clearPendingLinks) {
|
|
95
|
+
this._provider = provider;
|
|
96
|
+
this._moduleName = moduleName;
|
|
97
|
+
this._entityName = entityName;
|
|
98
|
+
this._clearPendingLinks = clearPendingLinks;
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Execute the action
|
|
103
|
+
* @returns The result from the API
|
|
104
|
+
* @throws Error if withProvider() has not been called
|
|
105
|
+
*/
|
|
106
|
+
execute() {
|
|
107
|
+
var _a;
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
if (!this._provider || !this._moduleName || !this._entityName) {
|
|
110
|
+
throw new Error('Builder not connected to provider. Use the record wrapper API to get an executable builder.');
|
|
111
|
+
}
|
|
112
|
+
const result = yield this._provider._applyAction(this._moduleName, this._entityName, this.getData());
|
|
113
|
+
(_a = this._clearPendingLinks) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
114
|
+
return result;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Returns the request payload without executing (for debugging)
|
|
119
|
+
* @returns The request payload that would be sent to the API
|
|
120
|
+
*/
|
|
121
|
+
dryRun() {
|
|
122
|
+
return this.getData();
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Prevents accidental `await builder` without .execute()
|
|
126
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
127
|
+
*/
|
|
128
|
+
then() {
|
|
129
|
+
throw new Error('Builder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.UpdateTwilioWorkerBuilder = UpdateTwilioWorkerBuilder;
|
|
17
133
|
/**
|
|
18
134
|
* UpdateTwilioWorker
|
|
19
135
|
*
|
|
@@ -37,7 +153,7 @@ class UpdateTwilioWorkerDto extends core_1.OdinRecordUpdateDto {
|
|
|
37
153
|
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
154
|
});
|
|
39
155
|
this.actionName = 'UpdateTwilioWorker';
|
|
40
|
-
this.schemaActionId = '
|
|
156
|
+
this.schemaActionId = '0f10b303-ff0e-4ba8-ab05-97420a881066';
|
|
41
157
|
this.entity = 'SupportModule:TwilioWorker';
|
|
42
158
|
}
|
|
43
159
|
}
|
|
@@ -52,5 +168,9 @@ UpdateTwilioWorkerDto.PERMISSION = 'schema.action.updatetwilioworker.trigger';
|
|
|
52
168
|
/** Step metadata - entity this action targets */
|
|
53
169
|
UpdateTwilioWorkerDto.STEP_ENTITY = 'SupportModule:TwilioWorker';
|
|
54
170
|
UpdateTwilioWorkerDto.STEP_SCHEMA_ID = '79448527-2fc1-4d0d-a9a8-67fbd58b3df4';
|
|
55
|
-
UpdateTwilioWorkerDto.STEP_SCHEMA_ACTION_ID = '
|
|
171
|
+
UpdateTwilioWorkerDto.STEP_SCHEMA_ACTION_ID = '0f10b303-ff0e-4ba8-ab05-97420a881066';
|
|
56
172
|
UpdateTwilioWorkerDto.AUTO_LINK_PARENT = false;
|
|
173
|
+
UpdateTwilioWorkerDto.HAS_ASSOCIATIONS = true;
|
|
174
|
+
UpdateTwilioWorkerDto.HAS_REQUIRED_ASSOCIATIONS = false;
|
|
175
|
+
UpdateTwilioWorkerDto.BUILDER_CLASS = 'UpdateTwilioWorkerBuilder';
|
|
176
|
+
UpdateTwilioWorkerDto.ASSOCIATION_FIELDS = [{ "name": "Association_1781882573777", "methodName": "linkAssociation_1781882573777", "required": false, "schemaAssociationId": "9de524e5-a0e3-4580-a5eb-e19faf5711c3" }];
|
|
@@ -92,6 +92,8 @@ export declare enum UserPropertyKeys {
|
|
|
92
92
|
SalesChannel = "SalesChannel",
|
|
93
93
|
/** First + Last name */
|
|
94
94
|
FullName = "FullName",
|
|
95
|
+
/** Reference of Twilio worker */
|
|
96
|
+
TwilioWorkerId = "TwilioWorkerId",
|
|
95
97
|
/** email address (IT Security - User) */
|
|
96
98
|
EmailAddress = "EmailAddress",
|
|
97
99
|
/** the company the user is works for (IT Security - User) */
|
|
@@ -196,6 +198,11 @@ export interface UserProperties {
|
|
|
196
198
|
* @type {TEXT}
|
|
197
199
|
*/
|
|
198
200
|
FullName: string;
|
|
201
|
+
/** Reference of Twilio worker
|
|
202
|
+
*
|
|
203
|
+
* @type {LOOKUP}
|
|
204
|
+
*/
|
|
205
|
+
TwilioWorkerId: string;
|
|
199
206
|
/** email address (IT Security - User)
|
|
200
207
|
*
|
|
201
208
|
* @type {TEXT}
|
package/dist/entities-v2/User.js
CHANGED
|
@@ -76,6 +76,8 @@ var UserPropertyKeys;
|
|
|
76
76
|
UserPropertyKeys["SalesChannel"] = "SalesChannel";
|
|
77
77
|
/** First + Last name */
|
|
78
78
|
UserPropertyKeys["FullName"] = "FullName";
|
|
79
|
+
/** Reference of Twilio worker */
|
|
80
|
+
UserPropertyKeys["TwilioWorkerId"] = "TwilioWorkerId";
|
|
79
81
|
/** email address (IT Security - User) */
|
|
80
82
|
UserPropertyKeys["EmailAddress"] = "EmailAddress";
|
|
81
83
|
/** the company the user is works for (IT Security - User) */
|
|
@@ -37,6 +37,7 @@ import { CreateOrderReferralReferrerCancelledEmailProperties } from '../actions-
|
|
|
37
37
|
import { CreateOrderReferralReferrerNotQualifiedEmailProperties } from '../actions-v2/CreateOrderReferralReferrerNotQualifiedEmailDto';
|
|
38
38
|
import { CreateOrderReferralReferrerPendingEmailProperties } from '../actions-v2/CreateOrderReferralReferrerPendingEmailDto';
|
|
39
39
|
import { CreateOrderReferralReferrerQualifiedEmailProperties } from '../actions-v2/CreateOrderReferralReferrerQualifiedEmailDto';
|
|
40
|
+
import { CreatePreContractOrderSummaryProperties } from '../actions-v2/CreatePreContractOrderSummaryDto';
|
|
40
41
|
import { CreateRecontractReminderEmailProperties } from '../actions-v2/CreateRecontractReminderEmailDto';
|
|
41
42
|
import { CreateTransactionalEmailProperties } from '../actions-v2/CreateTransactionalEmailDto';
|
|
42
43
|
import { SendDirectDebitCreatedEmailProperties } from '../actions-v2/SendDirectDebitCreatedEmailDto';
|
|
@@ -773,6 +774,34 @@ export declare class EmailRecord<TProps = EmailProperties> {
|
|
|
773
774
|
journeyId?: string;
|
|
774
775
|
stageKey?: string;
|
|
775
776
|
}): ActionBuilder;
|
|
777
|
+
/**
|
|
778
|
+
* CreatePreContractOrderSummary
|
|
779
|
+
*
|
|
780
|
+
* Creates a new Email record with the specified properties.
|
|
781
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
782
|
+
*
|
|
783
|
+
* @remarks Record type: TRANSACTIONAL
|
|
784
|
+
*
|
|
785
|
+
* @param properties - The properties for the new record
|
|
786
|
+
* @param options - Optional settings
|
|
787
|
+
* @param options.journeyId - Associate with a journey
|
|
788
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
789
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* ```typescript
|
|
793
|
+
* // Create with properties
|
|
794
|
+
* const record = odinClient.emails.new();
|
|
795
|
+
* await record.createPreContractOrderSummary({ ... }).execute();
|
|
796
|
+
*
|
|
797
|
+
* // Dry run (for debugging)
|
|
798
|
+
* const payload = record.createPreContractOrderSummary({ ... }).dryRun();
|
|
799
|
+
* ```
|
|
800
|
+
*/
|
|
801
|
+
createPreContractOrderSummary(properties?: CreatePreContractOrderSummaryProperties, options?: {
|
|
802
|
+
journeyId?: string;
|
|
803
|
+
stageKey?: string;
|
|
804
|
+
}): ActionBuilder;
|
|
776
805
|
/**
|
|
777
806
|
* CreateRecontractReminderEmail
|
|
778
807
|
*
|
|
@@ -998,6 +998,42 @@ class EmailRecord {
|
|
|
998
998
|
};
|
|
999
999
|
return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
|
|
1000
1000
|
}
|
|
1001
|
+
/**
|
|
1002
|
+
* CreatePreContractOrderSummary
|
|
1003
|
+
*
|
|
1004
|
+
* Creates a new Email record with the specified properties.
|
|
1005
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1006
|
+
*
|
|
1007
|
+
* @remarks Record type: TRANSACTIONAL
|
|
1008
|
+
*
|
|
1009
|
+
* @param properties - The properties for the new record
|
|
1010
|
+
* @param options - Optional settings
|
|
1011
|
+
* @param options.journeyId - Associate with a journey
|
|
1012
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
1013
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1014
|
+
*
|
|
1015
|
+
* @example
|
|
1016
|
+
* ```typescript
|
|
1017
|
+
* // Create with properties
|
|
1018
|
+
* const record = odinClient.emails.new();
|
|
1019
|
+
* await record.createPreContractOrderSummary({ ... }).execute();
|
|
1020
|
+
*
|
|
1021
|
+
* // Dry run (for debugging)
|
|
1022
|
+
* const payload = record.createPreContractOrderSummary({ ... }).dryRun();
|
|
1023
|
+
* ```
|
|
1024
|
+
*/
|
|
1025
|
+
createPreContractOrderSummary(properties, options) {
|
|
1026
|
+
const payload = {
|
|
1027
|
+
entity: 'NotificationModule:Email',
|
|
1028
|
+
type: 'TRANSACTIONAL',
|
|
1029
|
+
actionName: 'CreatePreContractOrderSummary',
|
|
1030
|
+
properties: properties || {},
|
|
1031
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
1032
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
1033
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
1034
|
+
};
|
|
1035
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
|
|
1036
|
+
}
|
|
1001
1037
|
/**
|
|
1002
1038
|
* CreateRecontractReminderEmail
|
|
1003
1039
|
*
|
|
@@ -24,8 +24,10 @@ import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
|
24
24
|
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
25
25
|
import { TwilioWorkerProperties } from '../entities-v2/TwilioWorker';
|
|
26
26
|
import { CreateTwilioWorkerProperties } from '../actions-v2/CreateTwilioWorkerDto';
|
|
27
|
+
import { CreateTwilioWorkerBuilder } from '../actions-v2/CreateTwilioWorkerDto';
|
|
27
28
|
import { SyncTwilioWorkerProperties } from '../actions-v2/SyncTwilioWorkerDto';
|
|
28
29
|
import { UpdateTwilioWorkerProperties } from '../actions-v2/UpdateTwilioWorkerDto';
|
|
30
|
+
import { UpdateTwilioWorkerBuilder } from '../actions-v2/UpdateTwilioWorkerDto';
|
|
29
31
|
import { UserRecord } from './UserRecord';
|
|
30
32
|
import { TwilioTaskQueueRecord } from './TwilioTaskQueueRecord';
|
|
31
33
|
/** Valid entity types for TwilioWorker */
|
|
@@ -197,30 +199,27 @@ export declare class TwilioWorkerRecord<TProps = TwilioWorkerProperties> {
|
|
|
197
199
|
* CreateTwilioWorker
|
|
198
200
|
*
|
|
199
201
|
* Creates a new TwilioWorker record with the specified properties.
|
|
200
|
-
* Returns
|
|
202
|
+
* Returns a builder with fluent .link*() methods for associations.
|
|
203
|
+
* Call .execute() to create or .dryRun() for debugging.
|
|
201
204
|
*
|
|
202
205
|
* @param properties - The properties for the new record
|
|
203
206
|
* @param options - Optional settings
|
|
204
|
-
* @param options.type - Override the record type
|
|
205
207
|
* @param options.journeyId - Associate with a journey
|
|
206
208
|
* @param options.stageKey - Set initial pipeline stage
|
|
207
|
-
* @returns
|
|
209
|
+
* @returns CreateTwilioWorkerBuilder - chain .link*() then .execute()
|
|
208
210
|
*
|
|
209
211
|
* @example
|
|
210
212
|
* ```typescript
|
|
211
|
-
* // Create with properties
|
|
212
213
|
* const record = odinClient.twilioWorkers.new();
|
|
213
|
-
* await record.createTwilioWorker({ ... })
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* const payload = record.createTwilioWorker({ ... }).dryRun();
|
|
214
|
+
* await record.createTwilioWorker({ ... })
|
|
215
|
+
* .linkAssociation_xxx(target)
|
|
216
|
+
* .execute();
|
|
217
217
|
* ```
|
|
218
218
|
*/
|
|
219
|
-
createTwilioWorker(properties
|
|
220
|
-
type?: string;
|
|
219
|
+
createTwilioWorker(properties?: CreateTwilioWorkerProperties, options?: {
|
|
221
220
|
journeyId?: string;
|
|
222
221
|
stageKey?: string;
|
|
223
|
-
}):
|
|
222
|
+
}): CreateTwilioWorkerBuilder;
|
|
224
223
|
/**
|
|
225
224
|
* SyncTwilioWorker
|
|
226
225
|
*
|
|
@@ -252,29 +251,26 @@ export declare class TwilioWorkerRecord<TProps = TwilioWorkerProperties> {
|
|
|
252
251
|
* UpdateTwilioWorker
|
|
253
252
|
*
|
|
254
253
|
* Updates this TwilioWorker record.
|
|
255
|
-
* Returns
|
|
254
|
+
* Returns a builder with fluent .link*() methods for associations.
|
|
255
|
+
* Call .execute() to update or .dryRun() for debugging.
|
|
256
256
|
*
|
|
257
|
-
* @param
|
|
258
|
-
* @param options - Optional settings
|
|
259
|
-
* @returns
|
|
257
|
+
* @param properties - Properties to update
|
|
258
|
+
* @param options - Optional settings
|
|
259
|
+
* @returns UpdateTwilioWorkerBuilder - chain .link*() then .execute()
|
|
260
260
|
* @throws Error if called on a new (unsaved) record
|
|
261
261
|
*
|
|
262
262
|
* @example
|
|
263
263
|
* ```typescript
|
|
264
264
|
* const record = await odinClient.twilioWorkers.get(id);
|
|
265
|
-
* await record.updateTwilioWorker({ ... })
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* const payload = record.updateTwilioWorker({ ... }).dryRun();
|
|
265
|
+
* await record.updateTwilioWorker({ ... })
|
|
266
|
+
* .linkAssociation_xxx(target)
|
|
267
|
+
* .execute();
|
|
269
268
|
* ```
|
|
270
269
|
*/
|
|
271
|
-
updateTwilioWorker(
|
|
270
|
+
updateTwilioWorker(properties?: UpdateTwilioWorkerProperties, options?: {
|
|
272
271
|
journeyId?: string;
|
|
273
272
|
stageKey?: string;
|
|
274
|
-
}
|
|
275
|
-
journeyId?: string;
|
|
276
|
-
stageKey?: string;
|
|
277
|
-
}): ActionBuilder;
|
|
273
|
+
}): UpdateTwilioWorkerBuilder;
|
|
278
274
|
}
|
|
279
275
|
/** Type guard to check if an object is a TwilioWorkerRecord */
|
|
280
276
|
export declare function isTwilioWorkerRecord(obj: any): obj is TwilioWorkerRecord;
|
|
@@ -32,6 +32,8 @@ exports.isTwilioWorkerRecord = exports.TwilioWorkerRecord = void 0;
|
|
|
32
32
|
const uuid_1 = require("uuid");
|
|
33
33
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
34
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
35
|
+
const CreateTwilioWorkerDto_1 = require("../actions-v2/CreateTwilioWorkerDto");
|
|
36
|
+
const UpdateTwilioWorkerDto_1 = require("../actions-v2/UpdateTwilioWorkerDto");
|
|
35
37
|
const UserRecord_1 = require("./UserRecord");
|
|
36
38
|
const TwilioTaskQueueRecord_1 = require("./TwilioTaskQueueRecord");
|
|
37
39
|
/**
|
|
@@ -265,37 +267,25 @@ class TwilioWorkerRecord {
|
|
|
265
267
|
* CreateTwilioWorker
|
|
266
268
|
*
|
|
267
269
|
* Creates a new TwilioWorker record with the specified properties.
|
|
268
|
-
* Returns
|
|
270
|
+
* Returns a builder with fluent .link*() methods for associations.
|
|
271
|
+
* Call .execute() to create or .dryRun() for debugging.
|
|
269
272
|
*
|
|
270
273
|
* @param properties - The properties for the new record
|
|
271
274
|
* @param options - Optional settings
|
|
272
|
-
* @param options.type - Override the record type
|
|
273
275
|
* @param options.journeyId - Associate with a journey
|
|
274
276
|
* @param options.stageKey - Set initial pipeline stage
|
|
275
|
-
* @returns
|
|
277
|
+
* @returns CreateTwilioWorkerBuilder - chain .link*() then .execute()
|
|
276
278
|
*
|
|
277
279
|
* @example
|
|
278
280
|
* ```typescript
|
|
279
|
-
* // Create with properties
|
|
280
281
|
* const record = odinClient.twilioWorkers.new();
|
|
281
|
-
* await record.createTwilioWorker({ ... })
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
* const payload = record.createTwilioWorker({ ... }).dryRun();
|
|
282
|
+
* await record.createTwilioWorker({ ... })
|
|
283
|
+
* .linkAssociation_xxx(target)
|
|
284
|
+
* .execute();
|
|
285
285
|
* ```
|
|
286
286
|
*/
|
|
287
287
|
createTwilioWorker(properties, options) {
|
|
288
|
-
|
|
289
|
-
const payload = {
|
|
290
|
-
entity: 'SupportModule:TwilioWorker',
|
|
291
|
-
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,
|
|
292
|
-
actionName: 'CreateTwilioWorker',
|
|
293
|
-
properties: properties || {},
|
|
294
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
295
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
296
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
297
|
-
};
|
|
298
|
-
return new ActionBuilder(this._provider, 'SupportModule', 'TwilioWorker', payload, () => { this._pendingLinks = []; });
|
|
288
|
+
return new CreateTwilioWorkerDto_1.CreateTwilioWorkerBuilder(properties || {}, [...this._pendingLinks], options).withProvider(this._provider, 'SupportModule', 'TwilioWorker', () => { this._pendingLinks = []; });
|
|
299
289
|
}
|
|
300
290
|
// ============================================
|
|
301
291
|
// UPDATE ACTIONS (require existing record)
|
|
@@ -341,38 +331,27 @@ class TwilioWorkerRecord {
|
|
|
341
331
|
* UpdateTwilioWorker
|
|
342
332
|
*
|
|
343
333
|
* Updates this TwilioWorker record.
|
|
344
|
-
* Returns
|
|
334
|
+
* Returns a builder with fluent .link*() methods for associations.
|
|
335
|
+
* Call .execute() to update or .dryRun() for debugging.
|
|
345
336
|
*
|
|
346
|
-
* @param
|
|
347
|
-
* @param options - Optional settings
|
|
348
|
-
* @returns
|
|
337
|
+
* @param properties - Properties to update
|
|
338
|
+
* @param options - Optional settings
|
|
339
|
+
* @returns UpdateTwilioWorkerBuilder - chain .link*() then .execute()
|
|
349
340
|
* @throws Error if called on a new (unsaved) record
|
|
350
341
|
*
|
|
351
342
|
* @example
|
|
352
343
|
* ```typescript
|
|
353
344
|
* const record = await odinClient.twilioWorkers.get(id);
|
|
354
|
-
* await record.updateTwilioWorker({ ... })
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* const payload = record.updateTwilioWorker({ ... }).dryRun();
|
|
345
|
+
* await record.updateTwilioWorker({ ... })
|
|
346
|
+
* .linkAssociation_xxx(target)
|
|
347
|
+
* .execute();
|
|
358
348
|
* ```
|
|
359
349
|
*/
|
|
360
|
-
updateTwilioWorker(
|
|
350
|
+
updateTwilioWorker(properties, options) {
|
|
361
351
|
var _a;
|
|
362
352
|
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
363
353
|
throw new Error('updateTwilioWorker requires an existing record. Use accessor.get() first.');
|
|
364
|
-
|
|
365
|
-
let opts = options;
|
|
366
|
-
if (propertiesOrOptions) {
|
|
367
|
-
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
368
|
-
opts = propertiesOrOptions;
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
properties = propertiesOrOptions;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateTwilioWorker', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
375
|
-
return new ActionBuilder(this._provider, 'SupportModule', 'TwilioWorker', payload, () => { this._pendingLinks = []; });
|
|
354
|
+
return new UpdateTwilioWorkerDto_1.UpdateTwilioWorkerBuilder({ id: this._record.id, entity: this._record.entity, type: this._record.type }, properties || {}, [...this._pendingLinks], options).withProvider(this._provider, 'SupportModule', 'TwilioWorker', () => { this._pendingLinks = []; });
|
|
376
355
|
}
|
|
377
356
|
}
|
|
378
357
|
exports.TwilioWorkerRecord = TwilioWorkerRecord;
|