@d19n/youfibre-odin-sdk 2.0.280 → 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 +8 -5
- package/dist/entities-v2/WorkOrder.js +8 -5
- 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
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateYfAgentLocation Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Create (or upsert by NaturalKey) the per-worker-per-day GPS location record
|
|
5
|
+
*
|
|
6
|
+
* @module FieldServiceModule
|
|
7
|
+
* @entity YfAgentLocation
|
|
8
|
+
* @actionKey CreateYfAgentLocation
|
|
9
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for CreateYfAgentLocation created events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateYfAgentLocationMessage extends OdinRecordCreatedEvent<CreateYfAgentLocationDto, CreateYfAgentLocationProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for CreateYfAgentLocation action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 4
|
|
25
|
+
* @property Optional fields: 0
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateYfAgentLocationProperties {
|
|
28
|
+
/**
|
|
29
|
+
* User Id
|
|
30
|
+
*
|
|
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
|
+
* @type {TEXT}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
UserId: string;
|
|
36
|
+
/**
|
|
37
|
+
* User Name
|
|
38
|
+
*
|
|
39
|
+
* 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.
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
* @required
|
|
42
|
+
*/
|
|
43
|
+
UserName: string;
|
|
44
|
+
/**
|
|
45
|
+
* Date
|
|
46
|
+
*
|
|
47
|
+
* The UK day this record covers — matches reading_date on the ClickHouse rows (both roll over at UK midnight, BST included).
|
|
48
|
+
* @type {DATE}
|
|
49
|
+
* @required
|
|
50
|
+
*/
|
|
51
|
+
Date: string;
|
|
52
|
+
/**
|
|
53
|
+
* Natural Key
|
|
54
|
+
*
|
|
55
|
+
* "<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.
|
|
56
|
+
* @type {TEXT}
|
|
57
|
+
* @required
|
|
58
|
+
*/
|
|
59
|
+
NaturalKey: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Create Agent Location
|
|
63
|
+
*
|
|
64
|
+
* Create (or upsert by NaturalKey) the per-worker-per-day GPS location record
|
|
65
|
+
*
|
|
66
|
+
* @actionType CREATE - Creates a new YfAgentLocation record
|
|
67
|
+
* @module FieldServiceModule
|
|
68
|
+
* @entity YfAgentLocation
|
|
69
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation
|
|
70
|
+
* @permission schema.action.createyfagentlocation.trigger
|
|
71
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
72
|
+
*/
|
|
73
|
+
export declare class CreateYfAgentLocationDto extends OdinRecordCreateDto<CreateYfAgentLocationProperties> {
|
|
74
|
+
/** Used by SDK generators to identify action type */
|
|
75
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
76
|
+
static readonly ACTION_KEY = "CreateYfAgentLocation";
|
|
77
|
+
static readonly MODULE_NAME = "FieldServiceModule";
|
|
78
|
+
static readonly ENTITIES: string[];
|
|
79
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation";
|
|
80
|
+
static readonly PERMISSION = "schema.action.createyfagentlocation.trigger";
|
|
81
|
+
/** Step metadata - entity this action targets */
|
|
82
|
+
static readonly STEP_ENTITY = "FieldServiceModule:YfAgentLocation";
|
|
83
|
+
static readonly STEP_SCHEMA_ID = "ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c";
|
|
84
|
+
static readonly STEP_SCHEMA_ACTION_ID = "bdf16338-cba0-40d4-af89-7ab3bdbd76c0";
|
|
85
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
86
|
+
readonly actionName: string;
|
|
87
|
+
readonly schemaActionId: string;
|
|
88
|
+
readonly entity: string;
|
|
89
|
+
constructor(properties: CreateYfAgentLocationProperties, options?: {
|
|
90
|
+
journeyId?: string;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateYfAgentLocation Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Create (or upsert by NaturalKey) the per-worker-per-day GPS location record
|
|
6
|
+
*
|
|
7
|
+
* @module FieldServiceModule
|
|
8
|
+
* @entity YfAgentLocation
|
|
9
|
+
* @actionKey CreateYfAgentLocation
|
|
10
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateYfAgentLocationDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Create Agent Location
|
|
19
|
+
*
|
|
20
|
+
* Create (or upsert by NaturalKey) the per-worker-per-day GPS location record
|
|
21
|
+
*
|
|
22
|
+
* @actionType CREATE - Creates a new YfAgentLocation record
|
|
23
|
+
* @module FieldServiceModule
|
|
24
|
+
* @entity YfAgentLocation
|
|
25
|
+
* @event k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation
|
|
26
|
+
* @permission schema.action.createyfagentlocation.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class CreateYfAgentLocationDto extends core_1.OdinRecordCreateDto {
|
|
30
|
+
constructor(properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
entity: 'FieldServiceModule:YfAgentLocation',
|
|
33
|
+
type: undefined,
|
|
34
|
+
properties,
|
|
35
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
36
|
+
});
|
|
37
|
+
this.actionName = 'CreateYfAgentLocation';
|
|
38
|
+
this.schemaActionId = 'bdf16338-cba0-40d4-af89-7ab3bdbd76c0';
|
|
39
|
+
this.entity = 'FieldServiceModule:YfAgentLocation';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CreateYfAgentLocationDto = CreateYfAgentLocationDto;
|
|
43
|
+
/** Used by SDK generators to identify action type */
|
|
44
|
+
CreateYfAgentLocationDto.ACTION_TYPE = 'CREATE';
|
|
45
|
+
CreateYfAgentLocationDto.ACTION_KEY = 'CreateYfAgentLocation';
|
|
46
|
+
CreateYfAgentLocationDto.MODULE_NAME = 'FieldServiceModule';
|
|
47
|
+
CreateYfAgentLocationDto.ENTITIES = ['YfAgentLocation'];
|
|
48
|
+
CreateYfAgentLocationDto.EVENT_NAME = 'k1.t-hEOJjsDb.FieldServiceModule.YfAgentLocation.Create.CreateYfAgentLocation';
|
|
49
|
+
CreateYfAgentLocationDto.PERMISSION = 'schema.action.createyfagentlocation.trigger';
|
|
50
|
+
/** Step metadata - entity this action targets */
|
|
51
|
+
CreateYfAgentLocationDto.STEP_ENTITY = 'FieldServiceModule:YfAgentLocation';
|
|
52
|
+
CreateYfAgentLocationDto.STEP_SCHEMA_ID = 'ec118dd7-2e8c-4fc3-90b6-10ef79d51d7c';
|
|
53
|
+
CreateYfAgentLocationDto.STEP_SCHEMA_ACTION_ID = 'bdf16338-cba0-40d4-af89-7ab3bdbd76c0';
|
|
54
|
+
CreateYfAgentLocationDto.AUTO_LINK_PARENT = true;
|
|
@@ -22,7 +22,7 @@ export interface UpdateOrderMessage extends OdinRecordUpdatedEvent<UpdateOrderDt
|
|
|
22
22
|
* Properties for UpdateOrder action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 0
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 10
|
|
26
26
|
*/
|
|
27
27
|
export interface UpdateOrderProperties {
|
|
28
28
|
/**
|
|
@@ -91,6 +91,14 @@ export interface UpdateOrderProperties {
|
|
|
91
91
|
* @type {ENUM}
|
|
92
92
|
*/
|
|
93
93
|
SupplierOrderType?: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* contract end date
|
|
96
|
+
*
|
|
97
|
+
* the date the contract will end (Sales - Order)
|
|
98
|
+
* @type {DATE}
|
|
99
|
+
* @format DD/MM/YYYY
|
|
100
|
+
*/
|
|
101
|
+
ContractEndDate?: string | null;
|
|
94
102
|
}
|
|
95
103
|
/**
|
|
96
104
|
* UpdateOrder
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdatePgFileAllocationInvalid Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Sets or clears the Invalid flag on a file allocation. Its only job — the flag is never a side effect of a line-number or report write.
|
|
5
|
+
*
|
|
6
|
+
* @module BillingModule
|
|
7
|
+
* @entity PgFileAllocation
|
|
8
|
+
* @entityType DEFAULT
|
|
9
|
+
* @actionKey UpdatePgFileAllocationInvalid
|
|
10
|
+
* @event k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid
|
|
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 UpdatePgFileAllocationInvalid updated events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid
|
|
19
|
+
*/
|
|
20
|
+
export interface UpdatePgFileAllocationInvalidMessage extends OdinRecordUpdatedEvent<UpdatePgFileAllocationInvalidDto, UpdatePgFileAllocationInvalidProperties> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for UpdatePgFileAllocationInvalid action
|
|
24
|
+
*
|
|
25
|
+
* @property Required fields: 0
|
|
26
|
+
* @property Optional fields: 1
|
|
27
|
+
*/
|
|
28
|
+
export interface UpdatePgFileAllocationInvalidProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Invalid
|
|
31
|
+
*
|
|
32
|
+
* 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.
|
|
33
|
+
* @type {BOOLEAN}
|
|
34
|
+
*/
|
|
35
|
+
Invalid?: boolean | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Is this allocation invalid?
|
|
39
|
+
*
|
|
40
|
+
* Sets or clears the Invalid flag on a file allocation. Its only job — the flag is never a side effect of a line-number or report write.
|
|
41
|
+
*
|
|
42
|
+
* @actionType UPDATE - Updates an existing PgFileAllocation record
|
|
43
|
+
* @module BillingModule
|
|
44
|
+
* @entity PgFileAllocation
|
|
45
|
+
* @entityType DEFAULT (Default)
|
|
46
|
+
* @event k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid
|
|
47
|
+
* @permission schema.action.updatepgfileallocationinvalid.trigger
|
|
48
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
49
|
+
*/
|
|
50
|
+
export declare class UpdatePgFileAllocationInvalidDto extends OdinRecordUpdateDto<UpdatePgFileAllocationInvalidProperties> {
|
|
51
|
+
/** Used by SDK generators to identify action type */
|
|
52
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
53
|
+
static readonly ACTION_KEY = "UpdatePgFileAllocationInvalid";
|
|
54
|
+
static readonly MODULE_NAME = "BillingModule";
|
|
55
|
+
static readonly ENTITIES: string[];
|
|
56
|
+
static readonly ENTITY_TYPE = "DEFAULT";
|
|
57
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid";
|
|
58
|
+
static readonly PERMISSION = "schema.action.updatepgfileallocationinvalid.trigger";
|
|
59
|
+
/** Step metadata - entity this action targets */
|
|
60
|
+
static readonly STEP_ENTITY = "BillingModule:PgFileAllocation";
|
|
61
|
+
static readonly STEP_SCHEMA_ID = "0747b695-c0c0-4d18-b445-40e80ad531b4";
|
|
62
|
+
static readonly STEP_SCHEMA_ACTION_ID = "6497875c-9cae-469b-b2fa-e09488e00d77";
|
|
63
|
+
static readonly STEP_SCHEMA_TYPE_ID = "aebd372f-1c03-4160-a44a-8930181c21f6";
|
|
64
|
+
static readonly STEP_TYPE = "DEFAULT";
|
|
65
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
66
|
+
readonly actionName: string;
|
|
67
|
+
readonly schemaActionId: string;
|
|
68
|
+
readonly entity: string;
|
|
69
|
+
constructor(record: OdinRecord<any> | {
|
|
70
|
+
id: string;
|
|
71
|
+
entity: string;
|
|
72
|
+
type?: string;
|
|
73
|
+
}, properties: UpdatePgFileAllocationInvalidProperties, options?: {
|
|
74
|
+
journeyId?: string;
|
|
75
|
+
stageKey?: string;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdatePgFileAllocationInvalid Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Sets or clears the Invalid flag on a file allocation. Its only job — the flag is never a side effect of a line-number or report write.
|
|
6
|
+
*
|
|
7
|
+
* @module BillingModule
|
|
8
|
+
* @entity PgFileAllocation
|
|
9
|
+
* @entityType DEFAULT
|
|
10
|
+
* @actionKey UpdatePgFileAllocationInvalid
|
|
11
|
+
* @event k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdatePgFileAllocationInvalidDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* Is this allocation invalid?
|
|
20
|
+
*
|
|
21
|
+
* Sets or clears the Invalid flag on a file allocation. Its only job — the flag is never a side effect of a line-number or report write.
|
|
22
|
+
*
|
|
23
|
+
* @actionType UPDATE - Updates an existing PgFileAllocation record
|
|
24
|
+
* @module BillingModule
|
|
25
|
+
* @entity PgFileAllocation
|
|
26
|
+
* @entityType DEFAULT (Default)
|
|
27
|
+
* @event k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid
|
|
28
|
+
* @permission schema.action.updatepgfileallocationinvalid.trigger
|
|
29
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
30
|
+
*/
|
|
31
|
+
class UpdatePgFileAllocationInvalidDto extends core_1.OdinRecordUpdateDto {
|
|
32
|
+
constructor(record, properties, options) {
|
|
33
|
+
super({
|
|
34
|
+
id: record.id,
|
|
35
|
+
entity: record.entity,
|
|
36
|
+
type: record.type,
|
|
37
|
+
properties,
|
|
38
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
39
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
40
|
+
});
|
|
41
|
+
this.actionName = 'UpdatePgFileAllocationInvalid';
|
|
42
|
+
this.schemaActionId = '6497875c-9cae-469b-b2fa-e09488e00d77';
|
|
43
|
+
this.entity = 'BillingModule:PgFileAllocation';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.UpdatePgFileAllocationInvalidDto = UpdatePgFileAllocationInvalidDto;
|
|
47
|
+
/** Used by SDK generators to identify action type */
|
|
48
|
+
UpdatePgFileAllocationInvalidDto.ACTION_TYPE = 'UPDATE';
|
|
49
|
+
UpdatePgFileAllocationInvalidDto.ACTION_KEY = 'UpdatePgFileAllocationInvalid';
|
|
50
|
+
UpdatePgFileAllocationInvalidDto.MODULE_NAME = 'BillingModule';
|
|
51
|
+
UpdatePgFileAllocationInvalidDto.ENTITIES = ['PgFileAllocation'];
|
|
52
|
+
UpdatePgFileAllocationInvalidDto.ENTITY_TYPE = 'DEFAULT';
|
|
53
|
+
UpdatePgFileAllocationInvalidDto.EVENT_NAME = 'k1.t-hEOJjsDb.BillingModule.PgFileAllocation.Update.UpdatePgFileAllocationInvalid';
|
|
54
|
+
UpdatePgFileAllocationInvalidDto.PERMISSION = 'schema.action.updatepgfileallocationinvalid.trigger';
|
|
55
|
+
/** Step metadata - entity this action targets */
|
|
56
|
+
UpdatePgFileAllocationInvalidDto.STEP_ENTITY = 'BillingModule:PgFileAllocation';
|
|
57
|
+
UpdatePgFileAllocationInvalidDto.STEP_SCHEMA_ID = '0747b695-c0c0-4d18-b445-40e80ad531b4';
|
|
58
|
+
UpdatePgFileAllocationInvalidDto.STEP_SCHEMA_ACTION_ID = '6497875c-9cae-469b-b2fa-e09488e00d77';
|
|
59
|
+
UpdatePgFileAllocationInvalidDto.STEP_SCHEMA_TYPE_ID = 'aebd372f-1c03-4160-a44a-8930181c21f6';
|
|
60
|
+
UpdatePgFileAllocationInvalidDto.STEP_TYPE = 'DEFAULT';
|
|
61
|
+
UpdatePgFileAllocationInvalidDto.AUTO_LINK_PARENT = false;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
4
|
+
import { YfAgentLocationProperties } from '../entities-v2/YfAgentLocation';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinApiClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new YfAgentLocationApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.yfagentlocation.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare class YfAgentLocationApi extends ApiProvider {
|
|
15
|
+
protected readonly authToken?: string;
|
|
16
|
+
private readonly moduleName;
|
|
17
|
+
private readonly entityName;
|
|
18
|
+
private sourceRecord;
|
|
19
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
20
|
+
setRecord(sourceRecord: any): void;
|
|
21
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
22
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<YfAgentLocationProperties>>>;
|
|
23
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<YfAgentLocationProperties>>>;
|
|
24
|
+
reIndex(body: {
|
|
25
|
+
id: string;
|
|
26
|
+
schemaId: string;
|
|
27
|
+
}[]): Promise<any>;
|
|
28
|
+
get(yfAgentLocationId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<YfAgentLocationProperties>>;
|
|
29
|
+
getMany(yfAgentLocationIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<YfAgentLocationProperties>[]>;
|
|
30
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
31
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
32
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
33
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
34
|
+
delete(yfAgentLocationId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
35
|
+
deleteMany(yfAgentLocationIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
36
|
+
restore(yfAgentLocationIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
37
|
+
applyAction(dto: any): Promise<any[]>;
|
|
38
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
39
|
+
getVersions(): Promise<{
|
|
40
|
+
[key: string]: Record<string, any>;
|
|
41
|
+
}>;
|
|
42
|
+
getRevisionTimeline(): Promise<{
|
|
43
|
+
[key: string]: Record<string, any>[];
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.YfAgentLocationApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use OdinApiClient.
|
|
16
|
+
*
|
|
17
|
+
* Migration:
|
|
18
|
+
* - Old: new YfAgentLocationApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.yfagentlocation.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
22
|
+
*/
|
|
23
|
+
class YfAgentLocationApi extends api_provider_1.ApiProvider {
|
|
24
|
+
// ============================================
|
|
25
|
+
// PRIVATE BACKING FIELDS (Lazy Loading)
|
|
26
|
+
// ============================================
|
|
27
|
+
constructor(authParams, authToken) {
|
|
28
|
+
super(authParams, authToken);
|
|
29
|
+
this.authToken = authToken;
|
|
30
|
+
this.moduleName = 'FieldServiceModule';
|
|
31
|
+
this.entityName = 'YfAgentLocation';
|
|
32
|
+
// Link managers are lazy-loaded on first access
|
|
33
|
+
}
|
|
34
|
+
// ============================================
|
|
35
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
36
|
+
// ============================================
|
|
37
|
+
// Usage remains identical: api.address.list(recordId)
|
|
38
|
+
// ============================================
|
|
39
|
+
// STANDARD METHODS (Unchanged API)
|
|
40
|
+
// ============================================
|
|
41
|
+
setRecord(sourceRecord) {
|
|
42
|
+
this.sourceRecord = sourceRecord;
|
|
43
|
+
}
|
|
44
|
+
schema() {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
50
|
+
search(params) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want paginating through the results to be handled
|
|
56
|
+
searchAndPaginate(params) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function to re-index records in elastic search
|
|
62
|
+
reIndex(body) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
return yield this._reIndexRecords(body);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Use this function when you want to return a single record
|
|
68
|
+
get(yfAgentLocationId) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, yfAgentLocationId);
|
|
71
|
+
if (res)
|
|
72
|
+
this.setRecord(res);
|
|
73
|
+
return res;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Use this function when you want to return many records by primaryKeys
|
|
77
|
+
getMany(yfAgentLocationIds) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, yfAgentLocationIds);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// Use this function when you want to upsert one record
|
|
83
|
+
upsert(upsertDto) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
86
|
+
return res[0];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Use this function when you want to upsert many records
|
|
90
|
+
upsertMany(upsertDtos) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// Use this function when you want to update one record
|
|
96
|
+
update(updateDto) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
99
|
+
return res[0];
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Use this function when you want to update many records
|
|
103
|
+
updateMany(updateDtos) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
// Use this function when you want to delete one record
|
|
109
|
+
delete(yfAgentLocationId) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._delete(this.moduleName, this.entityName, [yfAgentLocationId]);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to delete many records
|
|
115
|
+
deleteMany(yfAgentLocationIds) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._delete(this.moduleName, this.entityName, yfAgentLocationIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to restore one or many records
|
|
121
|
+
restore(yfAgentLocationIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._restore(this.moduleName, this.entityName, yfAgentLocationIds);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// Use this function when you want to apply a single action
|
|
127
|
+
applyAction(dto) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
// Use this function when you want to bulk apply actions
|
|
133
|
+
bulkApplyActions(dtos) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Use this function when you want to return the versions for a single record
|
|
139
|
+
getVersions() {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Use this function when you want to return the change history for a single record
|
|
145
|
+
getRevisionTimeline() {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.YfAgentLocationApi = YfAgentLocationApi;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YfAgentLocation DB Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to YfAgentLocation records via direct database access.
|
|
5
|
+
* For use in backend services with principal + dbService.
|
|
6
|
+
* Returns wrapped records with typed action methods.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // Simple get
|
|
11
|
+
* const record = await accessor.get(id);
|
|
12
|
+
*
|
|
13
|
+
* // With related entities
|
|
14
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
15
|
+
*
|
|
16
|
+
* // With permissions bypass (separate options)
|
|
17
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
18
|
+
*
|
|
19
|
+
* // Silent write (no RabbitMQ events)
|
|
20
|
+
* const result = await accessor.upsert([dto], { omitWriteEvents: true });
|
|
21
|
+
*
|
|
22
|
+
* // Constructor-level default (applies to all calls)
|
|
23
|
+
* const accessor = new YfAgentLocationDbAccessor(principal, dbService, { omitPermissionsCheck: true });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
27
|
+
*/
|
|
28
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
|
|
29
|
+
import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
30
|
+
import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
|
|
31
|
+
import { YfAgentLocationProperties } from '../entities-v2/YfAgentLocation';
|
|
32
|
+
import { YfAgentLocationRecord } from '../records-v2/YfAgentLocationRecord';
|
|
33
|
+
/** Search response with wrapped records */
|
|
34
|
+
export interface YfAgentLocationDbSearchResponse {
|
|
35
|
+
records: YfAgentLocationRecord[];
|
|
36
|
+
totalRecords: number;
|
|
37
|
+
hasMore: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare class YfAgentLocationDbAccessor {
|
|
40
|
+
private readonly _provider;
|
|
41
|
+
private readonly _moduleName;
|
|
42
|
+
private readonly _entityName;
|
|
43
|
+
private readonly _defaultOptions?;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new YfAgentLocationDbAccessor
|
|
46
|
+
* @param principal - The authenticated principal
|
|
47
|
+
* @param dbService - The database service instance
|
|
48
|
+
* @param defaultOptions - Default provider options applied to all operations
|
|
49
|
+
*/
|
|
50
|
+
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
51
|
+
get moduleName(): string;
|
|
52
|
+
get entityName(): string;
|
|
53
|
+
/**
|
|
54
|
+
* Create a new empty YfAgentLocation record instance for create operations.
|
|
55
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
56
|
+
*
|
|
57
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
58
|
+
* @returns A new record wrapper with pre-generated ID
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // Auto-generated ID
|
|
63
|
+
* const note = odinDb.notes.new();
|
|
64
|
+
* console.log(note.id); // UUID available immediately
|
|
65
|
+
*
|
|
66
|
+
* // Custom ID
|
|
67
|
+
* const order = odinDb.orders.new("custom-id-123");
|
|
68
|
+
*
|
|
69
|
+
* // Reference ID before save
|
|
70
|
+
* const account = odinDb.accounts.new();
|
|
71
|
+
* const contact = odinDb.contacts.new();
|
|
72
|
+
* await contact
|
|
73
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
74
|
+
* .createContact({ FirstName: "John" });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
new(id?: string): YfAgentLocationRecord;
|
|
78
|
+
/**
|
|
79
|
+
* Get a single YfAgentLocation record by ID
|
|
80
|
+
*
|
|
81
|
+
* @param id - The record ID
|
|
82
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
83
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* // Simple get
|
|
88
|
+
* const record = await accessor.get(id);
|
|
89
|
+
*
|
|
90
|
+
* // With related entities
|
|
91
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
92
|
+
*
|
|
93
|
+
* // With permissions bypass
|
|
94
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
95
|
+
*
|
|
96
|
+
* // Both options
|
|
97
|
+
* const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
get(id: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<YfAgentLocationRecord>;
|
|
101
|
+
/**
|
|
102
|
+
* Get multiple YfAgentLocation records by IDs
|
|
103
|
+
*
|
|
104
|
+
* @param ids - Array of record IDs
|
|
105
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
106
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
107
|
+
*/
|
|
108
|
+
getMany(ids: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<YfAgentLocationRecord[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Search YfAgentLocation records
|
|
111
|
+
*
|
|
112
|
+
* @param params - Search parameters
|
|
113
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
114
|
+
*/
|
|
115
|
+
search(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<YfAgentLocationDbSearchResponse>;
|
|
116
|
+
/**
|
|
117
|
+
* Search all YfAgentLocation records with automatic pagination
|
|
118
|
+
*
|
|
119
|
+
* @param params - Search parameters
|
|
120
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
121
|
+
*/
|
|
122
|
+
searchAll(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<YfAgentLocationRecord[]>;
|
|
123
|
+
/**
|
|
124
|
+
* Async generator for paginating through all matching records.
|
|
125
|
+
* Yields batches of wrapped records.
|
|
126
|
+
*
|
|
127
|
+
* @param params - Search parameters
|
|
128
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
129
|
+
*/
|
|
130
|
+
paginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): AsyncGenerator<YfAgentLocationRecord[]>;
|
|
131
|
+
/**
|
|
132
|
+
* Create a fluent query builder for YfAgentLocation records
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* const results = await accessor
|
|
137
|
+
* .query()
|
|
138
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
139
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
140
|
+
* .select('id', 'title', 'properties.*')
|
|
141
|
+
* .sortBy('createdAt', 'desc')
|
|
142
|
+
* .limit(100)
|
|
143
|
+
* .execute();
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
query(): QueryBuilder<YfAgentLocationProperties, YfAgentLocationRecord>;
|
|
147
|
+
/** Access the underlying DbProvider */
|
|
148
|
+
get provider(): DbProvider;
|
|
149
|
+
}
|