@d19n/youfibre-odin-sdk 2.0.263 → 2.0.265

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.
@@ -1354,14 +1354,10 @@ var WorkOrderPropertyKeys;
1354
1354
  WorkOrderPropertyKeys["JourneyRef"] = "JourneyRef";
1355
1355
  /** AmcoRequestDateTime */
1356
1356
  WorkOrderPropertyKeys["AmcoRequestDateTime"] = "AmcoRequestDateTime";
1357
- /** Other Product Required */
1358
- WorkOrderPropertyKeys["OtherProductRequired"] = "OtherProductRequired";
1359
1357
  /** The date of the service appointment */
1360
1358
  WorkOrderPropertyKeys["ServiceAppointmentDate"] = "ServiceAppointmentDate";
1361
1359
  /** Dummy field for engineer assign schema action (Field Operations - WorkOrder) */
1362
1360
  WorkOrderPropertyKeys["ScheduleIdDummy"] = "ScheduleIdDummy";
1363
- /** Other Product Requested Notes */
1364
- WorkOrderPropertyKeys["OtherProductRequestedNotes"] = "OtherProductRequestedNotes";
1365
1361
  /** Imported from Zendesk ticket (Field Operations - WorkOrder) */
1366
1362
  WorkOrderPropertyKeys["InstallRequiringActionReason"] = "InstallRequiringActionReason";
1367
1363
  /** ReturnTrackingUpdate (Field Operations - WorkOrder) */
@@ -1444,8 +1440,6 @@ var WorkOrderPropertyKeys;
1444
1440
  WorkOrderPropertyKeys["ReplacedWorkOrderId"] = "ReplacedWorkOrderId";
1445
1441
  /** Shipping Method (Field Operations - WorkOrder) */
1446
1442
  WorkOrderPropertyKeys["ShippingMethod"] = "ShippingMethod";
1447
- /** Number of Mesh Devices (Field Operations - WorkOrder) */
1448
- WorkOrderPropertyKeys["DispatchedMeshProductCount"] = "DispatchedMeshProductCount";
1449
1443
  /** Data field for WorkOrder records. Used by Field Operations team. */
1450
1444
  WorkOrderPropertyKeys["Cpe3"] = "Cpe3";
1451
1445
  /** Other Products (Field Operations - WorkOrder) */
@@ -1454,6 +1448,8 @@ var WorkOrderPropertyKeys;
1454
1448
  WorkOrderPropertyKeys["AlternativeAddressLine1"] = "AlternativeAddressLine1";
1455
1449
  /** Use an Alternative Address instead of the linked order's address (Field Operations - WorkOrder) */
1456
1450
  WorkOrderPropertyKeys["UseAlternativeAddress"] = "UseAlternativeAddress";
1451
+ /** Number of Mesh Devices (Field Operations - WorkOrder) */
1452
+ WorkOrderPropertyKeys["DispatchedMeshProductCount"] = "DispatchedMeshProductCount";
1457
1453
  /** survey estimated completion date (Field Operations - WorkOrder) */
1458
1454
  WorkOrderPropertyKeys["SurveyEstimatedCompletion"] = "SurveyEstimatedCompletion";
1459
1455
  /** Length of drop cable used (Field Operations - WorkOrder) */
@@ -1586,6 +1582,10 @@ var WorkOrderPropertyKeys;
1586
1582
  WorkOrderPropertyKeys["OrderId"] = "OrderId";
1587
1583
  /** Contact information field for WorkOrder. Used by Field Operations team for communication. */
1588
1584
  WorkOrderPropertyKeys["AlternativeAddressPostCode"] = "AlternativeAddressPostCode";
1585
+ /** Other Product Required */
1586
+ WorkOrderPropertyKeys["OtherProductRequired"] = "OtherProductRequired";
1587
+ /** Other Product Requested Notes */
1588
+ WorkOrderPropertyKeys["OtherProductRequestedNotes"] = "OtherProductRequestedNotes";
1589
1589
  /** Cumulative number of times this WO appointment was rescheduled (supplier + customer). Incremented on reschedule; backfilled from REAPPOINT/REAPPOINTED + CUSTOMER_RESCHEDULE_APPOINTMENT history. Quantifies install slippage frequency. */
1590
1590
  WorkOrderPropertyKeys["RescheduledCount"] = "RescheduledCount";
1591
1591
  /** Frozen field-visit date the WO was scheduled for (from the ServiceAppointment) while in Scheduled stage. Stamped nightly + on create; immutable thereafter so the day-D cohort survives reschedule/cancel/remediation. Powers "did everything scheduled for today get handled" + shift analysis. */
@@ -13,7 +13,7 @@
13
13
  * await record.createFieldServiceProduct({ ... }).execute();
14
14
  * ```
15
15
  *
16
- * Entity Types: CPE_ROUTER, MESH, MISC
16
+ * Entity Types: CPE_ROUTER, MESH, MISC, RETURNS_BAG
17
17
  *
18
18
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
19
  */
@@ -21,7 +21,7 @@ import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
21
21
  import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
22
22
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
23
23
  import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
24
- import { FieldServiceProductProperties, CpeRouterFieldServiceProductProperties, MeshFieldServiceProductProperties, MiscFieldServiceProductProperties } from '../entities-v2/FieldServiceProduct';
24
+ import { FieldServiceProductProperties, CpeRouterFieldServiceProductProperties, MeshFieldServiceProductProperties, MiscFieldServiceProductProperties, ReturnsBagFieldServiceProductProperties } from '../entities-v2/FieldServiceProduct';
25
25
  import { CreateFieldServiceMeshProductProperties } from '../actions-v2/CreateFieldServiceMeshProductDto';
26
26
  import { CreateFieldServiceMeshProductBuilder } from '../actions-v2/CreateFieldServiceMeshProductDto';
27
27
  import { CreateFieldServiceProductProperties } from '../actions-v2/CreateFieldServiceProductDto';
@@ -34,7 +34,7 @@ import { ProductRecord } from './ProductRecord';
34
34
  import { FieldServiceDispatchedProductRecord } from './FieldServiceDispatchedProductRecord';
35
35
  import { WorkOrderRecord } from './WorkOrderRecord';
36
36
  /** Valid entity types for FieldServiceProduct */
37
- export declare type FieldServiceProductType = 'CPE_ROUTER' | 'MESH' | 'MISC';
37
+ export declare type FieldServiceProductType = 'CPE_ROUTER' | 'MESH' | 'MISC' | 'RETURNS_BAG';
38
38
  export declare class FieldServiceProductRecord<TProps = FieldServiceProductProperties> {
39
39
  private _record;
40
40
  private _provider;
@@ -116,6 +116,22 @@ export declare class FieldServiceProductRecord<TProps = FieldServiceProductPrope
116
116
  * @remarks MISC
117
117
  */
118
118
  isMisc(): this is FieldServiceProductRecord<MiscFieldServiceProductProperties>;
119
+ /**
120
+ * Type guard: check if this record is of type RETURNS_BAG
121
+ *
122
+ * When this returns true, TypeScript automatically narrows the type,
123
+ * giving you access to RETURNS_BAG-specific properties.
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * if (record.isReturnsBag()) {
128
+ * // TypeScript knows record.properties is ReturnsBagFieldServiceProductProperties
129
+ * console.log(record.properties.SomeTypeSpecificField);
130
+ * }
131
+ * ```
132
+ * @remarks Return Bag
133
+ */
134
+ isReturnsBag(): this is FieldServiceProductRecord<ReturnsBagFieldServiceProductProperties>;
119
135
  /** Valid labels for Product associations */
120
136
  static readonly productsLabels: readonly ["FieldServiceProduct__CompatibleProducts"];
121
137
  /**
@@ -14,7 +14,7 @@
14
14
  * await record.createFieldServiceProduct({ ... }).execute();
15
15
  * ```
16
16
  *
17
- * Entity Types: CPE_ROUTER, MESH, MISC
17
+ * Entity Types: CPE_ROUTER, MESH, MISC, RETURNS_BAG
18
18
  *
19
19
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
20
20
  */
@@ -200,6 +200,22 @@ class FieldServiceProductRecord {
200
200
  * @remarks MISC
201
201
  */
202
202
  isMisc() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'MISC'; }
203
+ /**
204
+ * Type guard: check if this record is of type RETURNS_BAG
205
+ *
206
+ * When this returns true, TypeScript automatically narrows the type,
207
+ * giving you access to RETURNS_BAG-specific properties.
208
+ *
209
+ * @example
210
+ * ```typescript
211
+ * if (record.isReturnsBag()) {
212
+ * // TypeScript knows record.properties is ReturnsBagFieldServiceProductProperties
213
+ * console.log(record.properties.SomeTypeSpecificField);
214
+ * }
215
+ * ```
216
+ * @remarks Return Bag
217
+ */
218
+ isReturnsBag() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'RETURNS_BAG'; }
203
219
  /**
204
220
  * Access linked Product records
205
221
  * @remarks Available labels: FieldServiceProduct__CompatibleProducts
@@ -31,6 +31,7 @@ import { CreateCityfibreOrderKciCompletedProperties } from '../actions-v2/Create
31
31
  import { CreateCollectionAmcoWorkOrderProperties } from '../actions-v2/CreateCollectionAmcoWorkOrderFromOrderDto';
32
32
  import { CreateDispatchAmcoWorkOrderProperties } from '../actions-v2/CreateDispatchAmcoWorkOrderFromOrderDto';
33
33
  import { CreateRecontractOrderProperties } from '../actions-v2/CreateRecontractOrderDto';
34
+ import { CreateReplacementAmcoWorkOrderProperties } from '../actions-v2/CreateReplacementAmcoWorkOrderFromOrderDto';
34
35
  import { ManageCommisionProperties } from '../actions-v2/ManageCommisionDto';
35
36
  import { OderUpdateProperties } from '../actions-v2/OderUpdateDto';
36
37
  import { SetOrderAffiliateCodeProperties } from '../actions-v2/SetOrderAffiliateCodeDto';
@@ -444,6 +445,67 @@ export declare class CreateDispatchAmcoWorkOrderFromOrderFlowBuilder {
444
445
  private _buildRequestPayload;
445
446
  }
446
447
  /** Options for a flow step */
448
+ export interface CreateReplacementAmcoWorkOrderFromOrderFlowBuilderStepOptions {
449
+ /** Associations to create with this step */
450
+ associations?: Array<{
451
+ recordId?: string;
452
+ entity?: string;
453
+ }>;
454
+ /** Groups for this step */
455
+ groups?: string[];
456
+ }
457
+ /**
458
+ * FlowBuilder for CreateReplacementAmcoWorkOrderFromOrder multi-step action
459
+ *
460
+ * Use method chaining to add steps, then call execute() to run the flow.
461
+ * This is a CREATE flow - no existing record required.
462
+ */
463
+ export declare class CreateReplacementAmcoWorkOrderFromOrderFlowBuilder {
464
+ private _record;
465
+ private _provider;
466
+ private _pendingLinks;
467
+ private _options?;
468
+ private _groups;
469
+ private _steps;
470
+ constructor(record: OrderRecord<any>, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
471
+ journeyId?: string;
472
+ });
473
+ /**
474
+ * Add a group to the main action
475
+ * @param group - Group name to add
476
+ * @returns this (for method chaining)
477
+ */
478
+ addGroup(group: string): this;
479
+ /**
480
+ * Add CreateReplacementAmcoWorkOrder step to the flow
481
+ * @param properties - Properties for this step
482
+ * @param options - Optional step settings
483
+ * @returns this (for method chaining)
484
+ */
485
+ createReplacementAmcoWorkOrder(properties: CreateReplacementAmcoWorkOrderProperties, options?: CreateReplacementAmcoWorkOrderFromOrderFlowBuilderStepOptions): this;
486
+ /**
487
+ * Execute the flow
488
+ * @returns The result from the API
489
+ */
490
+ execute(): Promise<IDbRecordCreateUpdateRes[]>;
491
+ /**
492
+ * Returns the request payload without executing (for debugging)
493
+ * @returns The request payload that would be sent to the API
494
+ */
495
+ dryRun(): Record<string, any>;
496
+ /**
497
+ * Prevents accidental `await flowBuilder` without .execute()
498
+ * Forces developers to explicitly call .execute()
499
+ * @throws Error always - use .execute() or .dryRun() instead
500
+ */
501
+ then(): never;
502
+ /**
503
+ * Build the request payload for the action
504
+ * @private
505
+ */
506
+ private _buildRequestPayload;
507
+ }
508
+ /** Options for a flow step */
447
509
  export interface MoveOrderFromDeactivatedToCancelledFlowBuilderStepOptions {
448
510
  /** Associations to create with this step */
449
511
  associations?: Array<{
@@ -1607,6 +1669,29 @@ export declare class OrderRecord<TProps = OrderProperties> {
1607
1669
  createDispatchAmcoWorkOrderFromOrder(options?: {
1608
1670
  journeyId?: string;
1609
1671
  }): CreateDispatchAmcoWorkOrderFromOrderFlowBuilder;
1672
+ /**
1673
+ * CreateReplacementAmcoWorkOrderFromOrder
1674
+ *
1675
+ * Starts a multi-step flow action on this Order record.
1676
+ * Chain step methods and call .execute() to run the flow.
1677
+ * Individual steps determine their own ID requirements (CREATE vs UPDATE).
1678
+ *
1679
+ * @param options - Optional settings
1680
+ * @param options.journeyId - Associate with a journey
1681
+ * @returns FlowBuilder for chaining step methods
1682
+ *
1683
+ * @example
1684
+ * ```typescript
1685
+ * // Can be called on new() or get() - steps determine ID requirements
1686
+ * const record = odinClient.orders.new();
1687
+ * await record.createReplacementAmcoWorkOrderFromOrder()
1688
+ * .createReplacementAmcoWorkOrder({ ... })
1689
+ * .execute();
1690
+ * ```
1691
+ */
1692
+ createReplacementAmcoWorkOrderFromOrder(options?: {
1693
+ journeyId?: string;
1694
+ }): CreateReplacementAmcoWorkOrderFromOrderFlowBuilder;
1610
1695
  /**
1611
1696
  * DeactivateOrderDunning
1612
1697
  *
@@ -26,7 +26,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
26
26
  });
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.isOrderRecord = exports.OrderRecord = exports.MoveOrderToActiveFlowBuilder = exports.MoveOrderFromPendingCancellationToCancelledFlowBuilder = exports.MoveOrderFromDeactivatedToCancelledFlowBuilder = exports.CreateDispatchAmcoWorkOrderFromOrderFlowBuilder = exports.CreateCollectionAmcoWorkOrderFromOrderFlowBuilder = exports.CreateCityfibreKciFlowBuilder = exports.CancelOrderPreInstallFlowBuilder = exports.CancelActiveOrderFlowBuilder = void 0;
29
+ exports.isOrderRecord = exports.OrderRecord = exports.MoveOrderToActiveFlowBuilder = exports.MoveOrderFromPendingCancellationToCancelledFlowBuilder = exports.MoveOrderFromDeactivatedToCancelledFlowBuilder = exports.CreateReplacementAmcoWorkOrderFromOrderFlowBuilder = exports.CreateDispatchAmcoWorkOrderFromOrderFlowBuilder = exports.CreateCollectionAmcoWorkOrderFromOrderFlowBuilder = exports.CreateCityfibreKciFlowBuilder = exports.CancelOrderPreInstallFlowBuilder = exports.CancelActiveOrderFlowBuilder = void 0;
30
30
  const uuid_1 = require("uuid");
31
31
  const core_1 = require("@d19n/odin-types/dist/core");
32
32
  const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
@@ -677,6 +677,110 @@ class CreateDispatchAmcoWorkOrderFromOrderFlowBuilder {
677
677
  }
678
678
  }
679
679
  exports.CreateDispatchAmcoWorkOrderFromOrderFlowBuilder = CreateDispatchAmcoWorkOrderFromOrderFlowBuilder;
680
+ /**
681
+ * FlowBuilder for CreateReplacementAmcoWorkOrderFromOrder multi-step action
682
+ *
683
+ * Use method chaining to add steps, then call execute() to run the flow.
684
+ * This is a CREATE flow - no existing record required.
685
+ */
686
+ class CreateReplacementAmcoWorkOrderFromOrderFlowBuilder {
687
+ constructor(record, provider, pendingLinks, options) {
688
+ this._groups = [];
689
+ this._steps = [];
690
+ this._record = record;
691
+ this._provider = provider;
692
+ this._pendingLinks = pendingLinks;
693
+ this._options = options;
694
+ }
695
+ /**
696
+ * Add a group to the main action
697
+ * @param group - Group name to add
698
+ * @returns this (for method chaining)
699
+ */
700
+ addGroup(group) {
701
+ this._groups.push(group);
702
+ return this;
703
+ }
704
+ /**
705
+ * Add CreateReplacementAmcoWorkOrder step to the flow
706
+ * @param properties - Properties for this step
707
+ * @param options - Optional step settings
708
+ * @returns this (for method chaining)
709
+ */
710
+ createReplacementAmcoWorkOrder(properties, options) {
711
+ var _a;
712
+ this._steps.push({
713
+ actionName: 'CreateReplacementAmcoWorkOrder',
714
+ properties,
715
+ entity: 'FieldServiceModule:WorkOrder',
716
+ type: 'REPLACEMENT_AMCO',
717
+ autoLinkParent: true,
718
+ associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
719
+ groups: options === null || options === void 0 ? void 0 : options.groups,
720
+ });
721
+ return this;
722
+ }
723
+ /**
724
+ * Execute the flow
725
+ * @returns The result from the API
726
+ */
727
+ execute() {
728
+ return __awaiter(this, void 0, void 0, function* () {
729
+ const payload = this._buildRequestPayload();
730
+ const result = yield this._provider._applyAction('OrderModule', 'Order', payload);
731
+ // Clear pending links on the record after execution
732
+ this._record.clearPendingLinks();
733
+ return result;
734
+ });
735
+ }
736
+ /**
737
+ * Returns the request payload without executing (for debugging)
738
+ * @returns The request payload that would be sent to the API
739
+ */
740
+ dryRun() {
741
+ return this._buildRequestPayload();
742
+ }
743
+ /**
744
+ * Prevents accidental `await flowBuilder` without .execute()
745
+ * Forces developers to explicitly call .execute()
746
+ * @throws Error always - use .execute() or .dryRun() instead
747
+ */
748
+ then() {
749
+ throw new Error('FlowBuilder cannot be awaited directly. Call .execute() to run the flow or .dryRun() to get the payload.');
750
+ }
751
+ /**
752
+ * Build the request payload for the action
753
+ * @private
754
+ */
755
+ _buildRequestPayload() {
756
+ const record = this._record.record;
757
+ // Build steps with parent associations
758
+ const stepsWithAssociations = this._steps.map(step => {
759
+ const stepAssociations = [...(step.associations || [])];
760
+ // Auto-add parent association if step requires it and we have a parent record
761
+ if (step.autoLinkParent && (record === null || record === void 0 ? void 0 : record.id)) {
762
+ stepAssociations.push({
763
+ entity: record.entity,
764
+ recordId: record.id,
765
+ linkType: null,
766
+ relationType: 'PARENT',
767
+ });
768
+ }
769
+ return {
770
+ entity: step.entity,
771
+ type: step.type,
772
+ actionName: step.actionName,
773
+ properties: step.properties,
774
+ title: step.title,
775
+ id: step.id,
776
+ associations: stepAssociations.length > 0 ? stepAssociations : undefined,
777
+ groups: step.groups,
778
+ };
779
+ });
780
+ return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateReplacementAmcoWorkOrderFromOrder', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
781
+ }
782
+ }
783
+ exports.CreateReplacementAmcoWorkOrderFromOrderFlowBuilder = CreateReplacementAmcoWorkOrderFromOrderFlowBuilder;
680
784
  /**
681
785
  * FlowBuilder for MoveOrderFromDeactivatedToCancelled multi-step action
682
786
  *
@@ -2399,6 +2503,29 @@ class OrderRecord {
2399
2503
  createDispatchAmcoWorkOrderFromOrder(options) {
2400
2504
  return new CreateDispatchAmcoWorkOrderFromOrderFlowBuilder(this, this._provider, this._pendingLinks, options);
2401
2505
  }
2506
+ /**
2507
+ * CreateReplacementAmcoWorkOrderFromOrder
2508
+ *
2509
+ * Starts a multi-step flow action on this Order record.
2510
+ * Chain step methods and call .execute() to run the flow.
2511
+ * Individual steps determine their own ID requirements (CREATE vs UPDATE).
2512
+ *
2513
+ * @param options - Optional settings
2514
+ * @param options.journeyId - Associate with a journey
2515
+ * @returns FlowBuilder for chaining step methods
2516
+ *
2517
+ * @example
2518
+ * ```typescript
2519
+ * // Can be called on new() or get() - steps determine ID requirements
2520
+ * const record = odinClient.orders.new();
2521
+ * await record.createReplacementAmcoWorkOrderFromOrder()
2522
+ * .createReplacementAmcoWorkOrder({ ... })
2523
+ * .execute();
2524
+ * ```
2525
+ */
2526
+ createReplacementAmcoWorkOrderFromOrder(options) {
2527
+ return new CreateReplacementAmcoWorkOrderFromOrderFlowBuilder(this, this._provider, this._pendingLinks, options);
2528
+ }
2402
2529
  /**
2403
2530
  * DeactivateOrderDunning
2404
2531
  *
@@ -58,6 +58,7 @@ import { CreatePlanningWorkOrderProperties } from '../actions-v2/CreateLinkedWor
58
58
  import { CreatePrePullWorkOrderProperties } from '../actions-v2/CreateLinkedWorkOrderFlowDto';
59
59
  import { CreateNetworkAdjustmentWorkOrderProperties } from '../actions-v2/CreateLinkedWorkOrderFlowDto';
60
60
  import { CreateRemediationWorkOrderProperties } from '../actions-v2/CreateLinkedWorkOrderFlowDto';
61
+ import { CreateReplacementAmcoWorkOrderProperties } from '../actions-v2/CreateReplacementAmcoWorkOrderDto';
61
62
  import { CreateServiceWorkOrderProperties } from '../actions-v2/CreateServiceWorkOrderDto';
62
63
  import { CreateWayleaveWorkOrderProperties } from '../actions-v2/CreateWayleaveWorkOrderDto';
63
64
  import { WayleaveAuditCreateProperties } from '../actions-v2/CreateWayleaveWorkOrderFlowDto';
@@ -3991,6 +3992,34 @@ export declare class WorkOrderRecord<TProps = WorkOrderProperties> {
3991
3992
  journeyId?: string;
3992
3993
  stageKey?: string;
3993
3994
  }): ActionBuilder;
3995
+ /**
3996
+ * CreateReplacementAmcoWorkOrder
3997
+ *
3998
+ * Creates a new WorkOrder record with the specified properties.
3999
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
4000
+ *
4001
+ * @remarks Record type: REPLACEMENT_AMCO
4002
+ *
4003
+ * @param properties - The properties for the new record
4004
+ * @param options - Optional settings
4005
+ * @param options.journeyId - Associate with a journey
4006
+ * @param options.stageKey - Set initial pipeline stage
4007
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
4008
+ *
4009
+ * @example
4010
+ * ```typescript
4011
+ * // Create with properties
4012
+ * const record = odinClient.workOrders.new();
4013
+ * await record.createReplacementAmcoWorkOrder({ ... }).execute();
4014
+ *
4015
+ * // Dry run (for debugging)
4016
+ * const payload = record.createReplacementAmcoWorkOrder({ ... }).dryRun();
4017
+ * ```
4018
+ */
4019
+ createReplacementAmcoWorkOrder(properties: CreateReplacementAmcoWorkOrderProperties, options?: {
4020
+ journeyId?: string;
4021
+ stageKey?: string;
4022
+ }): ActionBuilder;
3994
4023
  /**
3995
4024
  * CreateServiceWorkOrder
3996
4025
  *
@@ -6259,6 +6259,42 @@ class WorkOrderRecord {
6259
6259
  };
6260
6260
  return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
6261
6261
  }
6262
+ /**
6263
+ * CreateReplacementAmcoWorkOrder
6264
+ *
6265
+ * Creates a new WorkOrder record with the specified properties.
6266
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
6267
+ *
6268
+ * @remarks Record type: REPLACEMENT_AMCO
6269
+ *
6270
+ * @param properties - The properties for the new record
6271
+ * @param options - Optional settings
6272
+ * @param options.journeyId - Associate with a journey
6273
+ * @param options.stageKey - Set initial pipeline stage
6274
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
6275
+ *
6276
+ * @example
6277
+ * ```typescript
6278
+ * // Create with properties
6279
+ * const record = odinClient.workOrders.new();
6280
+ * await record.createReplacementAmcoWorkOrder({ ... }).execute();
6281
+ *
6282
+ * // Dry run (for debugging)
6283
+ * const payload = record.createReplacementAmcoWorkOrder({ ... }).dryRun();
6284
+ * ```
6285
+ */
6286
+ createReplacementAmcoWorkOrder(properties, options) {
6287
+ const payload = {
6288
+ entity: 'FieldServiceModule:WorkOrder',
6289
+ type: 'REPLACEMENT_AMCO',
6290
+ actionName: 'CreateReplacementAmcoWorkOrder',
6291
+ properties: properties || {},
6292
+ associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
6293
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
6294
+ stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
6295
+ };
6296
+ return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
6297
+ }
6262
6298
  /**
6263
6299
  * CreateServiceWorkOrder
6264
6300
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.263",
3
+ "version": "2.0.265",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",