@d19n/youfibre-odin-sdk 2.0.18 → 2.0.19

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.
Files changed (44) hide show
  1. package/README.md +20 -1
  2. package/dist/EntityRegistry.d.ts +2 -0
  3. package/dist/EntityRegistry.js +2 -0
  4. package/dist/OdinApiClient.d.ts +4 -0
  5. package/dist/OdinApiClient.js +8 -0
  6. package/dist/OdinDbClient.d.ts +4 -0
  7. package/dist/OdinDbClient.js +8 -0
  8. package/dist/accessors-v2/BngProvisionAccessor.d.ts +111 -0
  9. package/dist/accessors-v2/BngProvisionAccessor.js +190 -0
  10. package/dist/accessors-v2/index.d.ts +1 -0
  11. package/dist/accessors-v2/index.js +5 -3
  12. package/dist/actions-v2/CreateBngProvisionDto.d.ts +116 -0
  13. package/dist/actions-v2/CreateBngProvisionDto.js +54 -0
  14. package/dist/actions-v2/MoveInstallWorkOrderFromInProgressToPendingDto.d.ts +115 -0
  15. package/dist/actions-v2/MoveInstallWorkOrderFromInProgressToPendingDto.js +80 -0
  16. package/dist/actions-v2/MoveInstallWorkOrderFromPendingToInProgressDto.d.ts +115 -0
  17. package/dist/actions-v2/MoveInstallWorkOrderFromPendingToInProgressDto.js +80 -0
  18. package/dist/actions-v2/MoveInstallWorkOrderFromRemediationToInProgressDto.d.ts +115 -0
  19. package/dist/actions-v2/MoveInstallWorkOrderFromRemediationToInProgressDto.js +80 -0
  20. package/dist/actions-v2/MoveInstallWorkOrderToCancelledDto.d.ts +115 -0
  21. package/dist/actions-v2/MoveInstallWorkOrderToCancelledDto.js +80 -0
  22. package/dist/actions-v2/UpdateCaseCsatDto.d.ts +135 -0
  23. package/dist/actions-v2/UpdateCaseCsatDto.js +56 -0
  24. package/dist/db-accessors-v2/BngProvisionDbAccessor.d.ts +149 -0
  25. package/dist/db-accessors-v2/BngProvisionDbAccessor.js +227 -0
  26. package/dist/db-accessors-v2/index.d.ts +1 -0
  27. package/dist/db-accessors-v2/index.js +5 -3
  28. package/dist/entities-v2/Config.d.ts +8 -8
  29. package/dist/entities-v2/Config.js +4 -4
  30. package/dist/entities-v2/Contact.d.ts +7 -0
  31. package/dist/entities-v2/Contact.js +2 -0
  32. package/dist/entities-v2/CustomerDeviceOnt.d.ts +2 -0
  33. package/dist/entities-v2/CustomerDeviceOnt.js +2 -0
  34. package/dist/records-v2/BngProvisionRecord.d.ts +205 -0
  35. package/dist/records-v2/BngProvisionRecord.js +280 -0
  36. package/dist/records-v2/CaseRecord.d.ts +28 -0
  37. package/dist/records-v2/CaseRecord.js +37 -0
  38. package/dist/records-v2/OrderItemRecord.d.ts +20 -0
  39. package/dist/records-v2/OrderItemRecord.js +33 -0
  40. package/dist/records-v2/WorkOrderRecord.d.ts +100 -0
  41. package/dist/records-v2/WorkOrderRecord.js +116 -0
  42. package/dist/records-v2/index.d.ts +1 -0
  43. package/dist/records-v2/index.js +7 -4
  44. package/package.json +1 -1
@@ -0,0 +1,115 @@
1
+ /**
2
+ * MoveInstallWorkOrderToCancelled Action DTO
3
+ *
4
+ * MoveInstallWorkOrderToCancelled
5
+ *
6
+ * @module FieldServiceModule
7
+ * @entity WorkOrder
8
+ * @entityType INSTALL
9
+ * @actionKey MoveInstallWorkOrderToCancelled
10
+ * @event k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
15
+ declare type StepClassMap = {};
16
+ /**
17
+ * Link definition for connecting steps in MoveInstallWorkOrderToCancelled
18
+ */
19
+ export interface MoveInstallWorkOrderToCancelledStepLink {
20
+ /**
21
+ * The stepKey of the target step to link TO
22
+ * Must reference another step's stepKey in the same flow
23
+ */
24
+ stepKey: string;
25
+ /**
26
+ * The schema association ID (UUID) defining the relationship
27
+ * Use the association.id from the schema association definition
28
+ * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
29
+ */
30
+ schemaAssociationId: string;
31
+ }
32
+ /**
33
+ * Step definition with linking metadata for MoveInstallWorkOrderToCancelled
34
+ */
35
+ export interface MoveInstallWorkOrderToCancelledStepDefinition {
36
+ /** Unique identifier for this step */
37
+ stepKey: string;
38
+ /** The DTO class name for this step */
39
+ dtoClass: string;
40
+ /** The entity this step creates (Module:Entity format) */
41
+ entity: string;
42
+ /** Links to create after this step executes */
43
+ linksTo: MoveInstallWorkOrderToCancelledStepLink[] | null;
44
+ }
45
+ /**
46
+ * Type-safe step keys for MoveInstallWorkOrderToCancelled
47
+ */
48
+ export declare const MoveInstallWorkOrderToCancelledSteps: {
49
+ readonly step_1: "step_1";
50
+ };
51
+ export declare type MoveInstallWorkOrderToCancelledStepKey = typeof MoveInstallWorkOrderToCancelledSteps[keyof typeof MoveInstallWorkOrderToCancelledSteps];
52
+ /**
53
+ * RabbitMQ message payload for MoveInstallWorkOrderToCancelled step flow events
54
+ *
55
+ * @event k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled
56
+ */
57
+ export interface MoveInstallWorkOrderToCancelledMessage extends OdinRecordUpdatedEvent<MoveInstallWorkOrderToCancelledDto, {}> {
58
+ }
59
+ /**
60
+ * Properties for MoveInstallWorkOrderToCancelled action
61
+ *
62
+ */
63
+ export interface MoveInstallWorkOrderToCancelledProperties {
64
+ }
65
+ /**
66
+ * MoveInstallWorkOrderToCancelled
67
+ *
68
+ * @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
69
+ * @module FieldServiceModule
70
+ * @entity WorkOrder
71
+ * @entityType INSTALL (install)
72
+ * @targetStages WorkOrderStageCancelled
73
+ * @event k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled
74
+ * @permission schema.action.moveinstallworkordertocancelled.trigger
75
+ * @benchmark This action is tracked for performance benchmarks
76
+ */
77
+ export declare class MoveInstallWorkOrderToCancelledDto extends OdinRecordUpdateDto<Record<string, any>> {
78
+ /** Used by SDK generators to identify action type */
79
+ static readonly ACTION_TYPE = "UPDATE";
80
+ static readonly ACTION_KEY = "MoveInstallWorkOrderToCancelled";
81
+ static readonly MODULE_NAME = "FieldServiceModule";
82
+ static readonly ENTITIES: string[];
83
+ static readonly ENTITY_TYPE = "INSTALL";
84
+ static readonly EVENT_NAME = "k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled";
85
+ static readonly SCHEMA_ACTION_ID = "7ae669f2-491c-4815-a2c2-c37c057e5680";
86
+ static readonly PERMISSION = "schema.action.moveinstallworkordertocancelled.trigger";
87
+ static readonly TARGET_STAGES: readonly ["WorkOrderStageCancelled"];
88
+ static readonly IS_STAGE_TRANSITION = true;
89
+ static readonly IS_MULTI_STEP_FLOW = false;
90
+ static readonly HAS_STEP_LINKS = false;
91
+ /**
92
+ * Step definitions with linking metadata
93
+ * Used by SDK and backend for auto-linking after step execution
94
+ */
95
+ static readonly stepDefinitions: MoveInstallWorkOrderToCancelledStepDefinition[];
96
+ /** Type-safe step key accessor */
97
+ static readonly Steps: {
98
+ readonly step_1: "step_1";
99
+ };
100
+ readonly actionName: string;
101
+ readonly schemaActionId: string;
102
+ readonly entity: string;
103
+ readonly stageKey: string;
104
+ constructor(record: OdinRecord<any> | {
105
+ id: string;
106
+ entity: string;
107
+ type?: string;
108
+ }, options?: {
109
+ journeyId?: string;
110
+ });
111
+ /** Step classes that can be used with this action */
112
+ static readonly stepClasses: readonly [];
113
+ steps: StepClassMap[(typeof MoveInstallWorkOrderToCancelledDto.stepClasses)[number]][];
114
+ }
115
+ export {};
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * MoveInstallWorkOrderToCancelled Action DTO
4
+ *
5
+ * MoveInstallWorkOrderToCancelled
6
+ *
7
+ * @module FieldServiceModule
8
+ * @entity WorkOrder
9
+ * @entityType INSTALL
10
+ * @actionKey MoveInstallWorkOrderToCancelled
11
+ * @event k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled
12
+ *
13
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.MoveInstallWorkOrderToCancelledDto = exports.MoveInstallWorkOrderToCancelledSteps = void 0;
17
+ const core_1 = require("@d19n/odin-types/dist/core");
18
+ /**
19
+ * Type-safe step keys for MoveInstallWorkOrderToCancelled
20
+ */
21
+ exports.MoveInstallWorkOrderToCancelledSteps = {
22
+ step_1: 'step_1',
23
+ };
24
+ /**
25
+ * MoveInstallWorkOrderToCancelled
26
+ *
27
+ * @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
28
+ * @module FieldServiceModule
29
+ * @entity WorkOrder
30
+ * @entityType INSTALL (install)
31
+ * @targetStages WorkOrderStageCancelled
32
+ * @event k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled
33
+ * @permission schema.action.moveinstallworkordertocancelled.trigger
34
+ * @benchmark This action is tracked for performance benchmarks
35
+ */
36
+ class MoveInstallWorkOrderToCancelledDto extends core_1.OdinRecordUpdateDto {
37
+ constructor(record, options) {
38
+ super({
39
+ id: record.id,
40
+ entity: record.entity,
41
+ type: record.type,
42
+ properties: {},
43
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
44
+ });
45
+ this.actionName = 'MoveInstallWorkOrderToCancelled';
46
+ this.schemaActionId = '7ae669f2-491c-4815-a2c2-c37c057e5680';
47
+ this.entity = 'FieldServiceModule:WorkOrder';
48
+ this.stageKey = 'WorkOrderStageCancelled';
49
+ }
50
+ }
51
+ exports.MoveInstallWorkOrderToCancelledDto = MoveInstallWorkOrderToCancelledDto;
52
+ /** Used by SDK generators to identify action type */
53
+ MoveInstallWorkOrderToCancelledDto.ACTION_TYPE = 'UPDATE';
54
+ MoveInstallWorkOrderToCancelledDto.ACTION_KEY = 'MoveInstallWorkOrderToCancelled';
55
+ MoveInstallWorkOrderToCancelledDto.MODULE_NAME = 'FieldServiceModule';
56
+ MoveInstallWorkOrderToCancelledDto.ENTITIES = ['WorkOrder'];
57
+ MoveInstallWorkOrderToCancelledDto.ENTITY_TYPE = 'INSTALL';
58
+ MoveInstallWorkOrderToCancelledDto.EVENT_NAME = 'k1.t-t-hEOJjsDb.FieldServiceModule.WorkOrder.Transition.MoveInstallWorkOrderToCancelled';
59
+ MoveInstallWorkOrderToCancelledDto.SCHEMA_ACTION_ID = '7ae669f2-491c-4815-a2c2-c37c057e5680';
60
+ MoveInstallWorkOrderToCancelledDto.PERMISSION = 'schema.action.moveinstallworkordertocancelled.trigger';
61
+ MoveInstallWorkOrderToCancelledDto.TARGET_STAGES = ['WorkOrderStageCancelled'];
62
+ MoveInstallWorkOrderToCancelledDto.IS_STAGE_TRANSITION = true;
63
+ MoveInstallWorkOrderToCancelledDto.IS_MULTI_STEP_FLOW = false;
64
+ MoveInstallWorkOrderToCancelledDto.HAS_STEP_LINKS = false;
65
+ /**
66
+ * Step definitions with linking metadata
67
+ * Used by SDK and backend for auto-linking after step execution
68
+ */
69
+ MoveInstallWorkOrderToCancelledDto.stepDefinitions = [
70
+ {
71
+ stepKey: 'step_1',
72
+ dtoClass: 'unknown',
73
+ entity: 'unknown',
74
+ linksTo: null
75
+ }
76
+ ];
77
+ /** Type-safe step key accessor */
78
+ MoveInstallWorkOrderToCancelledDto.Steps = exports.MoveInstallWorkOrderToCancelledSteps;
79
+ /** Step classes that can be used with this action */
80
+ MoveInstallWorkOrderToCancelledDto.stepClasses = [];
@@ -0,0 +1,135 @@
1
+ /**
2
+ * UpdateCaseCsat Action DTO
3
+ *
4
+ * Updates the customer satisfaction fields
5
+ *
6
+ * @module SupportModule
7
+ * @entity Case
8
+ * @actionKey UpdateCaseCsat
9
+ * @event k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat
10
+ *
11
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
+ */
13
+ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
14
+ /**
15
+ * RabbitMQ message payload for UpdateCaseCsat updated events
16
+ *
17
+ * @event k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat
18
+ */
19
+ export interface UpdateCaseCsatMessage extends OdinRecordUpdatedEvent<UpdateCaseCsatDto, UpdateCaseCsatProperties> {
20
+ }
21
+ /**
22
+ * Properties for UpdateCaseCsat action
23
+ *
24
+ * @property Required fields: 0
25
+ * @property Optional fields: 10
26
+ */
27
+ export interface UpdateCaseCsatProperties {
28
+ /**
29
+ * Resolution CSAT Score
30
+ *
31
+ * Customer satisfaction score for the resolution of the case.
32
+ * @type {NUMBER}
33
+ */
34
+ CsatResolutionScore?: number | null;
35
+ /**
36
+ * Resolution CSAT Reason
37
+ *
38
+ * Main reason for the resolution CSAT score.
39
+ * @type {ENUM}
40
+ */
41
+ CsatResolutionReason?: string | null;
42
+ /**
43
+ * Other Resolution CSAT Reason
44
+ *
45
+ * Reason when Resolution CSAT Reason is OTHER.
46
+ * @type {TEXT_LONG}
47
+ */
48
+ CsatResolutionOtherReason?: string | null;
49
+ /**
50
+ * Resolution CSAT Comment
51
+ *
52
+ * Optional customer comment about the resolution.
53
+ * @type {TEXT_LONG}
54
+ */
55
+ CsatResolutionComment?: string | null;
56
+ /**
57
+ * Agent CSAT Comment
58
+ *
59
+ * Optional customer comment about the agent.
60
+ * @type {TEXT_LONG}
61
+ */
62
+ CsatAgentComment?: string | null;
63
+ /**
64
+ * Other Agent CSAT Reason
65
+ *
66
+ * Reason when Agent CSAT Reason is OTHER.
67
+ * @type {TEXT_LONG}
68
+ */
69
+ CsatAgentOtherReason?: string | null;
70
+ /**
71
+ * Agent CSAT Reason
72
+ *
73
+ * Main reason for the agent CSAT score.
74
+ * @type {ENUM}
75
+ */
76
+ CsatAgentReason?: string | null;
77
+ /**
78
+ * Agent CSAT Score
79
+ *
80
+ * Customer satisfaction score for the agent who handled the case.
81
+ * @type {NUMBER}
82
+ */
83
+ CsatAgentScore?: number | null;
84
+ /**
85
+ * CSAT Response Date
86
+ *
87
+ * Timestamp of the CSAT response
88
+ * @type {DATE_TIME}
89
+ */
90
+ CsatResponseAt?: string | null;
91
+ /**
92
+ * CSAT Sent At
93
+ *
94
+ * Indicates when the CSAT has been sent
95
+ * @type {DATE_TIME}
96
+ */
97
+ CsatSentAt?: string | null;
98
+ }
99
+ /**
100
+ * UpdateCaseCsat
101
+ *
102
+ * Updates the customer satisfaction fields
103
+ *
104
+ * @actionType UPDATE - Updates an existing Case record
105
+ * @module SupportModule
106
+ * @entity Case
107
+ * @event k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat
108
+ * @permission schema.action.updatecasecsat.trigger
109
+ * @benchmark This action is tracked for performance benchmarks
110
+ */
111
+ export declare class UpdateCaseCsatDto extends OdinRecordUpdateDto<UpdateCaseCsatProperties> {
112
+ /** Used by SDK generators to identify action type */
113
+ static readonly ACTION_TYPE = "UPDATE";
114
+ static readonly ACTION_KEY = "UpdateCaseCsat";
115
+ static readonly MODULE_NAME = "SupportModule";
116
+ static readonly ENTITIES: string[];
117
+ static readonly EVENT_NAME = "k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat";
118
+ static readonly PERMISSION = "schema.action.updatecasecsat.trigger";
119
+ /** Step metadata - entity this action targets */
120
+ static readonly STEP_ENTITY = "SupportModule:Case";
121
+ static readonly STEP_SCHEMA_ID = "be8173eb-269b-4a67-be0c-11ce6af5d561";
122
+ static readonly STEP_SCHEMA_ACTION_ID = "69f8e454-d840-4dce-8484-321c2146f5f3";
123
+ static readonly AUTO_LINK_PARENT = false;
124
+ readonly actionName: string;
125
+ readonly schemaActionId: string;
126
+ readonly entity: string;
127
+ constructor(record: OdinRecord<any> | {
128
+ id: string;
129
+ entity: string;
130
+ type?: string;
131
+ }, properties: UpdateCaseCsatProperties, options?: {
132
+ journeyId?: string;
133
+ stageKey?: string;
134
+ });
135
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * UpdateCaseCsat Action DTO
4
+ *
5
+ * Updates the customer satisfaction fields
6
+ *
7
+ * @module SupportModule
8
+ * @entity Case
9
+ * @actionKey UpdateCaseCsat
10
+ * @event k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.UpdateCaseCsatDto = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * UpdateCaseCsat
19
+ *
20
+ * Updates the customer satisfaction fields
21
+ *
22
+ * @actionType UPDATE - Updates an existing Case record
23
+ * @module SupportModule
24
+ * @entity Case
25
+ * @event k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat
26
+ * @permission schema.action.updatecasecsat.trigger
27
+ * @benchmark This action is tracked for performance benchmarks
28
+ */
29
+ class UpdateCaseCsatDto extends core_1.OdinRecordUpdateDto {
30
+ constructor(record, properties, options) {
31
+ super({
32
+ id: record.id,
33
+ entity: record.entity,
34
+ type: record.type,
35
+ properties,
36
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
37
+ stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
38
+ });
39
+ this.actionName = 'UpdateCaseCsat';
40
+ this.schemaActionId = '69f8e454-d840-4dce-8484-321c2146f5f3';
41
+ this.entity = 'SupportModule:Case';
42
+ }
43
+ }
44
+ exports.UpdateCaseCsatDto = UpdateCaseCsatDto;
45
+ /** Used by SDK generators to identify action type */
46
+ UpdateCaseCsatDto.ACTION_TYPE = 'UPDATE';
47
+ UpdateCaseCsatDto.ACTION_KEY = 'UpdateCaseCsat';
48
+ UpdateCaseCsatDto.MODULE_NAME = 'SupportModule';
49
+ UpdateCaseCsatDto.ENTITIES = ['Case'];
50
+ UpdateCaseCsatDto.EVENT_NAME = 'k1.t-t-hEOJjsDb.SupportModule.Case.Update.UpdateCaseCsat';
51
+ UpdateCaseCsatDto.PERMISSION = 'schema.action.updatecasecsat.trigger';
52
+ /** Step metadata - entity this action targets */
53
+ UpdateCaseCsatDto.STEP_ENTITY = 'SupportModule:Case';
54
+ UpdateCaseCsatDto.STEP_SCHEMA_ID = 'be8173eb-269b-4a67-be0c-11ce6af5d561';
55
+ UpdateCaseCsatDto.STEP_SCHEMA_ACTION_ID = '69f8e454-d840-4dce-8484-321c2146f5f3';
56
+ UpdateCaseCsatDto.AUTO_LINK_PARENT = false;
@@ -0,0 +1,149 @@
1
+ /**
2
+ * BngProvision DB Accessor
3
+ *
4
+ * Provides typed access to BngProvision 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 BngProvisionDbAccessor(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 { BngProvisionProperties } from '../entities-v2/BngProvision';
32
+ import { BngProvisionRecord } from '../records-v2/BngProvisionRecord';
33
+ /** Search response with wrapped records */
34
+ export interface BngProvisionDbSearchResponse {
35
+ records: BngProvisionRecord[];
36
+ totalRecords: number;
37
+ hasMore: boolean;
38
+ }
39
+ export declare class BngProvisionDbAccessor {
40
+ private readonly _provider;
41
+ private readonly _moduleName;
42
+ private readonly _entityName;
43
+ private readonly _defaultOptions?;
44
+ /**
45
+ * Create a new BngProvisionDbAccessor
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 BngProvision 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): BngProvisionRecord;
78
+ /**
79
+ * Get a single BngProvision 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<BngProvisionRecord>;
101
+ /**
102
+ * Get multiple BngProvision 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<BngProvisionRecord[]>;
109
+ /**
110
+ * Search BngProvision 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<BngProvisionDbSearchResponse>;
116
+ /**
117
+ * Search all BngProvision 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<BngProvisionRecord[]>;
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<BngProvisionRecord[]>;
131
+ /**
132
+ * Create a fluent query builder for BngProvision 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<BngProvisionProperties, BngProvisionRecord>;
147
+ /** Access the underlying DbProvider */
148
+ get provider(): DbProvider;
149
+ }