@d19n/youfibre-odin-sdk 2.0.367 → 2.0.368
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 +4 -1
- package/dist/actions-v2/CancelNotStartedReplacementAmcoWorkOrderDto.d.ts +68 -0
- package/dist/actions-v2/CancelNotStartedReplacementAmcoWorkOrderDto.js +60 -0
- package/dist/db-sdk-v2/CrmDatasetDb.d.ts +2 -2
- package/dist/db-sdk-v2/CrmDatasetDb.js +4 -4
- package/dist/entities-v2/Address.d.ts +10 -1
- package/dist/entities-v2/Address.js +2 -0
- package/dist/records-v2/WorkOrderRecord.d.ts +25 -0
- package/dist/records-v2/WorkOrderRecord.js +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -396,7 +396,7 @@ This SDK includes **203** entities across **13** modules.
|
|
|
396
396
|
|
|
397
397
|
## Actions
|
|
398
398
|
|
|
399
|
-
This SDK includes **
|
|
399
|
+
This SDK includes **932** actions.
|
|
400
400
|
|
|
401
401
|
### Action Types
|
|
402
402
|
|
|
@@ -496,6 +496,7 @@ This SDK includes **931** actions.
|
|
|
496
496
|
| `CancelInstallWorkOrderFlowSupplier` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelInstallWorkOrderFlowSupplier |
|
|
497
497
|
| `CancelNotStartedCollectionAmcoWorkOrder` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedCollectionAmcoWorkOrder |
|
|
498
498
|
| `CancelNotStartedDispatchAmcoWorkOrder` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedDispatchAmcoWorkOrder |
|
|
499
|
+
| `CancelNotStartedReplacementAmcoWorkOrder` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder |
|
|
499
500
|
| `CancelServiceWorkOrderFlowSupplier` | STAGE_TRANSITION | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelServiceWorkOrderFlowSupplier |
|
|
500
501
|
| `ChangeWorkOrderStatus` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.ChangeWorkOrderStatus |
|
|
501
502
|
| `CompleteCollectionInspectionDetails` | UPDATE | k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Update.CompleteCollectionInspectionDetails |
|
|
@@ -662,6 +663,8 @@ This SDK includes **931** actions.
|
|
|
662
663
|
|
|
663
664
|
**CancelNotStartedDispatchAmcoWorkOrder Target Stages:** `DispatchAmcoStageCancelled`
|
|
664
665
|
|
|
666
|
+
**CancelNotStartedReplacementAmcoWorkOrder Target Stages:** `ReplacementAmcoStageCancelled`
|
|
667
|
+
|
|
665
668
|
**CancelServiceWorkOrderFlowSupplier Target Stages:** `WorkOrderStageCancelled`
|
|
666
669
|
|
|
667
670
|
**CompleteInstallWorkOrderFlow Target Stages:** `WorkOrderStageDone`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CancelNotStartedReplacementAmcoWorkOrder Action DTO
|
|
3
|
+
*
|
|
4
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
5
|
+
*
|
|
6
|
+
* @module FieldServiceModule
|
|
7
|
+
* @entity WorkOrder
|
|
8
|
+
* @entityType REPLACEMENT_AMCO
|
|
9
|
+
* @actionKey CancelNotStartedReplacementAmcoWorkOrder
|
|
10
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
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 CancelNotStartedReplacementAmcoWorkOrder step flow events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
19
|
+
*/
|
|
20
|
+
export interface CancelNotStartedReplacementAmcoWorkOrderMessage extends OdinRecordUpdatedEvent<CancelNotStartedReplacementAmcoWorkOrderDto, {}> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for CancelNotStartedReplacementAmcoWorkOrder action
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export interface CancelNotStartedReplacementAmcoWorkOrderProperties {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
30
|
+
*
|
|
31
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
32
|
+
* @module FieldServiceModule
|
|
33
|
+
* @entity WorkOrder
|
|
34
|
+
* @entityType REPLACEMENT_AMCO (Amco Replacement)
|
|
35
|
+
* @targetStages ReplacementAmcoStageCancelled
|
|
36
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
37
|
+
* @permission schema.action.cancelnotstartedreplacementamcoworkorder.trigger
|
|
38
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
39
|
+
*/
|
|
40
|
+
export declare class CancelNotStartedReplacementAmcoWorkOrderDto extends OdinRecordUpdateDto<Record<string, any>> {
|
|
41
|
+
/** Used by SDK generators to identify action type */
|
|
42
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
43
|
+
static readonly ACTION_KEY = "CancelNotStartedReplacementAmcoWorkOrder";
|
|
44
|
+
static readonly MODULE_NAME = "FieldServiceModule";
|
|
45
|
+
static readonly ENTITIES: string[];
|
|
46
|
+
static readonly ENTITY_TYPE = "REPLACEMENT_AMCO";
|
|
47
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder";
|
|
48
|
+
static readonly SCHEMA_ACTION_ID = "7c43ee2e-f6a2-4108-bf95-53a448d32ff3";
|
|
49
|
+
static readonly PERMISSION = "schema.action.cancelnotstartedreplacementamcoworkorder.trigger";
|
|
50
|
+
static readonly TARGET_STAGES: readonly ["ReplacementAmcoStageCancelled"];
|
|
51
|
+
static readonly IS_STAGE_TRANSITION = true;
|
|
52
|
+
static readonly IS_MULTI_STEP_FLOW = false;
|
|
53
|
+
static readonly HAS_STEP_LINKS = false;
|
|
54
|
+
readonly actionName: string;
|
|
55
|
+
readonly schemaActionId: string;
|
|
56
|
+
readonly entity: string;
|
|
57
|
+
readonly stageKey: string;
|
|
58
|
+
constructor(record: OdinRecord<any> | {
|
|
59
|
+
id: string;
|
|
60
|
+
entity: string;
|
|
61
|
+
type?: string;
|
|
62
|
+
}, options?: {
|
|
63
|
+
journeyId?: string;
|
|
64
|
+
});
|
|
65
|
+
/** Step classes that can be used with this action */
|
|
66
|
+
static readonly stepClasses: readonly [];
|
|
67
|
+
steps: [];
|
|
68
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CancelNotStartedReplacementAmcoWorkOrder Action DTO
|
|
4
|
+
*
|
|
5
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
6
|
+
*
|
|
7
|
+
* @module FieldServiceModule
|
|
8
|
+
* @entity WorkOrder
|
|
9
|
+
* @entityType REPLACEMENT_AMCO
|
|
10
|
+
* @actionKey CancelNotStartedReplacementAmcoWorkOrder
|
|
11
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CancelNotStartedReplacementAmcoWorkOrderDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
20
|
+
*
|
|
21
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
22
|
+
* @module FieldServiceModule
|
|
23
|
+
* @entity WorkOrder
|
|
24
|
+
* @entityType REPLACEMENT_AMCO (Amco Replacement)
|
|
25
|
+
* @targetStages ReplacementAmcoStageCancelled
|
|
26
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder
|
|
27
|
+
* @permission schema.action.cancelnotstartedreplacementamcoworkorder.trigger
|
|
28
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
29
|
+
*/
|
|
30
|
+
class CancelNotStartedReplacementAmcoWorkOrderDto extends core_1.OdinRecordUpdateDto {
|
|
31
|
+
constructor(record, options) {
|
|
32
|
+
super({
|
|
33
|
+
id: record.id,
|
|
34
|
+
entity: record.entity,
|
|
35
|
+
type: record.type,
|
|
36
|
+
properties: {},
|
|
37
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'CancelNotStartedReplacementAmcoWorkOrder';
|
|
40
|
+
this.schemaActionId = '7c43ee2e-f6a2-4108-bf95-53a448d32ff3';
|
|
41
|
+
this.entity = 'FieldServiceModule:WorkOrder';
|
|
42
|
+
this.stageKey = 'ReplacementAmcoStageCancelled';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.CancelNotStartedReplacementAmcoWorkOrderDto = CancelNotStartedReplacementAmcoWorkOrderDto;
|
|
46
|
+
/** Used by SDK generators to identify action type */
|
|
47
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ACTION_TYPE = 'UPDATE';
|
|
48
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ACTION_KEY = 'CancelNotStartedReplacementAmcoWorkOrder';
|
|
49
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.MODULE_NAME = 'FieldServiceModule';
|
|
50
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ENTITIES = ['WorkOrder'];
|
|
51
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.ENTITY_TYPE = 'REPLACEMENT_AMCO';
|
|
52
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.EVENT_NAME = 'k1.t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.CancelNotStartedReplacementAmcoWorkOrder';
|
|
53
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.SCHEMA_ACTION_ID = '7c43ee2e-f6a2-4108-bf95-53a448d32ff3';
|
|
54
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.PERMISSION = 'schema.action.cancelnotstartedreplacementamcoworkorder.trigger';
|
|
55
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.TARGET_STAGES = ['ReplacementAmcoStageCancelled'];
|
|
56
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.IS_STAGE_TRANSITION = true;
|
|
57
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.IS_MULTI_STEP_FLOW = false;
|
|
58
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.HAS_STEP_LINKS = false;
|
|
59
|
+
/** Step classes that can be used with this action */
|
|
60
|
+
CancelNotStartedReplacementAmcoWorkOrderDto.stepClasses = [];
|
|
@@ -24,7 +24,7 @@ export declare class CrmDatasetDb extends DbProvider {
|
|
|
24
24
|
private _note?;
|
|
25
25
|
private _lead?;
|
|
26
26
|
private _team?;
|
|
27
|
-
private
|
|
27
|
+
private _exchange?;
|
|
28
28
|
private _address?;
|
|
29
29
|
private _salesterritory?;
|
|
30
30
|
private _user?;
|
|
@@ -32,7 +32,7 @@ export declare class CrmDatasetDb extends DbProvider {
|
|
|
32
32
|
get note(): DbRecordLinkManager;
|
|
33
33
|
get lead(): DbRecordLinkManager;
|
|
34
34
|
get team(): DbRecordLinkManager;
|
|
35
|
-
get
|
|
35
|
+
get exchange(): DbRecordLinkManager;
|
|
36
36
|
get address(): DbRecordLinkManager;
|
|
37
37
|
get salesterritory(): DbRecordLinkManager;
|
|
38
38
|
get user(): DbRecordLinkManager;
|
|
@@ -56,11 +56,11 @@ class CrmDatasetDb extends db_provider_1.DbProvider {
|
|
|
56
56
|
}
|
|
57
57
|
return this._team;
|
|
58
58
|
}
|
|
59
|
-
get
|
|
60
|
-
if (!this.
|
|
61
|
-
this.
|
|
59
|
+
get exchange() {
|
|
60
|
+
if (!this._exchange) {
|
|
61
|
+
this._exchange = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:CrmDataset', 'ProjectModule:Exchange', 'Exchange__CrmDataset');
|
|
62
62
|
}
|
|
63
|
-
return this.
|
|
63
|
+
return this._exchange;
|
|
64
64
|
}
|
|
65
65
|
get address() {
|
|
66
66
|
if (!this._address) {
|
|
@@ -206,7 +206,9 @@ export declare enum AddressPropertyKeys {
|
|
|
206
206
|
/** This describes the type of property (Sales - Address) */
|
|
207
207
|
ClassDescription = "ClassDescription",
|
|
208
208
|
/** Type of address (Shipping, Billing) (Sales - Address) */
|
|
209
|
-
Type = "Type"
|
|
209
|
+
Type = "Type",
|
|
210
|
+
/** the latitude of the property (replaces the misspelled Latititude, CORE-1402) */
|
|
211
|
+
Latitude = "Latitude"
|
|
210
212
|
}
|
|
211
213
|
/**
|
|
212
214
|
* Properties for Address records
|
|
@@ -600,6 +602,13 @@ export interface AddressProperties {
|
|
|
600
602
|
* @hidden This field is hidden in the UI
|
|
601
603
|
*/
|
|
602
604
|
Type: AddressType;
|
|
605
|
+
/** the latitude of the property (replaces the misspelled Latititude, CORE-1402)
|
|
606
|
+
*
|
|
607
|
+
* @type {TEXT}
|
|
608
|
+
* @default
|
|
609
|
+
* @hidden This field is hidden in the UI
|
|
610
|
+
*/
|
|
611
|
+
Latitude: string;
|
|
603
612
|
}
|
|
604
613
|
/**
|
|
605
614
|
* Address entity from CrmModule
|
|
@@ -190,6 +190,8 @@ var AddressPropertyKeys;
|
|
|
190
190
|
AddressPropertyKeys["ClassDescription"] = "ClassDescription";
|
|
191
191
|
/** Type of address (Shipping, Billing) (Sales - Address) */
|
|
192
192
|
AddressPropertyKeys["Type"] = "Type";
|
|
193
|
+
/** the latitude of the property (replaces the misspelled Latititude, CORE-1402) */
|
|
194
|
+
AddressPropertyKeys["Latitude"] = "Latitude";
|
|
193
195
|
})(AddressPropertyKeys = exports.AddressPropertyKeys || (exports.AddressPropertyKeys = {}));
|
|
194
196
|
/**
|
|
195
197
|
* Address entity from CrmModule
|
|
@@ -4789,6 +4789,31 @@ export declare class WorkOrderRecord<TProps = WorkOrderProperties> {
|
|
|
4789
4789
|
cancelNotStartedDispatchAmcoWorkOrder(options?: {
|
|
4790
4790
|
journeyId?: string;
|
|
4791
4791
|
}): ActionBuilder;
|
|
4792
|
+
/**
|
|
4793
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
4794
|
+
*
|
|
4795
|
+
* Transitions this WorkOrder record to a new pipeline stage.
|
|
4796
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
4797
|
+
*
|
|
4798
|
+
* @remarks Transitions to stage: ReplacementAmcoStageCancelled
|
|
4799
|
+
*
|
|
4800
|
+
* @param options - Optional settings
|
|
4801
|
+
* @param options.journeyId - Associate with a journey
|
|
4802
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
4803
|
+
* @throws Error if called on a new (unsaved) record
|
|
4804
|
+
*
|
|
4805
|
+
* @example
|
|
4806
|
+
* ```typescript
|
|
4807
|
+
* const record = await odinClient.workOrders.get(id);
|
|
4808
|
+
* await record.cancelNotStartedReplacementAmcoWorkOrder().execute();
|
|
4809
|
+
*
|
|
4810
|
+
* // Dry run (for debugging)
|
|
4811
|
+
* const payload = record.cancelNotStartedReplacementAmcoWorkOrder().dryRun();
|
|
4812
|
+
* ```
|
|
4813
|
+
*/
|
|
4814
|
+
cancelNotStartedReplacementAmcoWorkOrder(options?: {
|
|
4815
|
+
journeyId?: string;
|
|
4816
|
+
}): ActionBuilder;
|
|
4792
4817
|
/**
|
|
4793
4818
|
* CancelPrePullWorkOrderFlowSupplier
|
|
4794
4819
|
*
|
|
@@ -7454,6 +7454,35 @@ class WorkOrderRecord {
|
|
|
7454
7454
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'CancelNotStartedDispatchAmcoWorkOrder', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'DispatchAmcoStageCancelled' }, options);
|
|
7455
7455
|
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
7456
7456
|
}
|
|
7457
|
+
/**
|
|
7458
|
+
* CancelNotStartedReplacementAmcoWorkOrder
|
|
7459
|
+
*
|
|
7460
|
+
* Transitions this WorkOrder record to a new pipeline stage.
|
|
7461
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
7462
|
+
*
|
|
7463
|
+
* @remarks Transitions to stage: ReplacementAmcoStageCancelled
|
|
7464
|
+
*
|
|
7465
|
+
* @param options - Optional settings
|
|
7466
|
+
* @param options.journeyId - Associate with a journey
|
|
7467
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
7468
|
+
* @throws Error if called on a new (unsaved) record
|
|
7469
|
+
*
|
|
7470
|
+
* @example
|
|
7471
|
+
* ```typescript
|
|
7472
|
+
* const record = await odinClient.workOrders.get(id);
|
|
7473
|
+
* await record.cancelNotStartedReplacementAmcoWorkOrder().execute();
|
|
7474
|
+
*
|
|
7475
|
+
* // Dry run (for debugging)
|
|
7476
|
+
* const payload = record.cancelNotStartedReplacementAmcoWorkOrder().dryRun();
|
|
7477
|
+
* ```
|
|
7478
|
+
*/
|
|
7479
|
+
cancelNotStartedReplacementAmcoWorkOrder(options) {
|
|
7480
|
+
var _a;
|
|
7481
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
7482
|
+
throw new Error('cancelNotStartedReplacementAmcoWorkOrder requires an existing record. Use accessor.get() first.');
|
|
7483
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'CancelNotStartedReplacementAmcoWorkOrder', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'ReplacementAmcoStageCancelled' }, options);
|
|
7484
|
+
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
7485
|
+
}
|
|
7457
7486
|
/**
|
|
7458
7487
|
* CancelPrePullWorkOrderFlowSupplier
|
|
7459
7488
|
*
|