@d19n/youfibre-odin-sdk 2.0.208-beta.3 → 2.0.208-beta.5

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.
@@ -37,10 +37,10 @@ export interface CreateTwilioTaskQueueProperties {
37
37
  * MaxReservedWorkers
38
38
  *
39
39
  * Maximum number of workers that can be reserved simultaneously for tasks from this queue.
40
- * @type {TEXT}
40
+ * @type {NUMBER}
41
41
  * @required
42
42
  */
43
- MaxReservedWorkers: string;
43
+ MaxReservedWorkers: number;
44
44
  /**
45
45
  * TaskOrder
46
46
  *
@@ -21,8 +21,8 @@ export interface SyncTwilioTaskQueueMessage extends OdinRecordUpdatedEvent<SyncT
21
21
  /**
22
22
  * Properties for SyncTwilioTaskQueue action
23
23
  *
24
- * @property Required fields: 1
25
- * @property Optional fields: 0
24
+ * @property Required fields: 0
25
+ * @property Optional fields: 4
26
26
  */
27
27
  export interface SyncTwilioTaskQueueProperties {
28
28
  /**
@@ -30,9 +30,29 @@ export interface SyncTwilioTaskQueueProperties {
30
30
  *
31
31
  * Twilio task queue sid
32
32
  * @type {TEXT}
33
- * @required
34
33
  */
35
- TwilioSid: string;
34
+ TwilioSid?: string | null;
35
+ /**
36
+ * MaxReservedWorkers
37
+ *
38
+ * Maximum number of workers that can be reserved simultaneously for tasks from this queue.
39
+ * @type {NUMBER}
40
+ */
41
+ MaxReservedWorkers?: number | null;
42
+ /**
43
+ * TaskOrder
44
+ *
45
+ * Order in which tasks are assigned to workers
46
+ * @type {ENUM}
47
+ */
48
+ TaskOrder?: string | null;
49
+ /**
50
+ * Name
51
+ *
52
+ * Task queue name
53
+ * @type {TEXT}
54
+ */
55
+ Name?: string | null;
36
56
  }
37
57
  /**
38
58
  * SyncTwilioTaskQueue
@@ -29,9 +29,9 @@ export interface UpdateTwilioTaskQueueProperties {
29
29
  * MaxReservedWorkers
30
30
  *
31
31
  * Maximum number of workers that can be reserved simultaneously for tasks from this queue.
32
- * @type {TEXT}
32
+ * @type {NUMBER}
33
33
  */
34
- MaxReservedWorkers?: string | null;
34
+ MaxReservedWorkers?: number | null;
35
35
  /**
36
36
  * Name
37
37
  *
@@ -64,9 +64,9 @@ export interface TwilioTaskQueueProperties {
64
64
  TwilioSid: string;
65
65
  /** Maximum number of workers that can be reserved simultaneously for tasks from this queue.
66
66
  *
67
- * @type {TEXT}
67
+ * @type {NUMBER}
68
68
  */
69
- MaxReservedWorkers: string;
69
+ MaxReservedWorkers: number;
70
70
  /** Order in which tasks are assigned to workers
71
71
  *
72
72
  * @type {ENUM}
@@ -183,13 +183,11 @@ export declare class TwilioTaskQueueRecord<TProps = TwilioTaskQueueProperties> {
183
183
  /**
184
184
  * SyncTwilioTaskQueue
185
185
  *
186
- * Updates this TwilioTaskQueue record with the specified properties.
186
+ * Updates this TwilioTaskQueue record.
187
187
  * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
188
188
  *
189
- * @param properties - Required properties for this action
190
- * @param options - Optional settings
191
- * @param options.journeyId - Associate with a journey
192
- * @param options.stageKey - Transition to pipeline stage
189
+ * @param propertiesOrOptions - Properties to update, or options object
190
+ * @param options - Optional settings (journeyId, stageKey)
193
191
  * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
194
192
  * @throws Error if called on a new (unsaved) record
195
193
  *
@@ -202,7 +200,10 @@ export declare class TwilioTaskQueueRecord<TProps = TwilioTaskQueueProperties> {
202
200
  * const payload = record.syncTwilioTaskQueue({ ... }).dryRun();
203
201
  * ```
204
202
  */
205
- syncTwilioTaskQueue(properties: SyncTwilioTaskQueueProperties, options?: {
203
+ syncTwilioTaskQueue(propertiesOrOptions?: SyncTwilioTaskQueueProperties | {
204
+ journeyId?: string;
205
+ stageKey?: string;
206
+ }, options?: {
206
207
  journeyId?: string;
207
208
  stageKey?: string;
208
209
  }): ActionBuilder;
@@ -240,13 +240,11 @@ class TwilioTaskQueueRecord {
240
240
  /**
241
241
  * SyncTwilioTaskQueue
242
242
  *
243
- * Updates this TwilioTaskQueue record with the specified properties.
243
+ * Updates this TwilioTaskQueue record.
244
244
  * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
245
245
  *
246
- * @param properties - Required properties for this action
247
- * @param options - Optional settings
248
- * @param options.journeyId - Associate with a journey
249
- * @param options.stageKey - Transition to pipeline stage
246
+ * @param propertiesOrOptions - Properties to update, or options object
247
+ * @param options - Optional settings (journeyId, stageKey)
250
248
  * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
251
249
  * @throws Error if called on a new (unsaved) record
252
250
  *
@@ -259,11 +257,21 @@ class TwilioTaskQueueRecord {
259
257
  * const payload = record.syncTwilioTaskQueue({ ... }).dryRun();
260
258
  * ```
261
259
  */
262
- syncTwilioTaskQueue(properties, options) {
260
+ syncTwilioTaskQueue(propertiesOrOptions, options) {
263
261
  var _a;
264
262
  if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
265
263
  throw new Error('syncTwilioTaskQueue requires an existing record. Use accessor.get() first.');
266
- const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'SyncTwilioTaskQueue', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
264
+ let properties = {};
265
+ let opts = options;
266
+ if (propertiesOrOptions) {
267
+ if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
268
+ opts = propertiesOrOptions;
269
+ }
270
+ else {
271
+ properties = propertiesOrOptions;
272
+ }
273
+ }
274
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'SyncTwilioTaskQueue', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
267
275
  return new ActionBuilder(this._provider, 'SupportModule', 'TwilioTaskQueue', payload, () => { this._pendingLinks = []; });
268
276
  }
269
277
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.208-beta.3",
3
+ "version": "2.0.208-beta.5",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",