@d19n/youfibre-odin-sdk 2.0.208-beta.6 → 2.0.208-beta.7

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 **704** actions.
360
+ This SDK includes **703** actions.
361
361
 
362
362
  ### Action Types
363
363
 
@@ -1912,7 +1912,6 @@ This SDK includes **704** actions.
1912
1912
  |--------|------|-------|
1913
1913
  | `CreateTwilioWorker` | CREATE | k1.t-hEOJjsDb.SupportModule.TwilioWorker.Create.CreateTwilioWorker |
1914
1914
  | `SyncTwilioWorker` | UPDATE | k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.SyncTwilioWorker |
1915
- | `UpdateTwilioWorker` | UPDATE | k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker |
1916
1915
 
1917
1916
  #### User
1918
1917
 
@@ -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,102 @@ 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
+ * .execute();
38
+ * ```
39
+ */
40
+ export declare class CreateTwilioWorkerBuilder {
41
+ private _associations;
42
+ private _properties;
43
+ private _pendingLinks;
44
+ private _options?;
45
+ private _provider?;
46
+ private _moduleName?;
47
+ private _entityName?;
48
+ private _clearPendingLinks?;
49
+ private _externalId?;
50
+ private _externalAppId?;
51
+ private _groups?;
52
+ constructor(properties: CreateTwilioWorkerProperties, pendingLinks: OdinRecordLinkDto[], options?: {
53
+ journeyId?: string;
54
+ stageKey?: string;
55
+ });
28
56
  /**
29
- * Name
30
- *
31
- * Worker name
32
- * @type {TEXT}
57
+ * Link User__TwilioWorker
58
+ * @schemaAssociationId 0805e77a-9ea3-45fb-a958-959496b78234
33
59
  * @required
60
+ * @param target - The record to link
61
+ * @returns this (for method chaining)
62
+ */
63
+ linkAssociation_1781872155907(target: OdinRecord<any> | {
64
+ id: string;
65
+ entity: string;
66
+ }): this;
67
+ /**
68
+ * Set an external system identifier for this record.
69
+ * Links the record to a corresponding entry in an external application.
70
+ * @param externalId - The ID in the external system
71
+ * @param externalAppId - The external application identifier
72
+ * @returns this (for chaining)
73
+ */
74
+ withExternalId(externalId: string, externalAppId: string): this;
75
+ /**
76
+ * Set security/access groups for this record.
77
+ * @param groups - Array of group names
78
+ * @returns this (for chaining)
79
+ */
80
+ withGroups(groups: string[]): this;
81
+ /**
82
+ * Get the action payload without executing
83
+ * @returns The action data that would be sent
84
+ */
85
+ getData(): {
86
+ entity: string;
87
+ type: string | undefined;
88
+ actionName: string;
89
+ properties: CreateTwilioWorkerProperties;
90
+ associations?: OdinRecordLinkDto[];
91
+ journeyId?: string;
92
+ stageKey?: string;
93
+ externalId?: string;
94
+ externalAppId?: string;
95
+ groups?: string[];
96
+ };
97
+ /**
98
+ * Inject execution context (called by record wrapper)
99
+ * @internal
100
+ */
101
+ withProvider(provider: {
102
+ _applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
103
+ }, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
104
+ /**
105
+ * Execute the action
106
+ * @returns The result from the API
107
+ * @throws Error if withProvider() has not been called
108
+ */
109
+ execute(): Promise<any>;
110
+ /**
111
+ * Returns the request payload without executing (for debugging)
112
+ * @returns The request payload that would be sent to the API
113
+ */
114
+ dryRun(): Record<string, any>;
115
+ /**
116
+ * Prevents accidental `await builder` without .execute()
117
+ * @throws Error always - use .execute() or .dryRun() instead
34
118
  */
35
- Name: string;
119
+ then(): never;
36
120
  }
37
121
  /**
38
122
  * CreateTwilioWorker
@@ -59,6 +143,15 @@ export declare class CreateTwilioWorkerDto extends OdinRecordCreateDto<CreateTwi
59
143
  static readonly STEP_SCHEMA_ID = "79448527-2fc1-4d0d-a9a8-67fbd58b3df4";
60
144
  static readonly STEP_SCHEMA_ACTION_ID = "179fac43-5cac-4570-9540-f9d05043e5d9";
61
145
  static readonly AUTO_LINK_PARENT = true;
146
+ static readonly HAS_ASSOCIATIONS = true;
147
+ static readonly HAS_REQUIRED_ASSOCIATIONS = true;
148
+ static readonly BUILDER_CLASS = "CreateTwilioWorkerBuilder";
149
+ static readonly ASSOCIATION_FIELDS: readonly [{
150
+ readonly name: "Association_1781872155907";
151
+ readonly methodName: "linkAssociation_1781872155907";
152
+ readonly required: true;
153
+ readonly schemaAssociationId: "0805e77a-9ea3-45fb-a958-959496b78234";
154
+ }];
62
155
  readonly actionName: string;
63
156
  readonly schemaActionId: string;
64
157
  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.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
+ * .execute();
37
+ * ```
38
+ */
39
+ class CreateTwilioWorkerBuilder {
40
+ constructor(properties, pendingLinks, options) {
41
+ this._associations = [];
42
+ this._properties = properties;
43
+ this._pendingLinks = pendingLinks;
44
+ this._options = options;
45
+ }
46
+ /**
47
+ * Link User__TwilioWorker
48
+ * @schemaAssociationId 0805e77a-9ea3-45fb-a958-959496b78234
49
+ * @required
50
+ * @param target - The record to link
51
+ * @returns this (for method chaining)
52
+ */
53
+ linkAssociation_1781872155907(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({ 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 }));
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.CreateTwilioWorkerBuilder = CreateTwilioWorkerBuilder;
17
133
  /**
18
134
  * CreateTwilioWorker
19
135
  *
@@ -52,3 +168,7 @@ CreateTwilioWorkerDto.STEP_ENTITY = 'SupportModule:TwilioWorker';
52
168
  CreateTwilioWorkerDto.STEP_SCHEMA_ID = '79448527-2fc1-4d0d-a9a8-67fbd58b3df4';
53
169
  CreateTwilioWorkerDto.STEP_SCHEMA_ACTION_ID = '179fac43-5cac-4570-9540-f9d05043e5d9';
54
170
  CreateTwilioWorkerDto.AUTO_LINK_PARENT = true;
171
+ CreateTwilioWorkerDto.HAS_ASSOCIATIONS = true;
172
+ CreateTwilioWorkerDto.HAS_REQUIRED_ASSOCIATIONS = true;
173
+ CreateTwilioWorkerDto.BUILDER_CLASS = 'CreateTwilioWorkerBuilder';
174
+ CreateTwilioWorkerDto.ASSOCIATION_FIELDS = [{ "name": "Association_1781872155907", "methodName": "linkAssociation_1781872155907", "required": true, "schemaAssociationId": "0805e77a-9ea3-45fb-a958-959496b78234" }];
@@ -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: 2
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
@@ -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}
@@ -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) */
@@ -24,8 +24,8 @@ 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
- import { UpdateTwilioWorkerProperties } from '../actions-v2/UpdateTwilioWorkerDto';
29
29
  import { UserRecord } from './UserRecord';
30
30
  import { TwilioTaskQueueRecord } from './TwilioTaskQueueRecord';
31
31
  /** Valid entity types for TwilioWorker */
@@ -197,30 +197,27 @@ export declare class TwilioWorkerRecord<TProps = TwilioWorkerProperties> {
197
197
  * CreateTwilioWorker
198
198
  *
199
199
  * Creates a new TwilioWorker record with the specified properties.
200
- * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
200
+ * Returns a builder with fluent .link*() methods for associations.
201
+ * Call .execute() to create or .dryRun() for debugging.
201
202
  *
202
203
  * @param properties - The properties for the new record
203
204
  * @param options - Optional settings
204
- * @param options.type - Override the record type
205
205
  * @param options.journeyId - Associate with a journey
206
206
  * @param options.stageKey - Set initial pipeline stage
207
- * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
207
+ * @returns CreateTwilioWorkerBuilder - chain .link*() then .execute()
208
208
  *
209
209
  * @example
210
210
  * ```typescript
211
- * // Create with properties
212
211
  * const record = odinClient.twilioWorkers.new();
213
- * await record.createTwilioWorker({ ... }).execute();
214
- *
215
- * // Dry run (for debugging)
216
- * const payload = record.createTwilioWorker({ ... }).dryRun();
212
+ * await record.createTwilioWorker({ ... })
213
+ * .linkAssociation_xxx(target)
214
+ * .execute();
217
215
  * ```
218
216
  */
219
- createTwilioWorker(properties: CreateTwilioWorkerProperties, options?: {
220
- type?: string;
217
+ createTwilioWorker(properties?: CreateTwilioWorkerProperties, options?: {
221
218
  journeyId?: string;
222
219
  stageKey?: string;
223
- }): ActionBuilder;
220
+ }): CreateTwilioWorkerBuilder;
224
221
  /**
225
222
  * SyncTwilioWorker
226
223
  *
@@ -248,33 +245,6 @@ export declare class TwilioWorkerRecord<TProps = TwilioWorkerProperties> {
248
245
  journeyId?: string;
249
246
  stageKey?: string;
250
247
  }): ActionBuilder;
251
- /**
252
- * UpdateTwilioWorker
253
- *
254
- * Updates this TwilioWorker record.
255
- * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
256
- *
257
- * @param propertiesOrOptions - Properties to update, or options object
258
- * @param options - Optional settings (journeyId, stageKey)
259
- * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
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({ ... }).execute();
266
- *
267
- * // Dry run (for debugging)
268
- * const payload = record.updateTwilioWorker({ ... }).dryRun();
269
- * ```
270
- */
271
- updateTwilioWorker(propertiesOrOptions?: UpdateTwilioWorkerProperties | {
272
- journeyId?: string;
273
- stageKey?: string;
274
- }, options?: {
275
- journeyId?: string;
276
- stageKey?: string;
277
- }): ActionBuilder;
278
248
  }
279
249
  /** Type guard to check if an object is a TwilioWorkerRecord */
280
250
  export declare function isTwilioWorkerRecord(obj: any): obj is TwilioWorkerRecord;
@@ -32,6 +32,7 @@ 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");
35
36
  const UserRecord_1 = require("./UserRecord");
36
37
  const TwilioTaskQueueRecord_1 = require("./TwilioTaskQueueRecord");
37
38
  /**
@@ -265,37 +266,25 @@ class TwilioWorkerRecord {
265
266
  * CreateTwilioWorker
266
267
  *
267
268
  * Creates a new TwilioWorker record with the specified properties.
268
- * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
269
+ * Returns a builder with fluent .link*() methods for associations.
270
+ * Call .execute() to create or .dryRun() for debugging.
269
271
  *
270
272
  * @param properties - The properties for the new record
271
273
  * @param options - Optional settings
272
- * @param options.type - Override the record type
273
274
  * @param options.journeyId - Associate with a journey
274
275
  * @param options.stageKey - Set initial pipeline stage
275
- * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
276
+ * @returns CreateTwilioWorkerBuilder - chain .link*() then .execute()
276
277
  *
277
278
  * @example
278
279
  * ```typescript
279
- * // Create with properties
280
280
  * const record = odinClient.twilioWorkers.new();
281
- * await record.createTwilioWorker({ ... }).execute();
282
- *
283
- * // Dry run (for debugging)
284
- * const payload = record.createTwilioWorker({ ... }).dryRun();
281
+ * await record.createTwilioWorker({ ... })
282
+ * .linkAssociation_xxx(target)
283
+ * .execute();
285
284
  * ```
286
285
  */
287
286
  createTwilioWorker(properties, options) {
288
- var _a, _b;
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 = []; });
287
+ return new CreateTwilioWorkerDto_1.CreateTwilioWorkerBuilder(properties || {}, [...this._pendingLinks], options).withProvider(this._provider, 'SupportModule', 'TwilioWorker', () => { this._pendingLinks = []; });
299
288
  }
300
289
  // ============================================
301
290
  // UPDATE ACTIONS (require existing record)
@@ -337,43 +326,6 @@ class TwilioWorkerRecord {
337
326
  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);
338
327
  return new ActionBuilder(this._provider, 'SupportModule', 'TwilioWorker', payload, () => { this._pendingLinks = []; });
339
328
  }
340
- /**
341
- * UpdateTwilioWorker
342
- *
343
- * Updates this TwilioWorker record.
344
- * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
345
- *
346
- * @param propertiesOrOptions - Properties to update, or options object
347
- * @param options - Optional settings (journeyId, stageKey)
348
- * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
349
- * @throws Error if called on a new (unsaved) record
350
- *
351
- * @example
352
- * ```typescript
353
- * const record = await odinClient.twilioWorkers.get(id);
354
- * await record.updateTwilioWorker({ ... }).execute();
355
- *
356
- * // Dry run (for debugging)
357
- * const payload = record.updateTwilioWorker({ ... }).dryRun();
358
- * ```
359
- */
360
- updateTwilioWorker(propertiesOrOptions, options) {
361
- var _a;
362
- if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
363
- throw new Error('updateTwilioWorker requires an existing record. Use accessor.get() first.');
364
- let properties = {};
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 = []; });
376
- }
377
329
  }
378
330
  exports.TwilioWorkerRecord = TwilioWorkerRecord;
379
331
  // ============================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.208-beta.6",
3
+ "version": "2.0.208-beta.7",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",
@@ -1,72 +0,0 @@
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 } 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
- * UpdateTwilioWorker
38
- *
39
- * Update Twilio worker
40
- *
41
- * @actionType UPDATE - Updates an existing TwilioWorker record
42
- * @module SupportModule
43
- * @entity TwilioWorker
44
- * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
45
- * @permission schema.action.updatetwilioworker.trigger
46
- * @benchmark This action is tracked for performance benchmarks
47
- */
48
- export declare class UpdateTwilioWorkerDto extends OdinRecordUpdateDto<UpdateTwilioWorkerProperties> {
49
- /** Used by SDK generators to identify action type */
50
- static readonly ACTION_TYPE = "UPDATE";
51
- static readonly ACTION_KEY = "UpdateTwilioWorker";
52
- static readonly MODULE_NAME = "SupportModule";
53
- static readonly ENTITIES: string[];
54
- static readonly EVENT_NAME = "k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker";
55
- static readonly PERMISSION = "schema.action.updatetwilioworker.trigger";
56
- /** Step metadata - entity this action targets */
57
- static readonly STEP_ENTITY = "SupportModule:TwilioWorker";
58
- static readonly STEP_SCHEMA_ID = "79448527-2fc1-4d0d-a9a8-67fbd58b3df4";
59
- static readonly STEP_SCHEMA_ACTION_ID = "a31c47af-a845-4bea-8def-f777f5d670a4";
60
- static readonly AUTO_LINK_PARENT = false;
61
- readonly actionName: string;
62
- readonly schemaActionId: string;
63
- readonly entity: string;
64
- constructor(record: OdinRecord<any> | {
65
- id: string;
66
- entity: string;
67
- type?: string;
68
- }, properties: UpdateTwilioWorkerProperties, options?: {
69
- journeyId?: string;
70
- stageKey?: string;
71
- });
72
- }
@@ -1,56 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.UpdateTwilioWorkerDto = void 0;
16
- const core_1 = require("@d19n/odin-types/dist/core");
17
- /**
18
- * UpdateTwilioWorker
19
- *
20
- * Update Twilio worker
21
- *
22
- * @actionType UPDATE - Updates an existing TwilioWorker record
23
- * @module SupportModule
24
- * @entity TwilioWorker
25
- * @event k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker
26
- * @permission schema.action.updatetwilioworker.trigger
27
- * @benchmark This action is tracked for performance benchmarks
28
- */
29
- class UpdateTwilioWorkerDto extends core_1.OdinRecordUpdateDto {
30
- constructor(record, properties, options) {
31
- super({
32
- id: record.id,
33
- entity: record.entity,
34
- type: record.type,
35
- properties,
36
- journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
37
- stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
38
- });
39
- this.actionName = 'UpdateTwilioWorker';
40
- this.schemaActionId = 'a31c47af-a845-4bea-8def-f777f5d670a4';
41
- this.entity = 'SupportModule:TwilioWorker';
42
- }
43
- }
44
- exports.UpdateTwilioWorkerDto = UpdateTwilioWorkerDto;
45
- /** Used by SDK generators to identify action type */
46
- UpdateTwilioWorkerDto.ACTION_TYPE = 'UPDATE';
47
- UpdateTwilioWorkerDto.ACTION_KEY = 'UpdateTwilioWorker';
48
- UpdateTwilioWorkerDto.MODULE_NAME = 'SupportModule';
49
- UpdateTwilioWorkerDto.ENTITIES = ['TwilioWorker'];
50
- UpdateTwilioWorkerDto.EVENT_NAME = 'k1.t-hEOJjsDb.SupportModule.TwilioWorker.Update.UpdateTwilioWorker';
51
- UpdateTwilioWorkerDto.PERMISSION = 'schema.action.updatetwilioworker.trigger';
52
- /** Step metadata - entity this action targets */
53
- UpdateTwilioWorkerDto.STEP_ENTITY = 'SupportModule:TwilioWorker';
54
- UpdateTwilioWorkerDto.STEP_SCHEMA_ID = '79448527-2fc1-4d0d-a9a8-67fbd58b3df4';
55
- UpdateTwilioWorkerDto.STEP_SCHEMA_ACTION_ID = 'a31c47af-a845-4bea-8def-f777f5d670a4';
56
- UpdateTwilioWorkerDto.AUTO_LINK_PARENT = false;