@d19n/youfibre-odin-sdk 2.0.244 → 2.0.245-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,112 @@
1
+ /**
2
+ * UpdateTransactionalEmails Action DTO
3
+ *
4
+ * Update Transactional Email
5
+ *
6
+ * @module NotificationModule
7
+ * @entity Email
8
+ * @entityType TRANSACTIONAL
9
+ * @actionKey UpdateTransactionalEmails
10
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
15
+ /**
16
+ * RabbitMQ message payload for UpdateTransactionalEmails updated events
17
+ *
18
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails
19
+ */
20
+ export interface UpdateTransactionalEmailsMessage extends OdinRecordUpdatedEvent<UpdateTransactionalEmailsDto, UpdateTransactionalEmailsProperties> {
21
+ }
22
+ /**
23
+ * Properties for UpdateTransactionalEmails action
24
+ *
25
+ * @property Required fields: 0
26
+ * @property Optional fields: 6
27
+ */
28
+ export interface UpdateTransactionalEmailsProperties {
29
+ /**
30
+ * Case
31
+ *
32
+ * Data field for Email records. Used by Communications team.
33
+ * @type {LOOKUP}
34
+ */
35
+ Case?: string | null;
36
+ /**
37
+ * ParentMessageId
38
+ *
39
+ * Parent Message id (Communications - Email)
40
+ * @type {LOOKUP}
41
+ */
42
+ ParentMessageId?: string | null;
43
+ /**
44
+ * ContactId
45
+ *
46
+ * The related Contact to send the email
47
+ * @type {LOOKUP}
48
+ */
49
+ ContactId?: string | null;
50
+ /**
51
+ * MessageId
52
+ *
53
+ * SMTP Message Id (Communications - Email)
54
+ * @type {TEXT}
55
+ */
56
+ MessageId?: string | null;
57
+ /**
58
+ * WorkOrder
59
+ *
60
+ * WorkOrder
61
+ * @type {LOOKUP}
62
+ */
63
+ WorkOrder?: string | null;
64
+ /**
65
+ * EmailSenderId
66
+ *
67
+ * The Email Sender related entity
68
+ * @type {LOOKUP}
69
+ */
70
+ EmailSenderId?: string | null;
71
+ }
72
+ /**
73
+ * UpdateTransactionalEmails
74
+ *
75
+ * Update Transactional Email
76
+ *
77
+ * @actionType UPDATE - Updates an existing Email record
78
+ * @module NotificationModule
79
+ * @entity Email
80
+ * @entityType TRANSACTIONAL (TRANSACTIONAL)
81
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails
82
+ * @permission schema.action.updatetransactionalemails.trigger
83
+ * @benchmark This action is tracked for performance benchmarks
84
+ */
85
+ export declare class UpdateTransactionalEmailsDto extends OdinRecordUpdateDto<UpdateTransactionalEmailsProperties> {
86
+ /** Used by SDK generators to identify action type */
87
+ static readonly ACTION_TYPE = "UPDATE";
88
+ static readonly ACTION_KEY = "UpdateTransactionalEmails";
89
+ static readonly MODULE_NAME = "NotificationModule";
90
+ static readonly ENTITIES: string[];
91
+ static readonly ENTITY_TYPE = "TRANSACTIONAL";
92
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails";
93
+ static readonly PERMISSION = "schema.action.updatetransactionalemails.trigger";
94
+ /** Step metadata - entity this action targets */
95
+ static readonly STEP_ENTITY = "NotificationModule:Email";
96
+ static readonly STEP_SCHEMA_ID = "67e4771c-37a0-444d-a626-e70651fd985f";
97
+ static readonly STEP_SCHEMA_ACTION_ID = "b88b9302-0179-4b6e-8dc2-84278a6554c0";
98
+ static readonly STEP_SCHEMA_TYPE_ID = "b5e81cc5-121c-4c8b-980a-70d98cf0c140";
99
+ static readonly STEP_TYPE = "TRANSACTIONAL";
100
+ static readonly AUTO_LINK_PARENT = false;
101
+ readonly actionName: string;
102
+ readonly schemaActionId: string;
103
+ readonly entity: string;
104
+ constructor(record: OdinRecord<any> | {
105
+ id: string;
106
+ entity: string;
107
+ type?: string;
108
+ }, properties: UpdateTransactionalEmailsProperties, options?: {
109
+ journeyId?: string;
110
+ stageKey?: string;
111
+ });
112
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /**
3
+ * UpdateTransactionalEmails Action DTO
4
+ *
5
+ * Update Transactional Email
6
+ *
7
+ * @module NotificationModule
8
+ * @entity Email
9
+ * @entityType TRANSACTIONAL
10
+ * @actionKey UpdateTransactionalEmails
11
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails
12
+ *
13
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.UpdateTransactionalEmailsDto = void 0;
17
+ const core_1 = require("@d19n/odin-types/dist/core");
18
+ /**
19
+ * UpdateTransactionalEmails
20
+ *
21
+ * Update Transactional Email
22
+ *
23
+ * @actionType UPDATE - Updates an existing Email record
24
+ * @module NotificationModule
25
+ * @entity Email
26
+ * @entityType TRANSACTIONAL (TRANSACTIONAL)
27
+ * @event k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails
28
+ * @permission schema.action.updatetransactionalemails.trigger
29
+ * @benchmark This action is tracked for performance benchmarks
30
+ */
31
+ class UpdateTransactionalEmailsDto extends core_1.OdinRecordUpdateDto {
32
+ constructor(record, properties, options) {
33
+ super({
34
+ id: record.id,
35
+ entity: record.entity,
36
+ type: record.type,
37
+ properties,
38
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
39
+ stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
40
+ });
41
+ this.actionName = 'UpdateTransactionalEmails';
42
+ this.schemaActionId = 'b88b9302-0179-4b6e-8dc2-84278a6554c0';
43
+ this.entity = 'NotificationModule:Email';
44
+ }
45
+ }
46
+ exports.UpdateTransactionalEmailsDto = UpdateTransactionalEmailsDto;
47
+ /** Used by SDK generators to identify action type */
48
+ UpdateTransactionalEmailsDto.ACTION_TYPE = 'UPDATE';
49
+ UpdateTransactionalEmailsDto.ACTION_KEY = 'UpdateTransactionalEmails';
50
+ UpdateTransactionalEmailsDto.MODULE_NAME = 'NotificationModule';
51
+ UpdateTransactionalEmailsDto.ENTITIES = ['Email'];
52
+ UpdateTransactionalEmailsDto.ENTITY_TYPE = 'TRANSACTIONAL';
53
+ UpdateTransactionalEmailsDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.Email.Update.UpdateTransactionalEmails';
54
+ UpdateTransactionalEmailsDto.PERMISSION = 'schema.action.updatetransactionalemails.trigger';
55
+ /** Step metadata - entity this action targets */
56
+ UpdateTransactionalEmailsDto.STEP_ENTITY = 'NotificationModule:Email';
57
+ UpdateTransactionalEmailsDto.STEP_SCHEMA_ID = '67e4771c-37a0-444d-a626-e70651fd985f';
58
+ UpdateTransactionalEmailsDto.STEP_SCHEMA_ACTION_ID = 'b88b9302-0179-4b6e-8dc2-84278a6554c0';
59
+ UpdateTransactionalEmailsDto.STEP_SCHEMA_TYPE_ID = 'b5e81cc5-121c-4c8b-980a-70d98cf0c140';
60
+ UpdateTransactionalEmailsDto.STEP_TYPE = 'TRANSACTIONAL';
61
+ UpdateTransactionalEmailsDto.AUTO_LINK_PARENT = false;
@@ -51,6 +51,7 @@ import { SendTlosNinjaCaseEmailProperties } from '../actions-v2/SendTlosNinjaCas
51
51
  import { UpdateEmailProperties } from '../actions-v2/UpdateEmailDto';
52
52
  import { UpdateSupportEmailProperties } from '../actions-v2/UpdateSupportEmailDto';
53
53
  import { UpdateTransactionalEmailProperties } from '../actions-v2/UpdateTransactionalEmailDto';
54
+ import { UpdateTransactionalEmailsProperties } from '../actions-v2/UpdateTransactionalEmailsDto';
54
55
  import { ReferralRecord } from './ReferralRecord';
55
56
  import { EmailSenderRecord } from './EmailSenderRecord';
56
57
  import { ContactRecord } from './ContactRecord';
@@ -1165,6 +1166,33 @@ export declare class EmailRecord<TProps = EmailProperties> {
1165
1166
  journeyId?: string;
1166
1167
  stageKey?: string;
1167
1168
  }): ActionBuilder;
1169
+ /**
1170
+ * UpdateTransactionalEmails
1171
+ *
1172
+ * Updates this Email record.
1173
+ * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
1174
+ *
1175
+ * @param propertiesOrOptions - Properties to update, or options object
1176
+ * @param options - Optional settings (journeyId, stageKey)
1177
+ * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
1178
+ * @throws Error if called on a new (unsaved) record
1179
+ *
1180
+ * @example
1181
+ * ```typescript
1182
+ * const record = await odinClient.emails.get(id);
1183
+ * await record.updateTransactionalEmails({ ... }).execute();
1184
+ *
1185
+ * // Dry run (for debugging)
1186
+ * const payload = record.updateTransactionalEmails({ ... }).dryRun();
1187
+ * ```
1188
+ */
1189
+ updateTransactionalEmails(propertiesOrOptions?: UpdateTransactionalEmailsProperties | {
1190
+ journeyId?: string;
1191
+ stageKey?: string;
1192
+ }, options?: {
1193
+ journeyId?: string;
1194
+ stageKey?: string;
1195
+ }): ActionBuilder;
1168
1196
  }
1169
1197
  /** Type guard to check if an object is a EmailRecord */
1170
1198
  export declare function isEmailRecord(obj: any): obj is EmailRecord;
@@ -1500,6 +1500,43 @@ class EmailRecord {
1500
1500
  const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateTransactionalEmail', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
1501
1501
  return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
1502
1502
  }
1503
+ /**
1504
+ * UpdateTransactionalEmails
1505
+ *
1506
+ * Updates this Email record.
1507
+ * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
1508
+ *
1509
+ * @param propertiesOrOptions - Properties to update, or options object
1510
+ * @param options - Optional settings (journeyId, stageKey)
1511
+ * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
1512
+ * @throws Error if called on a new (unsaved) record
1513
+ *
1514
+ * @example
1515
+ * ```typescript
1516
+ * const record = await odinClient.emails.get(id);
1517
+ * await record.updateTransactionalEmails({ ... }).execute();
1518
+ *
1519
+ * // Dry run (for debugging)
1520
+ * const payload = record.updateTransactionalEmails({ ... }).dryRun();
1521
+ * ```
1522
+ */
1523
+ updateTransactionalEmails(propertiesOrOptions, options) {
1524
+ var _a;
1525
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
1526
+ throw new Error('updateTransactionalEmails requires an existing record. Use accessor.get() first.');
1527
+ let properties = {};
1528
+ let opts = options;
1529
+ if (propertiesOrOptions) {
1530
+ if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
1531
+ opts = propertiesOrOptions;
1532
+ }
1533
+ else {
1534
+ properties = propertiesOrOptions;
1535
+ }
1536
+ }
1537
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateTransactionalEmails', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
1538
+ return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
1539
+ }
1503
1540
  }
1504
1541
  exports.EmailRecord = EmailRecord;
1505
1542
  // ============================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.244",
3
+ "version": "2.0.245-beta.0",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",