@d19n/youfibre-odin-sdk 2.0.208-beta.7 → 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 CHANGED
@@ -357,7 +357,7 @@ This SDK includes **169** entities across **12** modules.
357
357
 
358
358
  ## Actions
359
359
 
360
- This SDK includes **703** actions.
360
+ This SDK includes **705** actions.
361
361
 
362
362
  ### Action Types
363
363
 
@@ -1312,6 +1312,7 @@ This SDK includes **703** 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 |
@@ -1912,6 +1913,7 @@ This SDK includes **703** actions.
1912
1913
  |--------|------|-------|
1913
1914
  | `CreateTwilioWorker` | CREATE | k1.t-hEOJjsDb.SupportModule.TwilioWorker.Create.CreateTwilioWorker |
1914
1915
  | `SyncTwilioWorker` | UPDATE | k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.SyncTwilioWorker |
1916
+ | `UpdateTwilioWorker` | UPDATE | k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker |
1915
1917
 
1916
1918
  #### User
1917
1919
 
@@ -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: 1
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: 1
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;
@@ -34,6 +34,7 @@ export interface CreateTwilioWorkerProperties {
34
34
  * ```typescript
35
35
  * await record.createTwilioWorker({ ...properties })
36
36
  * .linkAssociation_1781872155907({ id: '...', entity: '...' })
37
+ * .linkAssociation_1781879666149({ id: '...', entity: '...' })
37
38
  * .execute();
38
39
  * ```
39
40
  */
@@ -64,6 +65,17 @@ export declare class CreateTwilioWorkerBuilder {
64
65
  id: string;
65
66
  entity: string;
66
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;
67
79
  /**
68
80
  * Set an external system identifier for this record.
69
81
  * Links the record to a corresponding entry in an external application.
@@ -151,6 +163,11 @@ export declare class CreateTwilioWorkerDto extends OdinRecordCreateDto<CreateTwi
151
163
  readonly methodName: "linkAssociation_1781872155907";
152
164
  readonly required: true;
153
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";
154
171
  }];
155
172
  readonly actionName: string;
156
173
  readonly schemaActionId: string;
@@ -33,6 +33,7 @@ const core_1 = require("@d19n/odin-types/dist/core");
33
33
  * ```typescript
34
34
  * await record.createTwilioWorker({ ...properties })
35
35
  * .linkAssociation_1781872155907({ id: '...', entity: '...' })
36
+ * .linkAssociation_1781879666149({ id: '...', entity: '...' })
36
37
  * .execute();
37
38
  * ```
38
39
  */
@@ -57,6 +58,20 @@ class CreateTwilioWorkerBuilder {
57
58
  }));
58
59
  return this;
59
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
+ }
60
75
  /**
61
76
  * Set an external system identifier for this record.
62
77
  * Links the record to a corresponding entry in an external application.
@@ -171,4 +186,4 @@ CreateTwilioWorkerDto.AUTO_LINK_PARENT = true;
171
186
  CreateTwilioWorkerDto.HAS_ASSOCIATIONS = true;
172
187
  CreateTwilioWorkerDto.HAS_REQUIRED_ASSOCIATIONS = true;
173
188
  CreateTwilioWorkerDto.BUILDER_CLASS = 'CreateTwilioWorkerBuilder';
174
- CreateTwilioWorkerDto.ASSOCIATION_FIELDS = [{ "name": "Association_1781872155907", "methodName": "linkAssociation_1781872155907", "required": true, "schemaAssociationId": "0805e77a-9ea3-45fb-a958-959496b78234" }];
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" }];
@@ -0,0 +1,180 @@
1
+ /**
2
+ * UpdateTwilioWorker Action DTO
3
+ *
4
+ * Update Twilio worker
5
+ *
6
+ * @module SupportModule
7
+ * @entity TwilioWorker
8
+ * @actionKey UpdateTwilioWorker
9
+ * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
10
+ *
11
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
+ */
13
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
14
+ /**
15
+ * RabbitMQ message payload for UpdateTwilioWorker updated events
16
+ *
17
+ * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
18
+ */
19
+ export interface UpdateTwilioWorkerMessage extends OdinRecordUpdatedEvent<UpdateTwilioWorkerDto, UpdateTwilioWorkerProperties> {
20
+ }
21
+ /**
22
+ * Properties for UpdateTwilioWorker action
23
+ *
24
+ * @property Required fields: 0
25
+ * @property Optional fields: 1
26
+ */
27
+ export interface UpdateTwilioWorkerProperties {
28
+ /**
29
+ * Name
30
+ *
31
+ * Worker name
32
+ * @type {TEXT}
33
+ */
34
+ Name?: string | null;
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
+ }
135
+ /**
136
+ * UpdateTwilioWorker
137
+ *
138
+ * Update Twilio worker
139
+ *
140
+ * @actionType UPDATE - Updates an existing TwilioWorker record
141
+ * @module SupportModule
142
+ * @entity TwilioWorker
143
+ * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
144
+ * @permission schema.action.updatetwilioworker.trigger
145
+ * @benchmark This action is tracked for performance benchmarks
146
+ */
147
+ export declare class UpdateTwilioWorkerDto extends OdinRecordUpdateDto<UpdateTwilioWorkerProperties> {
148
+ /** Used by SDK generators to identify action type */
149
+ static readonly ACTION_TYPE = "UPDATE";
150
+ static readonly ACTION_KEY = "UpdateTwilioWorker";
151
+ static readonly MODULE_NAME = "SupportModule";
152
+ static readonly ENTITIES: string[];
153
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker";
154
+ static readonly PERMISSION = "schema.action.updatetwilioworker.trigger";
155
+ /** Step metadata - entity this action targets */
156
+ static readonly STEP_ENTITY = "SupportModule:TwilioWorker";
157
+ static readonly STEP_SCHEMA_ID = "79448527-2fc1-4d0d-a9a8-67fbd58b3df4";
158
+ static readonly STEP_SCHEMA_ACTION_ID = "0f10b303-ff0e-4ba8-ab05-97420a881066";
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
+ }];
169
+ readonly actionName: string;
170
+ readonly schemaActionId: string;
171
+ readonly entity: string;
172
+ constructor(record: OdinRecord<any> | {
173
+ id: string;
174
+ entity: string;
175
+ type?: string;
176
+ }, properties: UpdateTwilioWorkerProperties, options?: {
177
+ journeyId?: string;
178
+ stageKey?: string;
179
+ });
180
+ }
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ /**
3
+ * UpdateTwilioWorker Action DTO
4
+ *
5
+ * Update Twilio worker
6
+ *
7
+ * @module SupportModule
8
+ * @entity TwilioWorker
9
+ * @actionKey UpdateTwilioWorker
10
+ * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
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
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.UpdateTwilioWorkerDto = exports.UpdateTwilioWorkerBuilder = void 0;
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;
133
+ /**
134
+ * UpdateTwilioWorker
135
+ *
136
+ * Update Twilio worker
137
+ *
138
+ * @actionType UPDATE - Updates an existing TwilioWorker record
139
+ * @module SupportModule
140
+ * @entity TwilioWorker
141
+ * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
142
+ * @permission schema.action.updatetwilioworker.trigger
143
+ * @benchmark This action is tracked for performance benchmarks
144
+ */
145
+ class UpdateTwilioWorkerDto extends core_1.OdinRecordUpdateDto {
146
+ constructor(record, properties, options) {
147
+ super({
148
+ id: record.id,
149
+ entity: record.entity,
150
+ type: record.type,
151
+ properties,
152
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
153
+ stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
154
+ });
155
+ this.actionName = 'UpdateTwilioWorker';
156
+ this.schemaActionId = '0f10b303-ff0e-4ba8-ab05-97420a881066';
157
+ this.entity = 'SupportModule:TwilioWorker';
158
+ }
159
+ }
160
+ exports.UpdateTwilioWorkerDto = UpdateTwilioWorkerDto;
161
+ /** Used by SDK generators to identify action type */
162
+ UpdateTwilioWorkerDto.ACTION_TYPE = 'UPDATE';
163
+ UpdateTwilioWorkerDto.ACTION_KEY = 'UpdateTwilioWorker';
164
+ UpdateTwilioWorkerDto.MODULE_NAME = 'SupportModule';
165
+ UpdateTwilioWorkerDto.ENTITIES = ['TwilioWorker'];
166
+ UpdateTwilioWorkerDto.EVENT_NAME = 'k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker';
167
+ UpdateTwilioWorkerDto.PERMISSION = 'schema.action.updatetwilioworker.trigger';
168
+ /** Step metadata - entity this action targets */
169
+ UpdateTwilioWorkerDto.STEP_ENTITY = 'SupportModule:TwilioWorker';
170
+ UpdateTwilioWorkerDto.STEP_SCHEMA_ID = '79448527-2fc1-4d0d-a9a8-67fbd58b3df4';
171
+ UpdateTwilioWorkerDto.STEP_SCHEMA_ACTION_ID = '0f10b303-ff0e-4ba8-ab05-97420a881066';
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" }];
@@ -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
  *
@@ -26,6 +26,8 @@ import { TwilioWorkerProperties } from '../entities-v2/TwilioWorker';
26
26
  import { CreateTwilioWorkerProperties } from '../actions-v2/CreateTwilioWorkerDto';
27
27
  import { CreateTwilioWorkerBuilder } from '../actions-v2/CreateTwilioWorkerDto';
28
28
  import { SyncTwilioWorkerProperties } from '../actions-v2/SyncTwilioWorkerDto';
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 */
@@ -245,6 +247,30 @@ export declare class TwilioWorkerRecord<TProps = TwilioWorkerProperties> {
245
247
  journeyId?: string;
246
248
  stageKey?: string;
247
249
  }): ActionBuilder;
250
+ /**
251
+ * UpdateTwilioWorker
252
+ *
253
+ * Updates this TwilioWorker record.
254
+ * Returns a builder with fluent .link*() methods for associations.
255
+ * Call .execute() to update or .dryRun() for debugging.
256
+ *
257
+ * @param properties - Properties to update
258
+ * @param options - Optional settings
259
+ * @returns UpdateTwilioWorkerBuilder - chain .link*() then .execute()
260
+ * @throws Error if called on a new (unsaved) record
261
+ *
262
+ * @example
263
+ * ```typescript
264
+ * const record = await odinClient.twilioWorkers.get(id);
265
+ * await record.updateTwilioWorker({ ... })
266
+ * .linkAssociation_xxx(target)
267
+ * .execute();
268
+ * ```
269
+ */
270
+ updateTwilioWorker(properties?: UpdateTwilioWorkerProperties, options?: {
271
+ journeyId?: string;
272
+ stageKey?: string;
273
+ }): UpdateTwilioWorkerBuilder;
248
274
  }
249
275
  /** Type guard to check if an object is a TwilioWorkerRecord */
250
276
  export declare function isTwilioWorkerRecord(obj: any): obj is TwilioWorkerRecord;
@@ -33,6 +33,7 @@ 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
35
  const CreateTwilioWorkerDto_1 = require("../actions-v2/CreateTwilioWorkerDto");
36
+ const UpdateTwilioWorkerDto_1 = require("../actions-v2/UpdateTwilioWorkerDto");
36
37
  const UserRecord_1 = require("./UserRecord");
37
38
  const TwilioTaskQueueRecord_1 = require("./TwilioTaskQueueRecord");
38
39
  /**
@@ -326,6 +327,32 @@ class TwilioWorkerRecord {
326
327
  const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'SyncTwilioWorker', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
327
328
  return new ActionBuilder(this._provider, 'SupportModule', 'TwilioWorker', payload, () => { this._pendingLinks = []; });
328
329
  }
330
+ /**
331
+ * UpdateTwilioWorker
332
+ *
333
+ * Updates this TwilioWorker record.
334
+ * Returns a builder with fluent .link*() methods for associations.
335
+ * Call .execute() to update or .dryRun() for debugging.
336
+ *
337
+ * @param properties - Properties to update
338
+ * @param options - Optional settings
339
+ * @returns UpdateTwilioWorkerBuilder - chain .link*() then .execute()
340
+ * @throws Error if called on a new (unsaved) record
341
+ *
342
+ * @example
343
+ * ```typescript
344
+ * const record = await odinClient.twilioWorkers.get(id);
345
+ * await record.updateTwilioWorker({ ... })
346
+ * .linkAssociation_xxx(target)
347
+ * .execute();
348
+ * ```
349
+ */
350
+ updateTwilioWorker(properties, options) {
351
+ var _a;
352
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
353
+ throw new Error('updateTwilioWorker requires an existing record. Use accessor.get() first.');
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 = []; });
355
+ }
329
356
  }
330
357
  exports.TwilioWorkerRecord = TwilioWorkerRecord;
331
358
  // ============================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.208-beta.7",
3
+ "version": "2.0.208",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",