@d19n/youfibre-odin-sdk 2.0.209-beta.1 → 2.0.211-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.
@@ -22,7 +22,7 @@ export interface AddressCreateMessage extends OdinRecordCreatedEvent<AddressCrea
22
22
  * Properties for AddressCreate action
23
23
  *
24
24
  * @property Required fields: 1
25
- * @property Optional fields: 19
25
+ * @property Optional fields: 20
26
26
  */
27
27
  export interface AddressCreateProperties {
28
28
  /**
@@ -21,8 +21,8 @@ export interface CreateTwilioActivityMessage extends OdinRecordCreatedEvent<Crea
21
21
  /**
22
22
  * Properties for CreateTwilioActivity action
23
23
  *
24
- * @property Required fields: 2
25
- * @property Optional fields: 0
24
+ * @property Required fields: 1
25
+ * @property Optional fields: 1
26
26
  */
27
27
  export interface CreateTwilioActivityProperties {
28
28
  /**
@@ -38,9 +38,8 @@ export interface CreateTwilioActivityProperties {
38
38
  *
39
39
  * Availability status of the activity
40
40
  * @type {BOOLEAN}
41
- * @required
42
41
  */
43
- Available: boolean;
42
+ Available?: boolean | null;
44
43
  }
45
44
  /**
46
45
  * CreateTwilioActivity
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
12
  */
13
- import { OdinRecord, OdinRecordCreateDto, OdinRecordCreatedEvent, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
13
+ import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
14
14
  /**
15
15
  * RabbitMQ message payload for CreateTwilioTaskQueue created events
16
16
  *
@@ -21,7 +21,7 @@ export interface CreateTwilioTaskQueueMessage extends OdinRecordCreatedEvent<Cre
21
21
  /**
22
22
  * Properties for CreateTwilioTaskQueue action
23
23
  *
24
- * @property Required fields: 3
24
+ * @property Required fields: 5
25
25
  * @property Optional fields: 0
26
26
  */
27
27
  export interface CreateTwilioTaskQueueProperties {
@@ -49,112 +49,22 @@ export interface CreateTwilioTaskQueueProperties {
49
49
  * @required
50
50
  */
51
51
  TaskOrder: string;
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
52
  /**
84
- * Link ReservationActivity__TwilioActivity
85
- * @schemaAssociationId 30a7b861-527a-433c-8262-752fc32a0443
53
+ * AssignmentActivity
54
+ *
55
+ * Activity a worker is moved to when they accept the task
56
+ * @type {LOOKUP}
86
57
  * @required
87
- * @param target - The record to link
88
- * @returns this (for method chaining)
89
58
  */
90
- linkAssociation_1782126463687(target: OdinRecord<any> | {
91
- id: string;
92
- entity: string;
93
- }): this;
59
+ AssignmentActivity: string;
94
60
  /**
95
- * Link AssignmentActivity__TwilioActivity
96
- * @schemaAssociationId dd980ffa-714c-4e45-92d4-596b0eade11e
61
+ * ReservationActivity
62
+ *
63
+ * Activity a worker is moved to when a task is offered to them
64
+ * @type {LOOKUP}
97
65
  * @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
66
  */
157
- then(): never;
67
+ ReservationActivity: string;
158
68
  }
159
69
  /**
160
70
  * CreateTwilioTaskQueue
@@ -181,20 +91,6 @@ export declare class CreateTwilioTaskQueueDto extends OdinRecordCreateDto<Create
181
91
  static readonly STEP_SCHEMA_ID = "dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56";
182
92
  static readonly STEP_SCHEMA_ACTION_ID = "ca6cd6f7-9144-4c46-9559-574716a3600e";
183
93
  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
- }];
198
94
  readonly actionName: string;
199
95
  readonly schemaActionId: string;
200
96
  readonly entity: string;
@@ -11,140 +11,9 @@
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
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.CreateTwilioTaskQueueDto = exports.CreateTwilioTaskQueueBuilder = void 0;
15
+ exports.CreateTwilioTaskQueueDto = void 0;
25
16
  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;
148
17
  /**
149
18
  * CreateTwilioTaskQueue
150
19
  *
@@ -183,7 +52,3 @@ CreateTwilioTaskQueueDto.STEP_ENTITY = 'SupportModule:TwilioTaskQueue';
183
52
  CreateTwilioTaskQueueDto.STEP_SCHEMA_ID = 'dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56';
184
53
  CreateTwilioTaskQueueDto.STEP_SCHEMA_ACTION_ID = 'ca6cd6f7-9144-4c46-9559-574716a3600e';
185
54
  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" }];
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
12
  */
13
- import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
13
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
14
14
  /**
15
15
  * RabbitMQ message payload for UpdateTwilioTaskQueue updated events
16
16
  *
@@ -22,7 +22,7 @@ export interface UpdateTwilioTaskQueueMessage extends OdinRecordUpdatedEvent<Upd
22
22
  * Properties for UpdateTwilioTaskQueue action
23
23
  *
24
24
  * @property Required fields: 0
25
- * @property Optional fields: 4
25
+ * @property Optional fields: 5
26
26
  */
27
27
  export interface UpdateTwilioTaskQueueProperties {
28
28
  /**
@@ -47,122 +47,19 @@ export interface UpdateTwilioTaskQueueProperties {
47
47
  */
48
48
  TaskOrder?: string | null;
49
49
  /**
50
- * TwilioSid
50
+ * AssignmentActivity
51
51
  *
52
- * Twilio task queue sid
53
- * @type {TEXT}
54
- */
55
- TwilioSid?: string | null;
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)
52
+ * Activity a worker is moved to when they accept the task
53
+ * @type {LOOKUP}
124
54
  */
125
- withGroups(groups: string[]): this;
55
+ AssignmentActivity?: string | null;
126
56
  /**
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
57
+ * ReservationActivity
58
+ *
59
+ * Activity a worker is moved to when a task is offered to them
60
+ * @type {LOOKUP}
164
61
  */
165
- then(): never;
62
+ ReservationActivity?: string | null;
166
63
  }
167
64
  /**
168
65
  * UpdateTwilioTaskQueue
@@ -189,20 +86,6 @@ export declare class UpdateTwilioTaskQueueDto extends OdinRecordUpdateDto<Update
189
86
  static readonly STEP_SCHEMA_ID = "dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56";
190
87
  static readonly STEP_SCHEMA_ACTION_ID = "c6885733-2941-48c0-8398-d9b9c1827075";
191
88
  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
- }];
206
89
  readonly actionName: string;
207
90
  readonly schemaActionId: string;
208
91
  readonly entity: string;
@@ -11,139 +11,9 @@
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
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.UpdateTwilioTaskQueueDto = exports.UpdateTwilioTaskQueueBuilder = void 0;
15
+ exports.UpdateTwilioTaskQueueDto = void 0;
25
16
  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;
147
17
  /**
148
18
  * UpdateTwilioTaskQueue
149
19
  *
@@ -184,7 +54,3 @@ UpdateTwilioTaskQueueDto.STEP_ENTITY = 'SupportModule:TwilioTaskQueue';
184
54
  UpdateTwilioTaskQueueDto.STEP_SCHEMA_ID = 'dcbdbcfe-bfb3-4e3c-bdd1-92b53bebeb56';
185
55
  UpdateTwilioTaskQueueDto.STEP_SCHEMA_ACTION_ID = 'c6885733-2941-48c0-8398-d9b9c1827075';
186
56
  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" }];
@@ -42,8 +42,12 @@ export declare enum TwilioTaskQueuePropertyKeys {
42
42
  Name = "Name",
43
43
  /** Twilio task queue sid */
44
44
  TwilioSid = "TwilioSid",
45
+ /** Activity a worker is moved to when they accept the task */
46
+ AssignmentActivity = "AssignmentActivity",
45
47
  /** Maximum number of workers that can be reserved simultaneously for tasks from this queue. */
46
48
  MaxReservedWorkers = "MaxReservedWorkers",
49
+ /** Activity a worker is moved to when a task is offered to them */
50
+ ReservationActivity = "ReservationActivity",
47
51
  /** Order in which tasks are assigned to workers */
48
52
  TaskOrder = "TaskOrder"
49
53
  }
@@ -63,11 +67,21 @@ export interface TwilioTaskQueueProperties {
63
67
  * @type {TEXT}
64
68
  */
65
69
  TwilioSid: string;
70
+ /** Activity a worker is moved to when they accept the task
71
+ *
72
+ * @type {LOOKUP}
73
+ */
74
+ AssignmentActivity: string;
66
75
  /** Maximum number of workers that can be reserved simultaneously for tasks from this queue.
67
76
  *
68
77
  * @type {NUMBER}
69
78
  */
70
79
  MaxReservedWorkers: number;
80
+ /** Activity a worker is moved to when a task is offered to them
81
+ *
82
+ * @type {LOOKUP}
83
+ */
84
+ ReservationActivity: string;
71
85
  /** Order in which tasks are assigned to workers
72
86
  *
73
87
  * @type {ENUM}
@@ -46,8 +46,12 @@ var TwilioTaskQueuePropertyKeys;
46
46
  TwilioTaskQueuePropertyKeys["Name"] = "Name";
47
47
  /** Twilio task queue sid */
48
48
  TwilioTaskQueuePropertyKeys["TwilioSid"] = "TwilioSid";
49
+ /** Activity a worker is moved to when they accept the task */
50
+ TwilioTaskQueuePropertyKeys["AssignmentActivity"] = "AssignmentActivity";
49
51
  /** Maximum number of workers that can be reserved simultaneously for tasks from this queue. */
50
52
  TwilioTaskQueuePropertyKeys["MaxReservedWorkers"] = "MaxReservedWorkers";
53
+ /** Activity a worker is moved to when a task is offered to them */
54
+ TwilioTaskQueuePropertyKeys["ReservationActivity"] = "ReservationActivity";
51
55
  /** Order in which tasks are assigned to workers */
52
56
  TwilioTaskQueuePropertyKeys["TaskOrder"] = "TaskOrder";
53
57
  })(TwilioTaskQueuePropertyKeys = exports.TwilioTaskQueuePropertyKeys || (exports.TwilioTaskQueuePropertyKeys = {}));
@@ -24,10 +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 { TwilioTaskQueueProperties } from '../entities-v2/TwilioTaskQueue';
26
26
  import { CreateTwilioTaskQueueProperties } from '../actions-v2/CreateTwilioTaskQueueDto';
27
- import { CreateTwilioTaskQueueBuilder } from '../actions-v2/CreateTwilioTaskQueueDto';
28
27
  import { SyncTwilioTaskQueueProperties } from '../actions-v2/SyncTwilioTaskQueueDto';
29
28
  import { UpdateTwilioTaskQueueProperties } from '../actions-v2/UpdateTwilioTaskQueueDto';
30
- import { UpdateTwilioTaskQueueBuilder } from '../actions-v2/UpdateTwilioTaskQueueDto';
31
29
  import { TwilioWorkerRecord } from './TwilioWorkerRecord';
32
30
  import { TwilioActivityRecord } from './TwilioActivityRecord';
33
31
  /** Valid entity types for TwilioTaskQueue */
@@ -199,27 +197,30 @@ export declare class TwilioTaskQueueRecord<TProps = TwilioTaskQueueProperties> {
199
197
  * CreateTwilioTaskQueue
200
198
  *
201
199
  * Creates a new TwilioTaskQueue record with the specified properties.
202
- * Returns a builder with fluent .link*() methods for associations.
203
- * Call .execute() to create or .dryRun() for debugging.
200
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
204
201
  *
205
202
  * @param properties - The properties for the new record
206
203
  * @param options - Optional settings
204
+ * @param options.type - Override the record type
207
205
  * @param options.journeyId - Associate with a journey
208
206
  * @param options.stageKey - Set initial pipeline stage
209
- * @returns CreateTwilioTaskQueueBuilder - chain .link*() then .execute()
207
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
210
208
  *
211
209
  * @example
212
210
  * ```typescript
211
+ * // Create with properties
213
212
  * const record = odinClient.twilioTaskQueues.new();
214
- * await record.createTwilioTaskQueue({ ... })
215
- * .linkAssociation_xxx(target)
216
- * .execute();
213
+ * await record.createTwilioTaskQueue({ ... }).execute();
214
+ *
215
+ * // Dry run (for debugging)
216
+ * const payload = record.createTwilioTaskQueue({ ... }).dryRun();
217
217
  * ```
218
218
  */
219
219
  createTwilioTaskQueue(properties: CreateTwilioTaskQueueProperties, options?: {
220
+ type?: string;
220
221
  journeyId?: string;
221
222
  stageKey?: string;
222
- }): CreateTwilioTaskQueueBuilder;
223
+ }): ActionBuilder;
223
224
  /**
224
225
  * SyncTwilioTaskQueue
225
226
  *
@@ -251,26 +252,29 @@ export declare class TwilioTaskQueueRecord<TProps = TwilioTaskQueueProperties> {
251
252
  * UpdateTwilioTaskQueue
252
253
  *
253
254
  * Updates this TwilioTaskQueue record.
254
- * Returns a builder with fluent .link*() methods for associations.
255
- * Call .execute() to update or .dryRun() for debugging.
255
+ * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
256
256
  *
257
- * @param properties - Properties to update
258
- * @param options - Optional settings
259
- * @returns UpdateTwilioTaskQueueBuilder - chain .link*() then .execute()
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
260
  * @throws Error if called on a new (unsaved) record
261
261
  *
262
262
  * @example
263
263
  * ```typescript
264
264
  * const record = await odinClient.twilioTaskQueues.get(id);
265
- * await record.updateTwilioTaskQueue({ ... })
266
- * .linkAssociation_xxx(target)
267
- * .execute();
265
+ * await record.updateTwilioTaskQueue({ ... }).execute();
266
+ *
267
+ * // Dry run (for debugging)
268
+ * const payload = record.updateTwilioTaskQueue({ ... }).dryRun();
268
269
  * ```
269
270
  */
270
- updateTwilioTaskQueue(properties?: UpdateTwilioTaskQueueProperties, options?: {
271
+ updateTwilioTaskQueue(propertiesOrOptions?: UpdateTwilioTaskQueueProperties | {
271
272
  journeyId?: string;
272
273
  stageKey?: string;
273
- }): UpdateTwilioTaskQueueBuilder;
274
+ }, options?: {
275
+ journeyId?: string;
276
+ stageKey?: string;
277
+ }): ActionBuilder;
274
278
  }
275
279
  /** Type guard to check if an object is a TwilioTaskQueueRecord */
276
280
  export declare function isTwilioTaskQueueRecord(obj: any): obj is TwilioTaskQueueRecord;
@@ -32,8 +32,6 @@ exports.isTwilioTaskQueueRecord = exports.TwilioTaskQueueRecord = 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 CreateTwilioTaskQueueDto_1 = require("../actions-v2/CreateTwilioTaskQueueDto");
36
- const UpdateTwilioTaskQueueDto_1 = require("../actions-v2/UpdateTwilioTaskQueueDto");
37
35
  const TwilioWorkerRecord_1 = require("./TwilioWorkerRecord");
38
36
  const TwilioActivityRecord_1 = require("./TwilioActivityRecord");
39
37
  /**
@@ -267,25 +265,37 @@ class TwilioTaskQueueRecord {
267
265
  * CreateTwilioTaskQueue
268
266
  *
269
267
  * Creates a new TwilioTaskQueue record with the specified properties.
270
- * Returns a builder with fluent .link*() methods for associations.
271
- * Call .execute() to create or .dryRun() for debugging.
268
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
272
269
  *
273
270
  * @param properties - The properties for the new record
274
271
  * @param options - Optional settings
272
+ * @param options.type - Override the record type
275
273
  * @param options.journeyId - Associate with a journey
276
274
  * @param options.stageKey - Set initial pipeline stage
277
- * @returns CreateTwilioTaskQueueBuilder - chain .link*() then .execute()
275
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
278
276
  *
279
277
  * @example
280
278
  * ```typescript
279
+ * // Create with properties
281
280
  * const record = odinClient.twilioTaskQueues.new();
282
- * await record.createTwilioTaskQueue({ ... })
283
- * .linkAssociation_xxx(target)
284
- * .execute();
281
+ * await record.createTwilioTaskQueue({ ... }).execute();
282
+ *
283
+ * // Dry run (for debugging)
284
+ * const payload = record.createTwilioTaskQueue({ ... }).dryRun();
285
285
  * ```
286
286
  */
287
287
  createTwilioTaskQueue(properties, options) {
288
- return new CreateTwilioTaskQueueDto_1.CreateTwilioTaskQueueBuilder(properties || {}, [...this._pendingLinks], options).withProvider(this._provider, 'SupportModule', 'TwilioTaskQueue', () => { this._pendingLinks = []; });
288
+ var _a, _b;
289
+ const payload = {
290
+ entity: 'SupportModule:TwilioTaskQueue',
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: 'CreateTwilioTaskQueue',
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', 'TwilioTaskQueue', payload, () => { this._pendingLinks = []; });
289
299
  }
290
300
  // ============================================
291
301
  // UPDATE ACTIONS (require existing record)
@@ -331,27 +341,38 @@ class TwilioTaskQueueRecord {
331
341
  * UpdateTwilioTaskQueue
332
342
  *
333
343
  * Updates this TwilioTaskQueue record.
334
- * Returns a builder with fluent .link*() methods for associations.
335
- * Call .execute() to update or .dryRun() for debugging.
344
+ * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
336
345
  *
337
- * @param properties - Properties to update
338
- * @param options - Optional settings
339
- * @returns UpdateTwilioTaskQueueBuilder - chain .link*() then .execute()
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
340
349
  * @throws Error if called on a new (unsaved) record
341
350
  *
342
351
  * @example
343
352
  * ```typescript
344
353
  * const record = await odinClient.twilioTaskQueues.get(id);
345
- * await record.updateTwilioTaskQueue({ ... })
346
- * .linkAssociation_xxx(target)
347
- * .execute();
354
+ * await record.updateTwilioTaskQueue({ ... }).execute();
355
+ *
356
+ * // Dry run (for debugging)
357
+ * const payload = record.updateTwilioTaskQueue({ ... }).dryRun();
348
358
  * ```
349
359
  */
350
- updateTwilioTaskQueue(properties, options) {
360
+ updateTwilioTaskQueue(propertiesOrOptions, options) {
351
361
  var _a;
352
362
  if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
353
363
  throw new Error('updateTwilioTaskQueue requires an existing record. Use accessor.get() first.');
354
- return new UpdateTwilioTaskQueueDto_1.UpdateTwilioTaskQueueBuilder({ id: this._record.id, entity: this._record.entity, type: this._record.type }, properties || {}, [...this._pendingLinks], options).withProvider(this._provider, 'SupportModule', 'TwilioTaskQueue', () => { this._pendingLinks = []; });
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: 'UpdateTwilioTaskQueue', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
375
+ return new ActionBuilder(this._provider, 'SupportModule', 'TwilioTaskQueue', payload, () => { this._pendingLinks = []; });
355
376
  }
356
377
  }
357
378
  exports.TwilioTaskQueueRecord = TwilioTaskQueueRecord;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.209-beta.1",
3
+ "version": "2.0.211-beta.1",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",