@d19n/youfibre-odin-sdk 2.0.281 → 2.0.282
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 +10 -2
- package/dist/EntityRegistry.d.ts +2 -0
- package/dist/EntityRegistry.js +2 -0
- package/dist/OdinApiClient.d.ts +4 -0
- package/dist/OdinApiClient.js +8 -0
- package/dist/OdinDbClient.d.ts +4 -0
- package/dist/OdinDbClient.js +8 -0
- package/dist/accessors-v2/YfAgentLocationAccessor.d.ts +111 -0
- package/dist/accessors-v2/YfAgentLocationAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +3 -1
- package/dist/actions-v2/CreateContactDto.d.ts +8 -8
- package/dist/actions-v2/CreateLeadFromAddressDto.d.ts +8 -8
- package/dist/actions-v2/CreateYfAgentLocationDto.d.ts +92 -0
- package/dist/actions-v2/CreateYfAgentLocationDto.js +54 -0
- package/dist/actions-v2/UpdateOrderDto.d.ts +9 -1
- package/dist/actions-v2/UpdatePgFileAllocationInvalidDto.d.ts +77 -0
- package/dist/actions-v2/UpdatePgFileAllocationInvalidDto.js +61 -0
- package/dist/api-sdk-v2/YfAgentLocationApi.d.ts +45 -0
- package/dist/api-sdk-v2/YfAgentLocationApi.js +151 -0
- package/dist/db-accessors-v2/YfAgentLocationDbAccessor.d.ts +149 -0
- package/dist/db-accessors-v2/YfAgentLocationDbAccessor.js +227 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +3 -1
- package/dist/db-sdk-v2/YfAgentLocationDb.d.ts +117 -0
- package/dist/db-sdk-v2/YfAgentLocationDb.js +200 -0
- package/dist/entities-v2/FieldServiceProduct.d.ts +2 -0
- package/dist/entities-v2/FieldServiceProduct.js +2 -0
- package/dist/entities-v2/Order.d.ts +9 -0
- package/dist/entities-v2/Order.js +2 -0
- package/dist/entities-v2/PgFileAllocation.d.ts +21 -1
- package/dist/entities-v2/PgFileAllocation.js +2 -0
- package/dist/entities-v2/WorkOrder.d.ts +3 -2
- package/dist/entities-v2/WorkOrder.js +3 -2
- package/dist/entities-v2/YfAgentLocation.d.ts +98 -0
- package/dist/entities-v2/YfAgentLocation.js +72 -0
- package/dist/records-v2/PgFileAllocationRecord.d.ts +28 -0
- package/dist/records-v2/PgFileAllocationRecord.js +37 -0
- package/dist/records-v2/YfAgentLocationRecord.d.ts +184 -0
- package/dist/records-v2/YfAgentLocationRecord.js +243 -0
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +5 -2
- package/package.json +1 -1
|
@@ -45,7 +45,9 @@ export declare enum PgFileAllocationPropertyKeys {
|
|
|
45
45
|
/** Submission File Line Number */
|
|
46
46
|
SubmissionFileLineNumber = "SubmissionFileLineNumber",
|
|
47
47
|
/** Error Message */
|
|
48
|
-
ErrorMessage = "ErrorMessage"
|
|
48
|
+
ErrorMessage = "ErrorMessage",
|
|
49
|
+
/** Marks this allocation as not to be trusted — written, but it should not count as a real binding between the transaction and the file line. Defaults to false; every existing allocation keeps its current meaning. */
|
|
50
|
+
Invalid = "Invalid"
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
53
|
* Properties for PgFileAllocation records
|
|
@@ -93,6 +95,12 @@ export interface PgFileAllocationProperties {
|
|
|
93
95
|
* @type {TEXT_LONG}
|
|
94
96
|
*/
|
|
95
97
|
ErrorMessage: string;
|
|
98
|
+
/** Marks this allocation as not to be trusted — written, but it should not count as a real binding between the transaction and the file line. Defaults to false; every existing allocation keeps its current meaning.
|
|
99
|
+
*
|
|
100
|
+
* @type {BOOLEAN}
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
Invalid: boolean;
|
|
96
104
|
}
|
|
97
105
|
/**
|
|
98
106
|
* Properties for REPORT PgFileAllocation records
|
|
@@ -140,6 +148,12 @@ export interface ReportPgFileAllocationProperties {
|
|
|
140
148
|
* @type {TEXT_LONG}
|
|
141
149
|
*/
|
|
142
150
|
ErrorMessage: string;
|
|
151
|
+
/** Marks this allocation as not to be trusted — written, but it should not count as a real binding between the transaction and the file line. Defaults to false; every existing allocation keeps its current meaning.
|
|
152
|
+
*
|
|
153
|
+
* @type {BOOLEAN}
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
Invalid: boolean;
|
|
143
157
|
}
|
|
144
158
|
/**
|
|
145
159
|
* Properties for SUBMISSION PgFileAllocation records
|
|
@@ -187,6 +201,12 @@ export interface SubmissionPgFileAllocationProperties {
|
|
|
187
201
|
* @type {TEXT_LONG}
|
|
188
202
|
*/
|
|
189
203
|
ErrorMessage: string;
|
|
204
|
+
/** Marks this allocation as not to be trusted — written, but it should not count as a real binding between the transaction and the file line. Defaults to false; every existing allocation keeps its current meaning.
|
|
205
|
+
*
|
|
206
|
+
* @type {BOOLEAN}
|
|
207
|
+
* @default false
|
|
208
|
+
*/
|
|
209
|
+
Invalid: boolean;
|
|
190
210
|
}
|
|
191
211
|
/**
|
|
192
212
|
* PgFileAllocation entity from BillingModule
|
|
@@ -48,6 +48,8 @@ var PgFileAllocationPropertyKeys;
|
|
|
48
48
|
PgFileAllocationPropertyKeys["SubmissionFileLineNumber"] = "SubmissionFileLineNumber";
|
|
49
49
|
/** Error Message */
|
|
50
50
|
PgFileAllocationPropertyKeys["ErrorMessage"] = "ErrorMessage";
|
|
51
|
+
/** Marks this allocation as not to be trusted — written, but it should not count as a real binding between the transaction and the file line. Defaults to false; every existing allocation keeps its current meaning. */
|
|
52
|
+
PgFileAllocationPropertyKeys["Invalid"] = "Invalid";
|
|
51
53
|
})(PgFileAllocationPropertyKeys = exports.PgFileAllocationPropertyKeys || (exports.PgFileAllocationPropertyKeys = {}));
|
|
52
54
|
/**
|
|
53
55
|
* PgFileAllocation entity from BillingModule
|
|
@@ -1304,6 +1304,7 @@ export declare enum WorkOrderReTriggerReason {
|
|
|
1304
1304
|
* @remarks Available options:
|
|
1305
1305
|
* - `VC_CD` - At Risk Customer - Critical Dispatch
|
|
1306
1306
|
* - `CR_LS` - Chargeable replacement (Lost / stolen CPE)
|
|
1307
|
+
* - `PRE_INS` - CPE ahead of Installation
|
|
1307
1308
|
* - `CC_RC` - Customer Complaint - Retention Critical
|
|
1308
1309
|
* - `DD_MD` - Defective/Damaged Mesh - Troubleshoot Completed
|
|
1309
1310
|
* - `DD_PS` - Defective/Damaged Power Supply
|
|
@@ -1316,12 +1317,12 @@ export declare enum WorkOrderReTriggerReason {
|
|
|
1316
1317
|
* - `NR_INS` - Non-Received Device at Install
|
|
1317
1318
|
* - `OO_ND` - Original Order - Non Dispatched (3PL)
|
|
1318
1319
|
* - `CP_AV` - Pre installed property - CPE required for activation
|
|
1319
|
-
* -
|
|
1320
|
-
* - ... and 1 more
|
|
1320
|
+
* - ... and 2 more
|
|
1321
1321
|
*/
|
|
1322
1322
|
export declare enum WorkOrderDispatchReason {
|
|
1323
1323
|
AT_RISK_CUSTOMER_CRITICAL_DISPATCH = "VC_CD",
|
|
1324
1324
|
CHARGEABLE_REPLACEMENT_LOST_STOLEN_CPE = "CR_LS",
|
|
1325
|
+
CPE_AHEAD_OF_INSTALLATION = "PRE_INS",
|
|
1325
1326
|
CUSTOMER_COMPLAINT_RETENTION_CRITICAL = "CC_RC",
|
|
1326
1327
|
DEFECTIVE_DAMAGED_MESH_TROUBLESHOOT_COMPLETED = "DD_MD",
|
|
1327
1328
|
DEFECTIVE_DAMAGED_POWER_SUPPLY = "DD_PS",
|
|
@@ -1304,6 +1304,7 @@ var WorkOrderReTriggerReason;
|
|
|
1304
1304
|
* @remarks Available options:
|
|
1305
1305
|
* - `VC_CD` - At Risk Customer - Critical Dispatch
|
|
1306
1306
|
* - `CR_LS` - Chargeable replacement (Lost / stolen CPE)
|
|
1307
|
+
* - `PRE_INS` - CPE ahead of Installation
|
|
1307
1308
|
* - `CC_RC` - Customer Complaint - Retention Critical
|
|
1308
1309
|
* - `DD_MD` - Defective/Damaged Mesh - Troubleshoot Completed
|
|
1309
1310
|
* - `DD_PS` - Defective/Damaged Power Supply
|
|
@@ -1316,13 +1317,13 @@ var WorkOrderReTriggerReason;
|
|
|
1316
1317
|
* - `NR_INS` - Non-Received Device at Install
|
|
1317
1318
|
* - `OO_ND` - Original Order - Non Dispatched (3PL)
|
|
1318
1319
|
* - `CP_AV` - Pre installed property - CPE required for activation
|
|
1319
|
-
* -
|
|
1320
|
-
* - ... and 1 more
|
|
1320
|
+
* - ... and 2 more
|
|
1321
1321
|
*/
|
|
1322
1322
|
var WorkOrderDispatchReason;
|
|
1323
1323
|
(function (WorkOrderDispatchReason) {
|
|
1324
1324
|
WorkOrderDispatchReason["AT_RISK_CUSTOMER_CRITICAL_DISPATCH"] = "VC_CD";
|
|
1325
1325
|
WorkOrderDispatchReason["CHARGEABLE_REPLACEMENT_LOST_STOLEN_CPE"] = "CR_LS";
|
|
1326
|
+
WorkOrderDispatchReason["CPE_AHEAD_OF_INSTALLATION"] = "PRE_INS";
|
|
1326
1327
|
WorkOrderDispatchReason["CUSTOMER_COMPLAINT_RETENTION_CRITICAL"] = "CC_RC";
|
|
1327
1328
|
WorkOrderDispatchReason["DEFECTIVE_DAMAGED_MESH_TROUBLESHOOT_COMPLETED"] = "DD_MD";
|
|
1328
1329
|
WorkOrderDispatchReason["DEFECTIVE_DAMAGED_POWER_SUPPLY"] = "DD_PS";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YfAgentLocation Entity Definition
|
|
3
|
+
*
|
|
4
|
+
* One record per field worker per UK day; the doorway to that day's GPS trail in ClickHouse. Created lazily on the first reading of a day; upserts on NaturalKey. Carries identity scalars only — never coordinates.
|
|
5
|
+
*
|
|
6
|
+
* @module FieldServiceModule
|
|
7
|
+
* @entity YfAgentLocation
|
|
8
|
+
* @schemaId ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c
|
|
9
|
+
*
|
|
10
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
11
|
+
* Generated from Odin schema definition
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* Available types for YfAgentLocation records
|
|
16
|
+
*/
|
|
17
|
+
export declare enum YfAgentLocationEntityTypes {
|
|
18
|
+
/** This is the default record type */
|
|
19
|
+
DEFAULT = "DEFAULT"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Property keys for YfAgentLocation
|
|
23
|
+
* Use these constants instead of string literals for type safety
|
|
24
|
+
*/
|
|
25
|
+
export declare enum YfAgentLocationPropertyKeys {
|
|
26
|
+
/** The worker's OrganizationUser uuid — the same key the app and the ClickHouse reading rows use. Not unique here: one record per day per user. */
|
|
27
|
+
UserId = "UserId",
|
|
28
|
+
/** The UK day this record covers — matches reading_date on the ClickHouse rows (both roll over at UK midnight, BST included). */
|
|
29
|
+
Date = "Date",
|
|
30
|
+
/** Display name at the time the record was written. Denormalised on purpose — the record is a snapshot of the day, not a live join to the user. */
|
|
31
|
+
UserName = "UserName",
|
|
32
|
+
/** "<UserId>:<YYYY-MM-DD>". UNIQUE, so with upsertOnCreate a repeated create for the same worker-day updates the existing record instead of duplicating it. Mechanism, not information — hidden from tables. */
|
|
33
|
+
NaturalKey = "NaturalKey"
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Properties for YfAgentLocation records
|
|
37
|
+
*
|
|
38
|
+
* @see FieldServiceModule:YfAgentLocation
|
|
39
|
+
*/
|
|
40
|
+
export interface YfAgentLocationProperties {
|
|
41
|
+
/** The worker's OrganizationUser uuid — the same key the app and the ClickHouse reading rows use. Not unique here: one record per day per user.
|
|
42
|
+
*
|
|
43
|
+
* @type {TEXT}
|
|
44
|
+
* @default
|
|
45
|
+
*/
|
|
46
|
+
UserId: string;
|
|
47
|
+
/** The UK day this record covers — matches reading_date on the ClickHouse rows (both roll over at UK midnight, BST included).
|
|
48
|
+
*
|
|
49
|
+
* @type {DATE}
|
|
50
|
+
* @default
|
|
51
|
+
*/
|
|
52
|
+
Date: string;
|
|
53
|
+
/** Display name at the time the record was written. Denormalised on purpose — the record is a snapshot of the day, not a live join to the user.
|
|
54
|
+
*
|
|
55
|
+
* @type {TEXT}
|
|
56
|
+
* @default
|
|
57
|
+
*/
|
|
58
|
+
UserName: string;
|
|
59
|
+
/** "<UserId>:<YYYY-MM-DD>". UNIQUE, so with upsertOnCreate a repeated create for the same worker-day updates the existing record instead of duplicating it. Mechanism, not information — hidden from tables.
|
|
60
|
+
*
|
|
61
|
+
* @type {TEXT}
|
|
62
|
+
* @default
|
|
63
|
+
*/
|
|
64
|
+
NaturalKey: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* YfAgentLocation entity from FieldServiceModule
|
|
68
|
+
*
|
|
69
|
+
* One record per field worker per UK day; the doorway to that day's GPS trail in ClickHouse. Created lazily on the first reading of a day; upserts on NaturalKey. Carries identity scalars only — never coordinates.
|
|
70
|
+
*
|
|
71
|
+
* @module FieldServiceModule
|
|
72
|
+
* @entity YfAgentLocation
|
|
73
|
+
* @schemaId ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c
|
|
74
|
+
* @recordPrefix AGL
|
|
75
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
76
|
+
*/
|
|
77
|
+
export declare class YfAgentLocation extends OdinRecord<YfAgentLocationProperties> {
|
|
78
|
+
entity: 'FieldServiceModule:YfAgentLocation';
|
|
79
|
+
type: YfAgentLocationEntityTypes;
|
|
80
|
+
schemaId: 'ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c';
|
|
81
|
+
properties: YfAgentLocationProperties;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* RabbitMQ routing keys for YfAgentLocation events
|
|
85
|
+
*/
|
|
86
|
+
export declare const ROUTING_KEY_YF_AGENT_LOCATION_CREATED = "FieldServiceModule.YfAgentLocation.SubDbRecordCreated";
|
|
87
|
+
export declare const ROUTING_KEY_YF_AGENT_LOCATION_UPDATED = "FieldServiceModule.YfAgentLocation.SubDbRecordUpdated";
|
|
88
|
+
export declare const ROUTING_KEY_YF_AGENT_LOCATION_DELETED = "FieldServiceModule.YfAgentLocation.SubDbRecordDeleted";
|
|
89
|
+
/**
|
|
90
|
+
* Type-specific routing keys for YfAgentLocation events
|
|
91
|
+
* Subscribe to these for events on specific entity types only
|
|
92
|
+
*/
|
|
93
|
+
/** This is the default record type created */
|
|
94
|
+
export declare const ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_CREATED = "FieldServiceModule.YfAgentLocation.DEFAULT.SubDbRecordCreated";
|
|
95
|
+
/** This is the default record type updated */
|
|
96
|
+
export declare const ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_UPDATED = "FieldServiceModule.YfAgentLocation.DEFAULT.SubDbRecordUpdated";
|
|
97
|
+
/** This is the default record type deleted */
|
|
98
|
+
export declare const ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_DELETED = "FieldServiceModule.YfAgentLocation.DEFAULT.SubDbRecordDeleted";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* YfAgentLocation Entity Definition
|
|
4
|
+
*
|
|
5
|
+
* One record per field worker per UK day; the doorway to that day's GPS trail in ClickHouse. Created lazily on the first reading of a day; upserts on NaturalKey. Carries identity scalars only — never coordinates.
|
|
6
|
+
*
|
|
7
|
+
* @module FieldServiceModule
|
|
8
|
+
* @entity YfAgentLocation
|
|
9
|
+
* @schemaId ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
* Generated from Odin schema definition
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_DELETED = exports.ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_UPDATED = exports.ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_CREATED = exports.ROUTING_KEY_YF_AGENT_LOCATION_DELETED = exports.ROUTING_KEY_YF_AGENT_LOCATION_UPDATED = exports.ROUTING_KEY_YF_AGENT_LOCATION_CREATED = exports.YfAgentLocation = exports.YfAgentLocationPropertyKeys = exports.YfAgentLocationEntityTypes = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Available types for YfAgentLocation records
|
|
19
|
+
*/
|
|
20
|
+
var YfAgentLocationEntityTypes;
|
|
21
|
+
(function (YfAgentLocationEntityTypes) {
|
|
22
|
+
/** This is the default record type */
|
|
23
|
+
YfAgentLocationEntityTypes["DEFAULT"] = "DEFAULT";
|
|
24
|
+
})(YfAgentLocationEntityTypes = exports.YfAgentLocationEntityTypes || (exports.YfAgentLocationEntityTypes = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Property keys for YfAgentLocation
|
|
27
|
+
* Use these constants instead of string literals for type safety
|
|
28
|
+
*/
|
|
29
|
+
var YfAgentLocationPropertyKeys;
|
|
30
|
+
(function (YfAgentLocationPropertyKeys) {
|
|
31
|
+
/** The worker's OrganizationUser uuid — the same key the app and the ClickHouse reading rows use. Not unique here: one record per day per user. */
|
|
32
|
+
YfAgentLocationPropertyKeys["UserId"] = "UserId";
|
|
33
|
+
/** The UK day this record covers — matches reading_date on the ClickHouse rows (both roll over at UK midnight, BST included). */
|
|
34
|
+
YfAgentLocationPropertyKeys["Date"] = "Date";
|
|
35
|
+
/** Display name at the time the record was written. Denormalised on purpose — the record is a snapshot of the day, not a live join to the user. */
|
|
36
|
+
YfAgentLocationPropertyKeys["UserName"] = "UserName";
|
|
37
|
+
/** "<UserId>:<YYYY-MM-DD>". UNIQUE, so with upsertOnCreate a repeated create for the same worker-day updates the existing record instead of duplicating it. Mechanism, not information — hidden from tables. */
|
|
38
|
+
YfAgentLocationPropertyKeys["NaturalKey"] = "NaturalKey";
|
|
39
|
+
})(YfAgentLocationPropertyKeys = exports.YfAgentLocationPropertyKeys || (exports.YfAgentLocationPropertyKeys = {}));
|
|
40
|
+
/**
|
|
41
|
+
* YfAgentLocation entity from FieldServiceModule
|
|
42
|
+
*
|
|
43
|
+
* One record per field worker per UK day; the doorway to that day's GPS trail in ClickHouse. Created lazily on the first reading of a day; upserts on NaturalKey. Carries identity scalars only — never coordinates.
|
|
44
|
+
*
|
|
45
|
+
* @module FieldServiceModule
|
|
46
|
+
* @entity YfAgentLocation
|
|
47
|
+
* @schemaId ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c
|
|
48
|
+
* @recordPrefix AGL
|
|
49
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
50
|
+
*/
|
|
51
|
+
class YfAgentLocation extends core_1.OdinRecord {
|
|
52
|
+
}
|
|
53
|
+
exports.YfAgentLocation = YfAgentLocation;
|
|
54
|
+
// ============================================
|
|
55
|
+
// RABBITMQ EVENT ROUTING KEYS
|
|
56
|
+
// ============================================
|
|
57
|
+
/**
|
|
58
|
+
* RabbitMQ routing keys for YfAgentLocation events
|
|
59
|
+
*/
|
|
60
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_CREATED = 'FieldServiceModule.YfAgentLocation.SubDbRecordCreated';
|
|
61
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_UPDATED = 'FieldServiceModule.YfAgentLocation.SubDbRecordUpdated';
|
|
62
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_DELETED = 'FieldServiceModule.YfAgentLocation.SubDbRecordDeleted';
|
|
63
|
+
/**
|
|
64
|
+
* Type-specific routing keys for YfAgentLocation events
|
|
65
|
+
* Subscribe to these for events on specific entity types only
|
|
66
|
+
*/
|
|
67
|
+
/** This is the default record type created */
|
|
68
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_CREATED = 'FieldServiceModule.YfAgentLocation.DEFAULT.SubDbRecordCreated';
|
|
69
|
+
/** This is the default record type updated */
|
|
70
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_UPDATED = 'FieldServiceModule.YfAgentLocation.DEFAULT.SubDbRecordUpdated';
|
|
71
|
+
/** This is the default record type deleted */
|
|
72
|
+
exports.ROUTING_KEY_YF_AGENT_LOCATION_DEFAULT_DELETED = 'FieldServiceModule.YfAgentLocation.DEFAULT.SubDbRecordDeleted';
|
|
@@ -32,6 +32,7 @@ import { UpdatePgAllocationWithAcknowledgementOneProperties } from '../actions-v
|
|
|
32
32
|
import { UpdatePgAllocationWithAcknowledgementTwoProperties } from '../actions-v2/UpdatePgAllocationWithAcknowledgementTwoDto';
|
|
33
33
|
import { UpdatePgAllocationWithBacsReportProperties } from '../actions-v2/UpdatePgAllocationWithBacsReportDto';
|
|
34
34
|
import { UpdatePgFileAllocationProperties } from '../actions-v2/UpdatePgFileAllocationDto';
|
|
35
|
+
import { UpdatePgFileAllocationInvalidProperties } from '../actions-v2/UpdatePgFileAllocationInvalidDto';
|
|
35
36
|
import { PgTransactionRecord } from './PgTransactionRecord';
|
|
36
37
|
import { PgDirectDebitFileRecord } from './PgDirectDebitFileRecord';
|
|
37
38
|
import { PgPaymentMethodRecord } from './PgPaymentMethodRecord';
|
|
@@ -494,6 +495,33 @@ export declare class PgFileAllocationRecord<TProps = PgFileAllocationProperties>
|
|
|
494
495
|
journeyId?: string;
|
|
495
496
|
stageKey?: string;
|
|
496
497
|
}): ActionBuilder;
|
|
498
|
+
/**
|
|
499
|
+
* UpdatePgFileAllocationInvalid
|
|
500
|
+
*
|
|
501
|
+
* Updates this PgFileAllocation record.
|
|
502
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
503
|
+
*
|
|
504
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
505
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
506
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
507
|
+
* @throws Error if called on a new (unsaved) record
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* ```typescript
|
|
511
|
+
* const record = await odinClient.pgFileAllocations.get(id);
|
|
512
|
+
* await record.updatePgFileAllocationInvalid({ ... }).execute();
|
|
513
|
+
*
|
|
514
|
+
* // Dry run (for debugging)
|
|
515
|
+
* const payload = record.updatePgFileAllocationInvalid({ ... }).dryRun();
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
updatePgFileAllocationInvalid(propertiesOrOptions?: UpdatePgFileAllocationInvalidProperties | {
|
|
519
|
+
journeyId?: string;
|
|
520
|
+
stageKey?: string;
|
|
521
|
+
}, options?: {
|
|
522
|
+
journeyId?: string;
|
|
523
|
+
stageKey?: string;
|
|
524
|
+
}): ActionBuilder;
|
|
497
525
|
}
|
|
498
526
|
/** Type guard to check if an object is a PgFileAllocationRecord */
|
|
499
527
|
export declare function isPgFileAllocationRecord(obj: any): obj is PgFileAllocationRecord;
|
|
@@ -624,6 +624,43 @@ class PgFileAllocationRecord {
|
|
|
624
624
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdatePgFileAllocation', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
625
625
|
return new ActionBuilder(this._provider, 'BillingModule', 'PgFileAllocation', payload, () => { this._pendingLinks = []; });
|
|
626
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* UpdatePgFileAllocationInvalid
|
|
629
|
+
*
|
|
630
|
+
* Updates this PgFileAllocation record.
|
|
631
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
632
|
+
*
|
|
633
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
634
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
635
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
636
|
+
* @throws Error if called on a new (unsaved) record
|
|
637
|
+
*
|
|
638
|
+
* @example
|
|
639
|
+
* ```typescript
|
|
640
|
+
* const record = await odinClient.pgFileAllocations.get(id);
|
|
641
|
+
* await record.updatePgFileAllocationInvalid({ ... }).execute();
|
|
642
|
+
*
|
|
643
|
+
* // Dry run (for debugging)
|
|
644
|
+
* const payload = record.updatePgFileAllocationInvalid({ ... }).dryRun();
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
updatePgFileAllocationInvalid(propertiesOrOptions, options) {
|
|
648
|
+
var _a;
|
|
649
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
650
|
+
throw new Error('updatePgFileAllocationInvalid requires an existing record. Use accessor.get() first.');
|
|
651
|
+
let properties = {};
|
|
652
|
+
let opts = options;
|
|
653
|
+
if (propertiesOrOptions) {
|
|
654
|
+
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
655
|
+
opts = propertiesOrOptions;
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
properties = propertiesOrOptions;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdatePgFileAllocationInvalid', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
662
|
+
return new ActionBuilder(this._provider, 'BillingModule', 'PgFileAllocation', payload, () => { this._pendingLinks = []; });
|
|
663
|
+
}
|
|
627
664
|
}
|
|
628
665
|
exports.PgFileAllocationRecord = PgFileAllocationRecord;
|
|
629
666
|
// ============================================
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YfAgentLocation Record Wrapper
|
|
3
|
+
*
|
|
4
|
+
* Provides typed action methods and link management.
|
|
5
|
+
* Works with both ApiProvider and DbProvider.
|
|
6
|
+
*
|
|
7
|
+
* All action methods return an ActionBuilder or FlowBuilder.
|
|
8
|
+
* Call .execute() to run or .dryRun() to get the payload for debugging.
|
|
9
|
+
*
|
|
10
|
+
* Can be instantiated with null record for create operations:
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const record = odinClient.yfAgentLocations.new();
|
|
13
|
+
* await record.createYfAgentLocation({ ... }).execute();
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Entity Types: DEFAULT
|
|
17
|
+
*
|
|
18
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
19
|
+
*/
|
|
20
|
+
import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
|
|
21
|
+
import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
|
|
22
|
+
import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
|
|
23
|
+
import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
24
|
+
import { YfAgentLocationProperties } from '../entities-v2/YfAgentLocation';
|
|
25
|
+
import { CreateYfAgentLocationProperties } from '../actions-v2/CreateYfAgentLocationDto';
|
|
26
|
+
/** Valid entity types for YfAgentLocation */
|
|
27
|
+
export declare type YfAgentLocationType = 'DEFAULT';
|
|
28
|
+
/**
|
|
29
|
+
* Builder for action execution with dryRun support
|
|
30
|
+
*
|
|
31
|
+
* Provides a consistent API across all action types:
|
|
32
|
+
* - `.execute()` - Execute the action and return results
|
|
33
|
+
* - `.dryRun()` - Return the payload without executing (for debugging)
|
|
34
|
+
*/
|
|
35
|
+
declare class ActionBuilder<T = IDbRecordCreateUpdateRes[]> {
|
|
36
|
+
private _provider;
|
|
37
|
+
private _moduleName;
|
|
38
|
+
private _entityName;
|
|
39
|
+
private _payload;
|
|
40
|
+
private _clearPendingLinks;
|
|
41
|
+
constructor(provider: IOdinProvider, moduleName: string, entityName: string, payload: Record<string, any>, clearPendingLinks: () => void);
|
|
42
|
+
/**
|
|
43
|
+
* Set an external system identifier for this record.
|
|
44
|
+
* Links the record to a corresponding entry in an external application.
|
|
45
|
+
*
|
|
46
|
+
* @param externalId - The ID in the external system
|
|
47
|
+
* @param externalAppId - The external application identifier
|
|
48
|
+
* @returns this (for chaining)
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* await record.createOrder({ ... }).withExternalId('SF-123', 'salesforce').execute();
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
withExternalId(externalId: string, externalAppId: string): this;
|
|
56
|
+
/**
|
|
57
|
+
* Set security/access groups for this record.
|
|
58
|
+
* Controls which user groups can access the record.
|
|
59
|
+
*
|
|
60
|
+
* @param groups - Array of group names
|
|
61
|
+
* @returns this (for chaining)
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* await record.createOrder({ ... }).withGroups(['TenantA', 'BillingTeam']).execute();
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
withGroups(groups: string[]): this;
|
|
69
|
+
/**
|
|
70
|
+
* Execute the action
|
|
71
|
+
* @returns The result from the API
|
|
72
|
+
*/
|
|
73
|
+
execute(): Promise<T>;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the request payload without executing (for debugging)
|
|
76
|
+
* @returns The request payload that would be sent to the API
|
|
77
|
+
*/
|
|
78
|
+
dryRun(): Record<string, any>;
|
|
79
|
+
/**
|
|
80
|
+
* Prevents accidental `await actionBuilder` without .execute()
|
|
81
|
+
* Forces developers to explicitly call .execute()
|
|
82
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
83
|
+
*/
|
|
84
|
+
then(): never;
|
|
85
|
+
}
|
|
86
|
+
export declare class YfAgentLocationRecord<TProps = YfAgentLocationProperties> {
|
|
87
|
+
private _record;
|
|
88
|
+
private _provider;
|
|
89
|
+
private _pendingLinks;
|
|
90
|
+
private _preGeneratedId;
|
|
91
|
+
/**
|
|
92
|
+
* Create a record wrapper.
|
|
93
|
+
* @param record - The underlying record, or null for create operations
|
|
94
|
+
* @param provider - The API or DB provider
|
|
95
|
+
* @param preGeneratedId - Optional pre-generated ID for new records (auto-generated if not provided)
|
|
96
|
+
*/
|
|
97
|
+
constructor(record: OdinRecord<TProps> | null, provider: IOdinProvider, preGeneratedId?: string);
|
|
98
|
+
/** Returns true if this is a new (unsaved) record */
|
|
99
|
+
get isNew(): boolean;
|
|
100
|
+
/** Record ID - always available (pre-generated for new records) */
|
|
101
|
+
get id(): string;
|
|
102
|
+
get entity(): string;
|
|
103
|
+
get type(): YfAgentLocationType | undefined;
|
|
104
|
+
/** Record properties - empty object for new (unsaved) records */
|
|
105
|
+
get properties(): TProps;
|
|
106
|
+
get title(): string | undefined;
|
|
107
|
+
get recordNumber(): string | undefined;
|
|
108
|
+
get stage(): PipelineStageEntity | undefined;
|
|
109
|
+
get createdAt(): string | undefined;
|
|
110
|
+
get updatedAt(): string | undefined;
|
|
111
|
+
get externalId(): string | undefined;
|
|
112
|
+
get externalAppId(): string | undefined;
|
|
113
|
+
get groups(): string[];
|
|
114
|
+
/** Access the underlying OdinRecord (null for new records) */
|
|
115
|
+
get record(): OdinRecord<TProps> | null;
|
|
116
|
+
/**
|
|
117
|
+
* Type guard: check if this record is of type DEFAULT
|
|
118
|
+
*
|
|
119
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
120
|
+
* giving you access to DEFAULT-specific properties.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* if (record.isDefault()) {
|
|
125
|
+
* // TypeScript knows record.properties is YfAgentLocationProperties
|
|
126
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
* @remarks This is the default record type
|
|
130
|
+
*/
|
|
131
|
+
isDefault(): this is YfAgentLocationRecord<YfAgentLocationProperties>;
|
|
132
|
+
/**
|
|
133
|
+
* Queue a link to be created with the next action.
|
|
134
|
+
* Works for both create and update actions.
|
|
135
|
+
* @returns this (for chaining)
|
|
136
|
+
*/
|
|
137
|
+
link(target: OdinRecord<any> | {
|
|
138
|
+
id: string;
|
|
139
|
+
entity: string;
|
|
140
|
+
}): this;
|
|
141
|
+
/** Get the currently queued links */
|
|
142
|
+
get pendingLinks(): OdinRecordLinkDto[];
|
|
143
|
+
/** Clear pending links without executing an action */
|
|
144
|
+
clearPendingLinks(): this;
|
|
145
|
+
/**
|
|
146
|
+
* Immediately unlink a record (API call).
|
|
147
|
+
* Unlike link(), this executes immediately.
|
|
148
|
+
* @throws Error if called on a new (unsaved) record
|
|
149
|
+
*/
|
|
150
|
+
unlink(target: OdinRecord<any> | {
|
|
151
|
+
id: string;
|
|
152
|
+
} | string): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* CreateYfAgentLocation
|
|
155
|
+
*
|
|
156
|
+
* Creates a new YfAgentLocation record with the specified properties.
|
|
157
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
158
|
+
*
|
|
159
|
+
* @param properties - The properties for the new record
|
|
160
|
+
* @param options - Optional settings
|
|
161
|
+
* @param options.type - Override the record type
|
|
162
|
+
* @param options.journeyId - Associate with a journey
|
|
163
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
164
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```typescript
|
|
168
|
+
* // Create with properties
|
|
169
|
+
* const record = odinClient.yfAgentLocations.new();
|
|
170
|
+
* await record.createYfAgentLocation({ ... }).execute();
|
|
171
|
+
*
|
|
172
|
+
* // Dry run (for debugging)
|
|
173
|
+
* const payload = record.createYfAgentLocation({ ... }).dryRun();
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
createYfAgentLocation(properties: CreateYfAgentLocationProperties, options?: {
|
|
177
|
+
type?: string;
|
|
178
|
+
journeyId?: string;
|
|
179
|
+
stageKey?: string;
|
|
180
|
+
}): ActionBuilder;
|
|
181
|
+
}
|
|
182
|
+
/** Type guard to check if an object is a YfAgentLocationRecord */
|
|
183
|
+
export declare function isYfAgentLocationRecord(obj: any): obj is YfAgentLocationRecord;
|
|
184
|
+
export {};
|