@d19n/youfibre-odin-sdk 2.0.286 → 2.0.287

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -366,7 +366,7 @@ This SDK includes **178** entities across **12** modules.
366
366
 
367
367
  ## Actions
368
368
 
369
- This SDK includes **846** actions.
369
+ This SDK includes **847** actions.
370
370
 
371
371
  ### Action Types
372
372
 
@@ -522,6 +522,7 @@ This SDK includes **846** actions.
522
522
  | `MoveCollectionAmcoToFailedInspection` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToFailedInspection |
523
523
  | `MoveCollectionAmcoToOverridden` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToOverridden |
524
524
  | `MoveCollectionAmcoToPendingInspection` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingInspection |
525
+ | `MoveCollectionAmcoToPendingPayment` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment |
525
526
  | `MoveCollectionAmcoToPendingReturn` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingReturn |
526
527
  | `MoveCollectionAmcoToReceived` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToReceived |
527
528
  | `MoveCollectionWorkOrderFromAcceptedToEnRoute` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.FlowStepEnRouteCollectionConfirmation |
@@ -665,6 +666,8 @@ This SDK includes **846** actions.
665
666
 
666
667
  **MoveCollectionAmcoToPendingInspection Target Stages:** `CollectionAmcoStagePendingInspection`
667
668
 
669
+ **MoveCollectionAmcoToPendingPayment Target Stages:** `CollectionAmcoStagePendingPayment`
670
+
668
671
  **MoveCollectionAmcoToPendingReturn Target Stages:** `CollectionAmcoStagePendingReturn`
669
672
 
670
673
  **MoveCollectionAmcoToReceived Target Stages:** `CollectionAmcoStageReceived`
@@ -0,0 +1,70 @@
1
+ /**
2
+ * MoveCollectionAmcoToPendingPayment Action DTO
3
+ *
4
+ * Move the collection work order to Pending Payment.
5
+ *
6
+ * @module FieldServiceModule
7
+ * @entity WorkOrder
8
+ * @entityType COLLECTION_AMCO
9
+ * @actionKey MoveCollectionAmcoToPendingPayment
10
+ * @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
15
+ /**
16
+ * RabbitMQ message payload for MoveCollectionAmcoToPendingPayment step flow events
17
+ *
18
+ * @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment
19
+ */
20
+ export interface MoveCollectionAmcoToPendingPaymentMessage extends OdinRecordUpdatedEvent<MoveCollectionAmcoToPendingPaymentDto, {}> {
21
+ }
22
+ /**
23
+ * Properties for MoveCollectionAmcoToPendingPayment action
24
+ *
25
+ */
26
+ export interface MoveCollectionAmcoToPendingPaymentProperties {
27
+ }
28
+ /**
29
+ * MoveCollectionAmcoToPendingPayment
30
+ *
31
+ * Move the collection work order to Pending Payment.
32
+ *
33
+ * @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
34
+ * @module FieldServiceModule
35
+ * @entity WorkOrder
36
+ * @entityType COLLECTION_AMCO ( 3PL Collection)
37
+ * @targetStages CollectionAmcoStagePendingPayment
38
+ * @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment
39
+ * @permission schema.action.movecollectionamcotopendingpayment.trigger
40
+ * @benchmark This action is tracked for performance benchmarks
41
+ */
42
+ export declare class MoveCollectionAmcoToPendingPaymentDto extends OdinRecordUpdateDto<Record<string, any>> {
43
+ /** Used by SDK generators to identify action type */
44
+ static readonly ACTION_TYPE = "UPDATE";
45
+ static readonly ACTION_KEY = "MoveCollectionAmcoToPendingPayment";
46
+ static readonly MODULE_NAME = "FieldServiceModule";
47
+ static readonly ENTITIES: string[];
48
+ static readonly ENTITY_TYPE = "COLLECTION_AMCO";
49
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment";
50
+ static readonly SCHEMA_ACTION_ID = "2136c985-8f01-4ca8-a265-4b73ae810f7e";
51
+ static readonly PERMISSION = "schema.action.movecollectionamcotopendingpayment.trigger";
52
+ static readonly TARGET_STAGES: readonly ["CollectionAmcoStagePendingPayment"];
53
+ static readonly IS_STAGE_TRANSITION = true;
54
+ static readonly IS_MULTI_STEP_FLOW = false;
55
+ static readonly HAS_STEP_LINKS = false;
56
+ readonly actionName: string;
57
+ readonly schemaActionId: string;
58
+ readonly entity: string;
59
+ readonly stageKey: string;
60
+ constructor(record: OdinRecord<any> | {
61
+ id: string;
62
+ entity: string;
63
+ type?: string;
64
+ }, options?: {
65
+ journeyId?: string;
66
+ });
67
+ /** Step classes that can be used with this action */
68
+ static readonly stepClasses: readonly [];
69
+ steps: [];
70
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /**
3
+ * MoveCollectionAmcoToPendingPayment Action DTO
4
+ *
5
+ * Move the collection work order to Pending Payment.
6
+ *
7
+ * @module FieldServiceModule
8
+ * @entity WorkOrder
9
+ * @entityType COLLECTION_AMCO
10
+ * @actionKey MoveCollectionAmcoToPendingPayment
11
+ * @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment
12
+ *
13
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.MoveCollectionAmcoToPendingPaymentDto = void 0;
17
+ const core_1 = require("@d19n/odin-types/dist/core");
18
+ /**
19
+ * MoveCollectionAmcoToPendingPayment
20
+ *
21
+ * Move the collection work order to Pending Payment.
22
+ *
23
+ * @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
24
+ * @module FieldServiceModule
25
+ * @entity WorkOrder
26
+ * @entityType COLLECTION_AMCO ( 3PL Collection)
27
+ * @targetStages CollectionAmcoStagePendingPayment
28
+ * @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment
29
+ * @permission schema.action.movecollectionamcotopendingpayment.trigger
30
+ * @benchmark This action is tracked for performance benchmarks
31
+ */
32
+ class MoveCollectionAmcoToPendingPaymentDto extends core_1.OdinRecordUpdateDto {
33
+ constructor(record, options) {
34
+ super({
35
+ id: record.id,
36
+ entity: record.entity,
37
+ type: record.type,
38
+ properties: {},
39
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
40
+ });
41
+ this.actionName = 'MoveCollectionAmcoToPendingPayment';
42
+ this.schemaActionId = '2136c985-8f01-4ca8-a265-4b73ae810f7e';
43
+ this.entity = 'FieldServiceModule:WorkOrder';
44
+ this.stageKey = 'CollectionAmcoStagePendingPayment';
45
+ }
46
+ }
47
+ exports.MoveCollectionAmcoToPendingPaymentDto = MoveCollectionAmcoToPendingPaymentDto;
48
+ /** Used by SDK generators to identify action type */
49
+ MoveCollectionAmcoToPendingPaymentDto.ACTION_TYPE = 'UPDATE';
50
+ MoveCollectionAmcoToPendingPaymentDto.ACTION_KEY = 'MoveCollectionAmcoToPendingPayment';
51
+ MoveCollectionAmcoToPendingPaymentDto.MODULE_NAME = 'FieldServiceModule';
52
+ MoveCollectionAmcoToPendingPaymentDto.ENTITIES = ['WorkOrder'];
53
+ MoveCollectionAmcoToPendingPaymentDto.ENTITY_TYPE = 'COLLECTION_AMCO';
54
+ MoveCollectionAmcoToPendingPaymentDto.EVENT_NAME = 'k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveCollectionAmcoToPendingPayment';
55
+ MoveCollectionAmcoToPendingPaymentDto.SCHEMA_ACTION_ID = '2136c985-8f01-4ca8-a265-4b73ae810f7e';
56
+ MoveCollectionAmcoToPendingPaymentDto.PERMISSION = 'schema.action.movecollectionamcotopendingpayment.trigger';
57
+ MoveCollectionAmcoToPendingPaymentDto.TARGET_STAGES = ['CollectionAmcoStagePendingPayment'];
58
+ MoveCollectionAmcoToPendingPaymentDto.IS_STAGE_TRANSITION = true;
59
+ MoveCollectionAmcoToPendingPaymentDto.IS_MULTI_STEP_FLOW = false;
60
+ MoveCollectionAmcoToPendingPaymentDto.HAS_STEP_LINKS = false;
61
+ /** Step classes that can be used with this action */
62
+ MoveCollectionAmcoToPendingPaymentDto.stepClasses = [];
@@ -164,7 +164,9 @@ export declare enum CollectionAmcoWorkOrderStageNames {
164
164
  /** Failed Inspection (fail) */
165
165
  FailedInspection = "Failed Inspection",
166
166
  /** Not returned after X days */
167
- NonReturned = "Non Returned"
167
+ NonReturned = "Non Returned",
168
+ /** Equipment was never returned and is being recovered as a charge; awaiting payment. */
169
+ PendingPayment = "Pending Payment"
168
170
  }
169
171
  /**
170
172
  * Pipeline stage keys for COLLECTION_AMCO WorkOrder
@@ -190,7 +192,9 @@ export declare enum CollectionAmcoWorkOrderStageKeys {
190
192
  /** Failed Inspection */
191
193
  CollectionAmcoStageFailedInspection = "CollectionAmcoStageFailedInspection",
192
194
  /** Not returned after X days */
193
- CollectionAmcoStageNonReturned = "CollectionAmcoStageNonReturned"
195
+ CollectionAmcoStageNonReturned = "CollectionAmcoStageNonReturned",
196
+ /** Equipment was never returned and is being recovered as a charge; awaiting payment. */
197
+ CollectionAmcoStagePendingPayment = "CollectionAmcoStagePendingPayment"
194
198
  }
195
199
  /**
196
200
  * Pipeline stage names for DISPATCH_AMCO WorkOrder
@@ -116,6 +116,8 @@ var CollectionAmcoWorkOrderStageNames;
116
116
  CollectionAmcoWorkOrderStageNames["FailedInspection"] = "Failed Inspection";
117
117
  /** Not returned after X days */
118
118
  CollectionAmcoWorkOrderStageNames["NonReturned"] = "Non Returned";
119
+ /** Equipment was never returned and is being recovered as a charge; awaiting payment. */
120
+ CollectionAmcoWorkOrderStageNames["PendingPayment"] = "Pending Payment";
119
121
  })(CollectionAmcoWorkOrderStageNames = exports.CollectionAmcoWorkOrderStageNames || (exports.CollectionAmcoWorkOrderStageNames = {}));
120
122
  /**
121
123
  * Pipeline stage keys for COLLECTION_AMCO WorkOrder
@@ -143,6 +145,8 @@ var CollectionAmcoWorkOrderStageKeys;
143
145
  CollectionAmcoWorkOrderStageKeys["CollectionAmcoStageFailedInspection"] = "CollectionAmcoStageFailedInspection";
144
146
  /** Not returned after X days */
145
147
  CollectionAmcoWorkOrderStageKeys["CollectionAmcoStageNonReturned"] = "CollectionAmcoStageNonReturned";
148
+ /** Equipment was never returned and is being recovered as a charge; awaiting payment. */
149
+ CollectionAmcoWorkOrderStageKeys["CollectionAmcoStagePendingPayment"] = "CollectionAmcoStagePendingPayment";
146
150
  })(CollectionAmcoWorkOrderStageKeys = exports.CollectionAmcoWorkOrderStageKeys || (exports.CollectionAmcoWorkOrderStageKeys = {}));
147
151
  /**
148
152
  * Pipeline stage names for DISPATCH_AMCO WorkOrder
@@ -5428,6 +5428,31 @@ export declare class WorkOrderRecord<TProps = WorkOrderProperties> {
5428
5428
  moveCollectionAmcoToPendingInspection(options?: {
5429
5429
  journeyId?: string;
5430
5430
  }): ActionBuilder;
5431
+ /**
5432
+ * MoveCollectionAmcoToPendingPayment
5433
+ *
5434
+ * Transitions this WorkOrder record to a new pipeline stage.
5435
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
5436
+ *
5437
+ * @remarks Transitions to stage: CollectionAmcoStagePendingPayment
5438
+ *
5439
+ * @param options - Optional settings
5440
+ * @param options.journeyId - Associate with a journey
5441
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
5442
+ * @throws Error if called on a new (unsaved) record
5443
+ *
5444
+ * @example
5445
+ * ```typescript
5446
+ * const record = await odinClient.workOrders.get(id);
5447
+ * await record.moveCollectionAmcoToPendingPayment().execute();
5448
+ *
5449
+ * // Dry run (for debugging)
5450
+ * const payload = record.moveCollectionAmcoToPendingPayment().dryRun();
5451
+ * ```
5452
+ */
5453
+ moveCollectionAmcoToPendingPayment(options?: {
5454
+ journeyId?: string;
5455
+ }): ActionBuilder;
5431
5456
  /**
5432
5457
  * MoveCollectionAmcoToPendingReturn
5433
5458
  *
@@ -7991,6 +7991,35 @@ class WorkOrderRecord {
7991
7991
  const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCollectionAmcoToPendingInspection', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CollectionAmcoStagePendingInspection' }, options);
7992
7992
  return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
7993
7993
  }
7994
+ /**
7995
+ * MoveCollectionAmcoToPendingPayment
7996
+ *
7997
+ * Transitions this WorkOrder record to a new pipeline stage.
7998
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
7999
+ *
8000
+ * @remarks Transitions to stage: CollectionAmcoStagePendingPayment
8001
+ *
8002
+ * @param options - Optional settings
8003
+ * @param options.journeyId - Associate with a journey
8004
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
8005
+ * @throws Error if called on a new (unsaved) record
8006
+ *
8007
+ * @example
8008
+ * ```typescript
8009
+ * const record = await odinClient.workOrders.get(id);
8010
+ * await record.moveCollectionAmcoToPendingPayment().execute();
8011
+ *
8012
+ * // Dry run (for debugging)
8013
+ * const payload = record.moveCollectionAmcoToPendingPayment().dryRun();
8014
+ * ```
8015
+ */
8016
+ moveCollectionAmcoToPendingPayment(options) {
8017
+ var _a;
8018
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
8019
+ throw new Error('moveCollectionAmcoToPendingPayment requires an existing record. Use accessor.get() first.');
8020
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCollectionAmcoToPendingPayment', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CollectionAmcoStagePendingPayment' }, options);
8021
+ return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
8022
+ }
7994
8023
  /**
7995
8024
  * MoveCollectionAmcoToPendingReturn
7996
8025
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.286",
3
+ "version": "2.0.287",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",