@d19n/youfibre-odin-sdk 2.0.208 → 2.0.209-beta.1

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.
@@ -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 CreateTwilioTaskQueue created events
16
16
  *
@@ -50,6 +50,112 @@ export interface CreateTwilioTaskQueueProperties {
50
50
  */
51
51
  TaskOrder: string;
52
52
  }
53
+ /**
54
+ * Builder for CreateTwilioTaskQueue action
55
+ *
56
+ * Provides fluent API for adding associations before executing the action.
57
+ * Use .link*() methods to add associations, then call .execute() to run.
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * await record.createTwilioTaskQueue({ ...properties })
62
+ * .linkAssociation_1782126463687({ id: '...', entity: '...' })
63
+ * .linkAssociation_1782126470024({ id: '...', entity: '...' })
64
+ * .execute();
65
+ * ```
66
+ */
67
+ export declare class CreateTwilioTaskQueueBuilder {
68
+ private _associations;
69
+ private _properties;
70
+ private _pendingLinks;
71
+ private _options?;
72
+ private _provider?;
73
+ private _moduleName?;
74
+ private _entityName?;
75
+ private _clearPendingLinks?;
76
+ private _externalId?;
77
+ private _externalAppId?;
78
+ private _groups?;
79
+ constructor(properties: CreateTwilioTaskQueueProperties, pendingLinks: OdinRecordLinkDto[], options?: {
80
+ journeyId?: string;
81
+ stageKey?: string;
82
+ });
83
+ /**
84
+ * Link ReservationActivity__TwilioActivity
85
+ * @schemaAssociationId 30a7b861-527a-433c-8262-752fc32a0443
86
+ * @required
87
+ * @param target - The record to link
88
+ * @returns this (for method chaining)
89
+ */
90
+ linkAssociation_1782126463687(target: OdinRecord<any> | {
91
+ id: string;
92
+ entity: string;
93
+ }): this;
94
+ /**
95
+ * Link AssignmentActivity__TwilioActivity
96
+ * @schemaAssociationId dd980ffa-714c-4e45-92d4-596b0eade11e
97
+ * @required
98
+ * @param target - The record to link
99
+ * @returns this (for method chaining)
100
+ */
101
+ linkAssociation_1782126470024(target: OdinRecord<any> | {
102
+ id: string;
103
+ entity: string;
104
+ }): this;
105
+ /**
106
+ * Set an external system identifier for this record.
107
+ * Links the record to a corresponding entry in an external application.
108
+ * @param externalId - The ID in the external system
109
+ * @param externalAppId - The external application identifier
110
+ * @returns this (for chaining)
111
+ */
112
+ withExternalId(externalId: string, externalAppId: string): this;
113
+ /**
114
+ * Set security/access groups for this record.
115
+ * @param groups - Array of group names
116
+ * @returns this (for chaining)
117
+ */
118
+ withGroups(groups: string[]): this;
119
+ /**
120
+ * Get the action payload without executing
121
+ * @returns The action data that would be sent
122
+ */
123
+ getData(): {
124
+ entity: string;
125
+ type: string | undefined;
126
+ actionName: string;
127
+ properties: CreateTwilioTaskQueueProperties;
128
+ associations?: OdinRecordLinkDto[];
129
+ journeyId?: string;
130
+ stageKey?: string;
131
+ externalId?: string;
132
+ externalAppId?: string;
133
+ groups?: string[];
134
+ };
135
+ /**
136
+ * Inject execution context (called by record wrapper)
137
+ * @internal
138
+ */
139
+ withProvider(provider: {
140
+ _applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
141
+ }, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
142
+ /**
143
+ * Execute the action
144
+ * @returns The result from the API
145
+ * @throws Error if withProvider() has not been called
146
+ */
147
+ execute(): Promise<any>;
148
+ /**
149
+ * Returns the request payload without executing (for debugging)
150
+ * @returns The request payload that would be sent to the API
151
+ */
152
+ dryRun(): Record<string, any>;
153
+ /**
154
+ * Prevents accidental `await builder` without .execute()
155
+ * @throws Error always - use .execute() or .dryRun() instead
156
+ */
157
+ then(): never;
158
+ }
53
159
  /**
54
160
  * CreateTwilioTaskQueue
55
161
  *
@@ -75,6 +181,20 @@ export declare class CreateTwilioTaskQueueDto extends OdinRecordCreateDto<Create
75
181
  static readonly STEP_SCHEMA_ID = "dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56";
76
182
  static readonly STEP_SCHEMA_ACTION_ID = "ca6cd6f7-9144-4c46-9559-574716a3600e";
77
183
  static readonly AUTO_LINK_PARENT = true;
184
+ static readonly HAS_ASSOCIATIONS = true;
185
+ static readonly HAS_REQUIRED_ASSOCIATIONS = true;
186
+ static readonly BUILDER_CLASS = "CreateTwilioTaskQueueBuilder";
187
+ static readonly ASSOCIATION_FIELDS: readonly [{
188
+ readonly name: "Association_1782126463687";
189
+ readonly methodName: "linkAssociation_1782126463687";
190
+ readonly required: true;
191
+ readonly schemaAssociationId: "30a7b861-527a-433c-8262-752fc32a0443";
192
+ }, {
193
+ readonly name: "Association_1782126470024";
194
+ readonly methodName: "linkAssociation_1782126470024";
195
+ readonly required: true;
196
+ readonly schemaAssociationId: "dd980ffa-714c-4e45-92d4-596b0eade11e";
197
+ }];
78
198
  readonly actionName: string;
79
199
  readonly schemaActionId: string;
80
200
  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.CreateTwilioTaskQueueDto = void 0;
24
+ exports.CreateTwilioTaskQueueDto = exports.CreateTwilioTaskQueueBuilder = void 0;
16
25
  const core_1 = require("@d19n/odin-types/dist/core");
26
+ /**
27
+ * Builder for CreateTwilioTaskQueue 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.createTwilioTaskQueue({ ...properties })
35
+ * .linkAssociation_1782126463687({ id: '...', entity: '...' })
36
+ * .linkAssociation_1782126470024({ id: '...', entity: '...' })
37
+ * .execute();
38
+ * ```
39
+ */
40
+ class CreateTwilioTaskQueueBuilder {
41
+ constructor(properties, pendingLinks, options) {
42
+ this._associations = [];
43
+ this._properties = properties;
44
+ this._pendingLinks = pendingLinks;
45
+ this._options = options;
46
+ }
47
+ /**
48
+ * Link ReservationActivity__TwilioActivity
49
+ * @schemaAssociationId 30a7b861-527a-433c-8262-752fc32a0443
50
+ * @required
51
+ * @param target - The record to link
52
+ * @returns this (for method chaining)
53
+ */
54
+ linkAssociation_1782126463687(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 AssignmentActivity__TwilioActivity
63
+ * @schemaAssociationId dd980ffa-714c-4e45-92d4-596b0eade11e
64
+ * @required
65
+ * @param target - The record to link
66
+ * @returns this (for method chaining)
67
+ */
68
+ linkAssociation_1782126470024(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:TwilioTaskQueue', type: undefined, actionName: 'CreateTwilioTaskQueue', 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.CreateTwilioTaskQueueBuilder = CreateTwilioTaskQueueBuilder;
17
148
  /**
18
149
  * CreateTwilioTaskQueue
19
150
  *
@@ -52,3 +183,7 @@ CreateTwilioTaskQueueDto.STEP_ENTITY = 'SupportModule:TwilioTaskQueue';
52
183
  CreateTwilioTaskQueueDto.STEP_SCHEMA_ID = 'dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56';
53
184
  CreateTwilioTaskQueueDto.STEP_SCHEMA_ACTION_ID = 'ca6cd6f7-9144-4c46-9559-574716a3600e';
54
185
  CreateTwilioTaskQueueDto.AUTO_LINK_PARENT = true;
186
+ CreateTwilioTaskQueueDto.HAS_ASSOCIATIONS = true;
187
+ CreateTwilioTaskQueueDto.HAS_REQUIRED_ASSOCIATIONS = true;
188
+ CreateTwilioTaskQueueDto.BUILDER_CLASS = 'CreateTwilioTaskQueueBuilder';
189
+ CreateTwilioTaskQueueDto.ASSOCIATION_FIELDS = [{ "name": "Association_1782126463687", "methodName": "linkAssociation_1782126463687", "required": true, "schemaAssociationId": "30a7b861-527a-433c-8262-752fc32a0443" }, { "name": "Association_1782126470024", "methodName": "linkAssociation_1782126470024", "required": true, "schemaAssociationId": "dd980ffa-714c-4e45-92d4-596b0eade11e" }];
@@ -21,8 +21,17 @@ export interface CreateTwilioWorkerMessage extends OdinRecordCreatedEvent<Create
21
21
  /**
22
22
  * Properties for CreateTwilioWorker action
23
23
  *
24
+ * @property Required fields: 0
25
+ * @property Optional fields: 1
24
26
  */
25
27
  export interface CreateTwilioWorkerProperties {
28
+ /**
29
+ * UserId
30
+ *
31
+ * User reference
32
+ * @type {LOOKUP}
33
+ */
34
+ UserId?: string | null;
26
35
  }
27
36
  /**
28
37
  * Builder for CreateTwilioWorker action
@@ -33,7 +42,6 @@ export interface CreateTwilioWorkerProperties {
33
42
  * @example
34
43
  * ```typescript
35
44
  * await record.createTwilioWorker({ ...properties })
36
- * .linkAssociation_1781872155907({ id: '...', entity: '...' })
37
45
  * .linkAssociation_1781879666149({ id: '...', entity: '...' })
38
46
  * .execute();
39
47
  * ```
@@ -54,17 +62,6 @@ export declare class CreateTwilioWorkerBuilder {
54
62
  journeyId?: string;
55
63
  stageKey?: string;
56
64
  });
57
- /**
58
- * Link User__TwilioWorker
59
- * @schemaAssociationId 0805e77a-9ea3-45fb-a958-959496b78234
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
65
  /**
69
66
  * Link TwilioTaskQueue__TwilioWorker
70
67
  * @schemaAssociationId 9de524e5-a0e3-4580-a5eb-e19faf5711c3
@@ -159,11 +156,6 @@ export declare class CreateTwilioWorkerDto extends OdinRecordCreateDto<CreateTwi
159
156
  static readonly HAS_REQUIRED_ASSOCIATIONS = true;
160
157
  static readonly BUILDER_CLASS = "CreateTwilioWorkerBuilder";
161
158
  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
159
  readonly name: "Association_1781879666149";
168
160
  readonly methodName: "linkAssociation_1781879666149";
169
161
  readonly required: true;
@@ -32,7 +32,6 @@ const core_1 = require("@d19n/odin-types/dist/core");
32
32
  * @example
33
33
  * ```typescript
34
34
  * await record.createTwilioWorker({ ...properties })
35
- * .linkAssociation_1781872155907({ id: '...', entity: '...' })
36
35
  * .linkAssociation_1781879666149({ id: '...', entity: '...' })
37
36
  * .execute();
38
37
  * ```
@@ -44,20 +43,6 @@ class CreateTwilioWorkerBuilder {
44
43
  this._pendingLinks = pendingLinks;
45
44
  this._options = options;
46
45
  }
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
46
  /**
62
47
  * Link TwilioTaskQueue__TwilioWorker
63
48
  * @schemaAssociationId 9de524e5-a0e3-4580-a5eb-e19faf5711c3
@@ -186,4 +171,4 @@ CreateTwilioWorkerDto.AUTO_LINK_PARENT = true;
186
171
  CreateTwilioWorkerDto.HAS_ASSOCIATIONS = true;
187
172
  CreateTwilioWorkerDto.HAS_REQUIRED_ASSOCIATIONS = true;
188
173
  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" }];
174
+ CreateTwilioWorkerDto.ASSOCIATION_FIELDS = [{ "name": "Association_1781879666149", "methodName": "linkAssociation_1781879666149", "required": true, "schemaAssociationId": "9de524e5-a0e3-4580-a5eb-e19faf5711c3" }];
@@ -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 UpdateTwilioTaskQueue updated events
16
16
  *
@@ -54,6 +54,116 @@ export interface UpdateTwilioTaskQueueProperties {
54
54
  */
55
55
  TwilioSid?: string | null;
56
56
  }
57
+ /**
58
+ * Builder for UpdateTwilioTaskQueue action
59
+ *
60
+ * Provides fluent API for adding associations before executing the action.
61
+ * Use .link*() methods to add associations, then call .execute() to run.
62
+ *
63
+ * @example
64
+ * ```typescript
65
+ * await record.updateTwilioTaskQueue({ ...properties })
66
+ * .linkAssociation_1782126569403({ id: '...', entity: '...' })
67
+ * .linkAssociation_1782126575356({ id: '...', entity: '...' })
68
+ * .execute();
69
+ * ```
70
+ */
71
+ export declare class UpdateTwilioTaskQueueBuilder {
72
+ private _associations;
73
+ private _properties;
74
+ private _pendingLinks;
75
+ private _options?;
76
+ private _record;
77
+ private _provider?;
78
+ private _moduleName?;
79
+ private _entityName?;
80
+ private _clearPendingLinks?;
81
+ private _externalId?;
82
+ private _externalAppId?;
83
+ private _groups?;
84
+ constructor(record: {
85
+ id: string;
86
+ entity: string;
87
+ type?: string;
88
+ }, properties: UpdateTwilioTaskQueueProperties, pendingLinks: OdinRecordLinkDto[], options?: {
89
+ journeyId?: string;
90
+ stageKey?: string;
91
+ });
92
+ /**
93
+ * Link ReservationActivity__TwilioActivity
94
+ * @schemaAssociationId 30a7b861-527a-433c-8262-752fc32a0443
95
+ * @param target - The record to link
96
+ * @returns this (for method chaining)
97
+ */
98
+ linkAssociation_1782126569403(target: OdinRecord<any> | {
99
+ id: string;
100
+ entity: string;
101
+ }): this;
102
+ /**
103
+ * Link AssignmentActivity__TwilioActivity
104
+ * @schemaAssociationId dd980ffa-714c-4e45-92d4-596b0eade11e
105
+ * @param target - The record to link
106
+ * @returns this (for method chaining)
107
+ */
108
+ linkAssociation_1782126575356(target: OdinRecord<any> | {
109
+ id: string;
110
+ entity: string;
111
+ }): this;
112
+ /**
113
+ * Set an external system identifier for this record.
114
+ * Links the record to a corresponding entry in an external application.
115
+ * @param externalId - The ID in the external system
116
+ * @param externalAppId - The external application identifier
117
+ * @returns this (for chaining)
118
+ */
119
+ withExternalId(externalId: string, externalAppId: string): this;
120
+ /**
121
+ * Set security/access groups for this record.
122
+ * @param groups - Array of group names
123
+ * @returns this (for chaining)
124
+ */
125
+ withGroups(groups: string[]): this;
126
+ /**
127
+ * Get the action payload without executing
128
+ * @returns The action data that would be sent
129
+ */
130
+ getData(): {
131
+ id: string;
132
+ entity: string;
133
+ type?: string;
134
+ actionName: string;
135
+ properties: UpdateTwilioTaskQueueProperties;
136
+ associations?: OdinRecordLinkDto[];
137
+ journeyId?: string;
138
+ stageKey?: string;
139
+ externalId?: string;
140
+ externalAppId?: string;
141
+ groups?: string[];
142
+ };
143
+ /**
144
+ * Inject execution context (called by record wrapper)
145
+ * @internal
146
+ */
147
+ withProvider(provider: {
148
+ _applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
149
+ }, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
150
+ /**
151
+ * Execute the action
152
+ * @returns The result from the API
153
+ * @throws Error if withProvider() has not been called
154
+ */
155
+ execute(): Promise<any>;
156
+ /**
157
+ * Returns the request payload without executing (for debugging)
158
+ * @returns The request payload that would be sent to the API
159
+ */
160
+ dryRun(): Record<string, any>;
161
+ /**
162
+ * Prevents accidental `await builder` without .execute()
163
+ * @throws Error always - use .execute() or .dryRun() instead
164
+ */
165
+ then(): never;
166
+ }
57
167
  /**
58
168
  * UpdateTwilioTaskQueue
59
169
  *
@@ -79,6 +189,20 @@ export declare class UpdateTwilioTaskQueueDto extends OdinRecordUpdateDto<Update
79
189
  static readonly STEP_SCHEMA_ID = "dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56";
80
190
  static readonly STEP_SCHEMA_ACTION_ID = "c6885733-2941-48c0-8398-d9b9c1827075";
81
191
  static readonly AUTO_LINK_PARENT = false;
192
+ static readonly HAS_ASSOCIATIONS = true;
193
+ static readonly HAS_REQUIRED_ASSOCIATIONS = false;
194
+ static readonly BUILDER_CLASS = "UpdateTwilioTaskQueueBuilder";
195
+ static readonly ASSOCIATION_FIELDS: readonly [{
196
+ readonly name: "Association_1782126569403";
197
+ readonly methodName: "linkAssociation_1782126569403";
198
+ readonly required: false;
199
+ readonly schemaAssociationId: "30a7b861-527a-433c-8262-752fc32a0443";
200
+ }, {
201
+ readonly name: "Association_1782126575356";
202
+ readonly methodName: "linkAssociation_1782126575356";
203
+ readonly required: false;
204
+ readonly schemaAssociationId: "dd980ffa-714c-4e45-92d4-596b0eade11e";
205
+ }];
82
206
  readonly actionName: string;
83
207
  readonly schemaActionId: string;
84
208
  readonly entity: string;
@@ -11,9 +11,139 @@
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.UpdateTwilioTaskQueueDto = void 0;
24
+ exports.UpdateTwilioTaskQueueDto = exports.UpdateTwilioTaskQueueBuilder = void 0;
16
25
  const core_1 = require("@d19n/odin-types/dist/core");
26
+ /**
27
+ * Builder for UpdateTwilioTaskQueue 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.updateTwilioTaskQueue({ ...properties })
35
+ * .linkAssociation_1782126569403({ id: '...', entity: '...' })
36
+ * .linkAssociation_1782126575356({ id: '...', entity: '...' })
37
+ * .execute();
38
+ * ```
39
+ */
40
+ class UpdateTwilioTaskQueueBuilder {
41
+ constructor(record, properties, pendingLinks, options) {
42
+ this._associations = [];
43
+ this._record = record;
44
+ this._properties = properties;
45
+ this._pendingLinks = pendingLinks;
46
+ this._options = options;
47
+ }
48
+ /**
49
+ * Link ReservationActivity__TwilioActivity
50
+ * @schemaAssociationId 30a7b861-527a-433c-8262-752fc32a0443
51
+ * @param target - The record to link
52
+ * @returns this (for method chaining)
53
+ */
54
+ linkAssociation_1782126569403(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 AssignmentActivity__TwilioActivity
63
+ * @schemaAssociationId dd980ffa-714c-4e45-92d4-596b0eade11e
64
+ * @param target - The record to link
65
+ * @returns this (for method chaining)
66
+ */
67
+ linkAssociation_1782126575356(target) {
68
+ this._associations.push(new core_1.OdinRecordLinkDto({
69
+ id: target.id,
70
+ entity: 'entity' in target ? target.entity : target.entity,
71
+ }));
72
+ return this;
73
+ }
74
+ /**
75
+ * Set an external system identifier for this record.
76
+ * Links the record to a corresponding entry in an external application.
77
+ * @param externalId - The ID in the external system
78
+ * @param externalAppId - The external application identifier
79
+ * @returns this (for chaining)
80
+ */
81
+ withExternalId(externalId, externalAppId) {
82
+ this._externalId = externalId;
83
+ this._externalAppId = externalAppId;
84
+ return this;
85
+ }
86
+ /**
87
+ * Set security/access groups for this record.
88
+ * @param groups - Array of group names
89
+ * @returns this (for chaining)
90
+ */
91
+ withGroups(groups) {
92
+ this._groups = groups;
93
+ return this;
94
+ }
95
+ /**
96
+ * Get the action payload without executing
97
+ * @returns The action data that would be sent
98
+ */
99
+ getData() {
100
+ var _a, _b;
101
+ const allAssociations = [...this._associations, ...this._pendingLinks];
102
+ return Object.assign(Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateTwilioTaskQueue', 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 }));
103
+ }
104
+ /**
105
+ * Inject execution context (called by record wrapper)
106
+ * @internal
107
+ */
108
+ withProvider(provider, moduleName, entityName, clearPendingLinks) {
109
+ this._provider = provider;
110
+ this._moduleName = moduleName;
111
+ this._entityName = entityName;
112
+ this._clearPendingLinks = clearPendingLinks;
113
+ return this;
114
+ }
115
+ /**
116
+ * Execute the action
117
+ * @returns The result from the API
118
+ * @throws Error if withProvider() has not been called
119
+ */
120
+ execute() {
121
+ var _a;
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ if (!this._provider || !this._moduleName || !this._entityName) {
124
+ throw new Error('Builder not connected to provider. Use the record wrapper API to get an executable builder.');
125
+ }
126
+ const result = yield this._provider._applyAction(this._moduleName, this._entityName, this.getData());
127
+ (_a = this._clearPendingLinks) === null || _a === void 0 ? void 0 : _a.call(this);
128
+ return result;
129
+ });
130
+ }
131
+ /**
132
+ * Returns the request payload without executing (for debugging)
133
+ * @returns The request payload that would be sent to the API
134
+ */
135
+ dryRun() {
136
+ return this.getData();
137
+ }
138
+ /**
139
+ * Prevents accidental `await builder` without .execute()
140
+ * @throws Error always - use .execute() or .dryRun() instead
141
+ */
142
+ then() {
143
+ throw new Error('Builder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
144
+ }
145
+ }
146
+ exports.UpdateTwilioTaskQueueBuilder = UpdateTwilioTaskQueueBuilder;
17
147
  /**
18
148
  * UpdateTwilioTaskQueue
19
149
  *
@@ -54,3 +184,7 @@ UpdateTwilioTaskQueueDto.STEP_ENTITY = 'SupportModule:TwilioTaskQueue';
54
184
  UpdateTwilioTaskQueueDto.STEP_SCHEMA_ID = 'dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56';
55
185
  UpdateTwilioTaskQueueDto.STEP_SCHEMA_ACTION_ID = 'c6885733-2941-48c0-8398-d9b9c1827075';
56
186
  UpdateTwilioTaskQueueDto.AUTO_LINK_PARENT = false;
187
+ UpdateTwilioTaskQueueDto.HAS_ASSOCIATIONS = true;
188
+ UpdateTwilioTaskQueueDto.HAS_REQUIRED_ASSOCIATIONS = false;
189
+ UpdateTwilioTaskQueueDto.BUILDER_CLASS = 'UpdateTwilioTaskQueueBuilder';
190
+ UpdateTwilioTaskQueueDto.ASSOCIATION_FIELDS = [{ "name": "Association_1782126569403", "methodName": "linkAssociation_1782126569403", "required": false, "schemaAssociationId": "30a7b861-527a-433c-8262-752fc32a0443" }, { "name": "Association_1782126575356", "methodName": "linkAssociation_1782126575356", "required": false, "schemaAssociationId": "dd980ffa-714c-4e45-92d4-596b0eade11e" }];