@d19n/youfibre-odin-sdk 2.0.321 → 2.0.323

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 (63) hide show
  1. package/README.md +7 -2
  2. package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.d.ts +14 -14
  3. package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.js +22 -22
  4. package/dist/actions-v2/CreateOutboundDialSessionDto.d.ts +15 -1
  5. package/dist/actions-v2/DefaultServiceWorkOrderEditFormDto.d.ts +8 -1
  6. package/dist/actions-v2/UpdateCustomerDeviceBatteryDto.d.ts +3 -1
  7. package/dist/actions-v2/UpdateCustomerDeviceBatteryDto.js +3 -1
  8. package/dist/actions-v2/UpdateOutboundDialCampaignCaseDto.d.ts +29 -1
  9. package/dist/actions-v2/UpdateOutboundDialCampaignCaseOnDialEndDto.d.ts +29 -1
  10. package/dist/actions-v2/UpdateOutboundDialSessionOnAmdResultDto.d.ts +15 -1
  11. package/dist/api-sdk-v2/CaseApi.d.ts +4 -0
  12. package/dist/api-sdk-v2/CaseApi.js +12 -0
  13. package/dist/api-sdk-v2/CoachingSessionApi.d.ts +50 -0
  14. package/dist/api-sdk-v2/CoachingSessionApi.js +161 -0
  15. package/dist/api-sdk-v2/QaEvaluationAnswerApi.d.ts +48 -0
  16. package/dist/api-sdk-v2/QaEvaluationAnswerApi.js +155 -0
  17. package/dist/api-sdk-v2/QaEvaluationApi.d.ts +54 -0
  18. package/dist/api-sdk-v2/QaEvaluationApi.js +173 -0
  19. package/dist/api-sdk-v2/QaScorecardQuestionApi.d.ts +48 -0
  20. package/dist/api-sdk-v2/QaScorecardQuestionApi.js +155 -0
  21. package/dist/api-sdk-v2/QaScorecardTemplateApi.d.ts +50 -0
  22. package/dist/api-sdk-v2/QaScorecardTemplateApi.js +161 -0
  23. package/dist/db-sdk-v2/CaseDb.d.ts +4 -0
  24. package/dist/db-sdk-v2/CaseDb.js +12 -0
  25. package/dist/db-sdk-v2/CoachingSessionDb.d.ts +122 -0
  26. package/dist/db-sdk-v2/CoachingSessionDb.js +210 -0
  27. package/dist/db-sdk-v2/QaEvaluationAnswerDb.d.ts +120 -0
  28. package/dist/db-sdk-v2/QaEvaluationAnswerDb.js +204 -0
  29. package/dist/db-sdk-v2/QaEvaluationDb.d.ts +126 -0
  30. package/dist/db-sdk-v2/QaEvaluationDb.js +222 -0
  31. package/dist/db-sdk-v2/QaScorecardQuestionDb.d.ts +120 -0
  32. package/dist/db-sdk-v2/QaScorecardQuestionDb.js +204 -0
  33. package/dist/db-sdk-v2/QaScorecardTemplateDb.d.ts +122 -0
  34. package/dist/db-sdk-v2/QaScorecardTemplateDb.js +210 -0
  35. package/dist/entities-v2/Case.d.ts +14 -0
  36. package/dist/entities-v2/Case.js +9 -1
  37. package/dist/entities-v2/CoachingSession.d.ts +247 -0
  38. package/dist/entities-v2/CoachingSession.js +145 -0
  39. package/dist/entities-v2/CustomerDeviceRouter.d.ts +258 -8
  40. package/dist/entities-v2/CustomerDeviceRouter.js +17 -9
  41. package/dist/entities-v2/OutboundDialCampaignCase.d.ts +33 -1
  42. package/dist/entities-v2/OutboundDialCampaignCase.js +8 -0
  43. package/dist/entities-v2/OutboundDialSession.d.ts +17 -1
  44. package/dist/entities-v2/OutboundDialSession.js +4 -0
  45. package/dist/entities-v2/QaEvaluation.d.ts +361 -0
  46. package/dist/entities-v2/QaEvaluation.js +217 -0
  47. package/dist/entities-v2/QaEvaluationAnswer.d.ts +127 -0
  48. package/dist/entities-v2/QaEvaluationAnswer.js +92 -0
  49. package/dist/entities-v2/QaScorecardQuestion.d.ts +155 -0
  50. package/dist/entities-v2/QaScorecardQuestion.js +96 -0
  51. package/dist/entities-v2/QaScorecardTemplate.d.ts +152 -0
  52. package/dist/entities-v2/QaScorecardTemplate.js +114 -0
  53. package/dist/entities-v2/WorkOrder.d.ts +210 -1
  54. package/dist/entities-v2/WorkOrder.js +22 -4
  55. package/dist/entities-v2/YfFieldVisitOutcomeForm.d.ts +4 -3
  56. package/dist/entities-v2/YfFieldVisitOutcomeForm.js +2 -1
  57. package/dist/records-v2/CustomerDeviceRouterRecord.d.ts +38 -2
  58. package/dist/records-v2/CustomerDeviceRouterRecord.js +37 -0
  59. package/dist/records-v2/WorkOrderRecord.d.ts +4 -4
  60. package/dist/records-v2/WorkOrderRecord.js +4 -4
  61. package/dist/records-v2/YfFieldVisitOutcomeFormRecord.d.ts +5 -4
  62. package/dist/records-v2/YfFieldVisitOutcomeFormRecord.js +5 -5
  63. package/package.json +1 -1
@@ -0,0 +1,210 @@
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.CoachingSessionDb = void 0;
13
+ const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
14
+ const db_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/db.record.link.manager");
15
+ /**
16
+ * @deprecated Use OdinDbClient.
17
+ *
18
+ * Migration:
19
+ * - Old: new CoachingSessionApi(authParams).get(id)
20
+ * - New: new odin.coachingsession.get(id)
21
+ *
22
+ * The new OdinDbClient returns typed record wrappers with action methods.
23
+ *
24
+ * Supports separate query options and provider options:
25
+ * - Constructor level: new CoachingSessionDb(principal, dbService, { omitPermissionsCheck: true })
26
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
27
+ */
28
+ class CoachingSessionDb extends db_provider_1.DbProvider {
29
+ constructor(principal, dbService, defaultOptions) {
30
+ super(principal, dbService, defaultOptions);
31
+ this.moduleName = 'SupportModule';
32
+ this.entityName = 'CoachingSession';
33
+ this.principal = principal;
34
+ this.dbService = dbService;
35
+ // Link managers are lazy-loaded on first access
36
+ }
37
+ // ============================================
38
+ // LAZY-LOADED LINK MANAGERS (Public Getters)
39
+ // ============================================
40
+ // Usage remains identical: db.address.list(recordId)
41
+ get qaevaluation() {
42
+ if (!this._qaevaluation) {
43
+ this._qaevaluation = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:CoachingSession', 'SupportModule:QaEvaluation', 'QaEvaluation__CoachingSession');
44
+ }
45
+ return this._qaevaluation;
46
+ }
47
+ get case() {
48
+ if (!this._case) {
49
+ this._case = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:CoachingSession', 'SupportModule:Case', 'Case__CoachingSession');
50
+ }
51
+ return this._case;
52
+ }
53
+ // ============================================
54
+ // STANDARD METHODS
55
+ // ============================================
56
+ // Methods support separate query options and provider options for clean API
57
+ setRecord(sourceRecord) {
58
+ this.sourceRecord = sourceRecord;
59
+ }
60
+ /**
61
+ * Search records with manual pagination control
62
+ * @param params - Search parameters
63
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
64
+ */
65
+ searchRecords(params, providerOptions) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ return yield this._searchRecords(this.moduleName, this.entityName, params, providerOptions);
68
+ });
69
+ }
70
+ /**
71
+ * Search all records with automatic pagination
72
+ * @param params - Search parameters
73
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
74
+ */
75
+ searchAllRecordsAndPaginate(params, providerOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params, 0, providerOptions);
78
+ });
79
+ }
80
+ /**
81
+ * Get a single record by primary key
82
+ * @param coachingSessionId - Record ID
83
+ * @param queryOptions - Query options (WHAT: entities to include)
84
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
85
+ *
86
+ * @example
87
+ * // Simple get
88
+ * const record = await db.getByPrimaryKey(id);
89
+ *
90
+ * // With related entities
91
+ * const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
92
+ *
93
+ * // With permissions bypass
94
+ * const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
95
+ *
96
+ * // Both options
97
+ * const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
98
+ */
99
+ getByPrimaryKey(coachingSessionId, queryOptions, providerOptions) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, coachingSessionId, queryOptions, providerOptions);
102
+ if (res)
103
+ this.setRecord(res);
104
+ return res;
105
+ });
106
+ }
107
+ /**
108
+ * Get multiple records by primary keys
109
+ * @param coachingSessionIds - Array of record IDs
110
+ * @param queryOptions - Query options (WHAT: entities to include)
111
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
112
+ */
113
+ getManyByPrimaryKey(coachingSessionIds, queryOptions, providerOptions) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, coachingSessionIds, queryOptions, providerOptions);
116
+ });
117
+ }
118
+ /**
119
+ * Upsert a single record
120
+ * @param upsertDto - Record to upsert
121
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
122
+ */
123
+ upsert(upsertDto, providerOptions) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto], providerOptions);
126
+ return res[0];
127
+ });
128
+ }
129
+ /**
130
+ * Upsert multiple records
131
+ * @param upsertDtos - Records to upsert
132
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
133
+ */
134
+ upsertMany(upsertDtos, providerOptions) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ return yield this._upsert(this.moduleName, this.entityName, upsertDtos, providerOptions);
137
+ });
138
+ }
139
+ /**
140
+ * Update a single record
141
+ * @param updateDto - Record to update
142
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
143
+ */
144
+ update(updateDto, providerOptions) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ const res = yield this._update(this.moduleName, this.entityName, [updateDto], providerOptions);
147
+ return res[0];
148
+ });
149
+ }
150
+ /**
151
+ * Update multiple records
152
+ * @param updateDtos - Records to update
153
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
154
+ */
155
+ updateMany(updateDtos, providerOptions) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ return yield this._update(this.moduleName, this.entityName, updateDtos, providerOptions);
158
+ });
159
+ }
160
+ /**
161
+ * Delete one or many records
162
+ * @param coachingSessionIds - Record IDs to delete
163
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
164
+ */
165
+ delete(coachingSessionIds, providerOptions) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ return yield this._delete(this.moduleName, this.entityName, coachingSessionIds, providerOptions);
168
+ });
169
+ }
170
+ /**
171
+ * Restore one or many deleted records
172
+ * @param coachingSessionIds - Record IDs to restore
173
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
174
+ */
175
+ restore(coachingSessionIds, providerOptions) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ return yield this._restore(this.moduleName, this.entityName, coachingSessionIds, providerOptions);
178
+ });
179
+ }
180
+ /**
181
+ * Apply an action to a record
182
+ * @param actionName - The action key
183
+ * @param dto - The action DTO
184
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
185
+ */
186
+ applyAction(actionName, dto, providerOptions) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ return yield this._applyAction(this.moduleName, this.entityName, dto, providerOptions);
189
+ });
190
+ }
191
+ /**
192
+ * Get version history for the current source record
193
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
194
+ */
195
+ getVersions(providerOptions) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
198
+ });
199
+ }
200
+ /**
201
+ * Get revision timeline for the current source record
202
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
203
+ */
204
+ getRevisionTimeline(providerOptions) {
205
+ return __awaiter(this, void 0, void 0, function* () {
206
+ return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
207
+ });
208
+ }
209
+ }
210
+ exports.CoachingSessionDb = CoachingSessionDb;
@@ -0,0 +1,120 @@
1
+ import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
2
+ import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
3
+ import { DbRecordLinkManager } from '@d19n/odin-sdk-generator/dist/db.record.link.manager';
4
+ import { QaEvaluationAnswerProperties } from '../entities-v2/QaEvaluationAnswer';
5
+ /**
6
+ * @deprecated Use OdinDbClient.
7
+ *
8
+ * Migration:
9
+ * - Old: new QaEvaluationAnswerApi(authParams).get(id)
10
+ * - New: new odin.qaevaluationanswer.get(id)
11
+ *
12
+ * The new OdinDbClient returns typed record wrappers with action methods.
13
+ *
14
+ * Supports separate query options and provider options:
15
+ * - Constructor level: new QaEvaluationAnswerDb(principal, dbService, { omitPermissionsCheck: true })
16
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
17
+ */
18
+ export declare class QaEvaluationAnswerDb extends DbProvider {
19
+ protected readonly principal: any;
20
+ protected readonly dbService: any;
21
+ private readonly moduleName;
22
+ private readonly entityName;
23
+ private sourceRecord;
24
+ private _qaevaluation?;
25
+ constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
26
+ get qaevaluation(): DbRecordLinkManager;
27
+ setRecord(sourceRecord: any): void;
28
+ /**
29
+ * Search records with manual pagination control
30
+ * @param params - Search parameters
31
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
32
+ */
33
+ searchRecords(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationAnswerProperties>>>;
34
+ /**
35
+ * Search all records with automatic pagination
36
+ * @param params - Search parameters
37
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
38
+ */
39
+ searchAllRecordsAndPaginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationAnswerProperties>>>;
40
+ /**
41
+ * Get a single record by primary key
42
+ * @param qaEvaluationAnswerId - Record ID
43
+ * @param queryOptions - Query options (WHAT: entities to include)
44
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
45
+ *
46
+ * @example
47
+ * // Simple get
48
+ * const record = await db.getByPrimaryKey(id);
49
+ *
50
+ * // With related entities
51
+ * const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
52
+ *
53
+ * // With permissions bypass
54
+ * const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
55
+ *
56
+ * // Both options
57
+ * const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
58
+ */
59
+ getByPrimaryKey(qaEvaluationAnswerId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationAnswerProperties>>;
60
+ /**
61
+ * Get multiple records by primary keys
62
+ * @param qaEvaluationAnswerIds - Array of record IDs
63
+ * @param queryOptions - Query options (WHAT: entities to include)
64
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
65
+ */
66
+ getManyByPrimaryKey(qaEvaluationAnswerIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationAnswerProperties>[]>;
67
+ /**
68
+ * Upsert a single record
69
+ * @param upsertDto - Record to upsert
70
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
71
+ */
72
+ upsert(upsertDto: OdinRecordCreateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
73
+ /**
74
+ * Upsert multiple records
75
+ * @param upsertDtos - Records to upsert
76
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
77
+ */
78
+ upsertMany(upsertDtos: OdinRecordCreateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
79
+ /**
80
+ * Update a single record
81
+ * @param updateDto - Record to update
82
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
83
+ */
84
+ update(updateDto: OdinRecordUpdateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
85
+ /**
86
+ * Update multiple records
87
+ * @param updateDtos - Records to update
88
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
89
+ */
90
+ updateMany(updateDtos: OdinRecordUpdateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
91
+ /**
92
+ * Delete one or many records
93
+ * @param qaEvaluationAnswerIds - Record IDs to delete
94
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
95
+ */
96
+ delete(qaEvaluationAnswerIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
97
+ /**
98
+ * Restore one or many deleted records
99
+ * @param qaEvaluationAnswerIds - Record IDs to restore
100
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
101
+ */
102
+ restore(qaEvaluationAnswerIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordRestored[]>;
103
+ /**
104
+ * Apply an action to a record
105
+ * @param actionName - The action key
106
+ * @param dto - The action DTO
107
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
108
+ */
109
+ applyAction(actionName: string, dto: any, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
110
+ /**
111
+ * Get version history for the current source record
112
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
113
+ */
114
+ getVersions(providerOptions?: DbProviderOptions): Promise<any>;
115
+ /**
116
+ * Get revision timeline for the current source record
117
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
118
+ */
119
+ getRevisionTimeline(providerOptions?: DbProviderOptions): Promise<any>;
120
+ }
@@ -0,0 +1,204 @@
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.QaEvaluationAnswerDb = void 0;
13
+ const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
14
+ const db_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/db.record.link.manager");
15
+ /**
16
+ * @deprecated Use OdinDbClient.
17
+ *
18
+ * Migration:
19
+ * - Old: new QaEvaluationAnswerApi(authParams).get(id)
20
+ * - New: new odin.qaevaluationanswer.get(id)
21
+ *
22
+ * The new OdinDbClient returns typed record wrappers with action methods.
23
+ *
24
+ * Supports separate query options and provider options:
25
+ * - Constructor level: new QaEvaluationAnswerDb(principal, dbService, { omitPermissionsCheck: true })
26
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
27
+ */
28
+ class QaEvaluationAnswerDb extends db_provider_1.DbProvider {
29
+ constructor(principal, dbService, defaultOptions) {
30
+ super(principal, dbService, defaultOptions);
31
+ this.moduleName = 'SupportModule';
32
+ this.entityName = 'QaEvaluationAnswer';
33
+ this.principal = principal;
34
+ this.dbService = dbService;
35
+ // Link managers are lazy-loaded on first access
36
+ }
37
+ // ============================================
38
+ // LAZY-LOADED LINK MANAGERS (Public Getters)
39
+ // ============================================
40
+ // Usage remains identical: db.address.list(recordId)
41
+ get qaevaluation() {
42
+ if (!this._qaevaluation) {
43
+ this._qaevaluation = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:QaEvaluationAnswer', 'SupportModule:QaEvaluation', 'QaEvaluation__QaEvaluationAnswer');
44
+ }
45
+ return this._qaevaluation;
46
+ }
47
+ // ============================================
48
+ // STANDARD METHODS
49
+ // ============================================
50
+ // Methods support separate query options and provider options for clean API
51
+ setRecord(sourceRecord) {
52
+ this.sourceRecord = sourceRecord;
53
+ }
54
+ /**
55
+ * Search records with manual pagination control
56
+ * @param params - Search parameters
57
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
58
+ */
59
+ searchRecords(params, providerOptions) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ return yield this._searchRecords(this.moduleName, this.entityName, params, providerOptions);
62
+ });
63
+ }
64
+ /**
65
+ * Search all records with automatic pagination
66
+ * @param params - Search parameters
67
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
68
+ */
69
+ searchAllRecordsAndPaginate(params, providerOptions) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params, 0, providerOptions);
72
+ });
73
+ }
74
+ /**
75
+ * Get a single record by primary key
76
+ * @param qaEvaluationAnswerId - Record ID
77
+ * @param queryOptions - Query options (WHAT: entities to include)
78
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
79
+ *
80
+ * @example
81
+ * // Simple get
82
+ * const record = await db.getByPrimaryKey(id);
83
+ *
84
+ * // With related entities
85
+ * const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
86
+ *
87
+ * // With permissions bypass
88
+ * const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
89
+ *
90
+ * // Both options
91
+ * const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
92
+ */
93
+ getByPrimaryKey(qaEvaluationAnswerId, queryOptions, providerOptions) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaEvaluationAnswerId, queryOptions, providerOptions);
96
+ if (res)
97
+ this.setRecord(res);
98
+ return res;
99
+ });
100
+ }
101
+ /**
102
+ * Get multiple records by primary keys
103
+ * @param qaEvaluationAnswerIds - Array of record IDs
104
+ * @param queryOptions - Query options (WHAT: entities to include)
105
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
106
+ */
107
+ getManyByPrimaryKey(qaEvaluationAnswerIds, queryOptions, providerOptions) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaEvaluationAnswerIds, queryOptions, providerOptions);
110
+ });
111
+ }
112
+ /**
113
+ * Upsert a single record
114
+ * @param upsertDto - Record to upsert
115
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
116
+ */
117
+ upsert(upsertDto, providerOptions) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto], providerOptions);
120
+ return res[0];
121
+ });
122
+ }
123
+ /**
124
+ * Upsert multiple records
125
+ * @param upsertDtos - Records to upsert
126
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
127
+ */
128
+ upsertMany(upsertDtos, providerOptions) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ return yield this._upsert(this.moduleName, this.entityName, upsertDtos, providerOptions);
131
+ });
132
+ }
133
+ /**
134
+ * Update a single record
135
+ * @param updateDto - Record to update
136
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
137
+ */
138
+ update(updateDto, providerOptions) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const res = yield this._update(this.moduleName, this.entityName, [updateDto], providerOptions);
141
+ return res[0];
142
+ });
143
+ }
144
+ /**
145
+ * Update multiple records
146
+ * @param updateDtos - Records to update
147
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
148
+ */
149
+ updateMany(updateDtos, providerOptions) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ return yield this._update(this.moduleName, this.entityName, updateDtos, providerOptions);
152
+ });
153
+ }
154
+ /**
155
+ * Delete one or many records
156
+ * @param qaEvaluationAnswerIds - Record IDs to delete
157
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
158
+ */
159
+ delete(qaEvaluationAnswerIds, providerOptions) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ return yield this._delete(this.moduleName, this.entityName, qaEvaluationAnswerIds, providerOptions);
162
+ });
163
+ }
164
+ /**
165
+ * Restore one or many deleted records
166
+ * @param qaEvaluationAnswerIds - Record IDs to restore
167
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
168
+ */
169
+ restore(qaEvaluationAnswerIds, providerOptions) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ return yield this._restore(this.moduleName, this.entityName, qaEvaluationAnswerIds, providerOptions);
172
+ });
173
+ }
174
+ /**
175
+ * Apply an action to a record
176
+ * @param actionName - The action key
177
+ * @param dto - The action DTO
178
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
179
+ */
180
+ applyAction(actionName, dto, providerOptions) {
181
+ return __awaiter(this, void 0, void 0, function* () {
182
+ return yield this._applyAction(this.moduleName, this.entityName, dto, providerOptions);
183
+ });
184
+ }
185
+ /**
186
+ * Get version history for the current source record
187
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
188
+ */
189
+ getVersions(providerOptions) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
192
+ });
193
+ }
194
+ /**
195
+ * Get revision timeline for the current source record
196
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
197
+ */
198
+ getRevisionTimeline(providerOptions) {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
201
+ });
202
+ }
203
+ }
204
+ exports.QaEvaluationAnswerDb = QaEvaluationAnswerDb;
@@ -0,0 +1,126 @@
1
+ import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
2
+ import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
3
+ import { DbRecordLinkManager } from '@d19n/odin-sdk-generator/dist/db.record.link.manager';
4
+ import { QaEvaluationProperties } from '../entities-v2/QaEvaluation';
5
+ /**
6
+ * @deprecated Use OdinDbClient.
7
+ *
8
+ * Migration:
9
+ * - Old: new QaEvaluationApi(authParams).get(id)
10
+ * - New: new odin.qaevaluation.get(id)
11
+ *
12
+ * The new OdinDbClient returns typed record wrappers with action methods.
13
+ *
14
+ * Supports separate query options and provider options:
15
+ * - Constructor level: new QaEvaluationDb(principal, dbService, { omitPermissionsCheck: true })
16
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
17
+ */
18
+ export declare class QaEvaluationDb extends DbProvider {
19
+ protected readonly principal: any;
20
+ protected readonly dbService: any;
21
+ private readonly moduleName;
22
+ private readonly entityName;
23
+ private sourceRecord;
24
+ private _case?;
25
+ private _qascorecardtemplate?;
26
+ private _coachingsession?;
27
+ private _qaevaluationanswer?;
28
+ constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
29
+ get case(): DbRecordLinkManager;
30
+ get qascorecardtemplate(): DbRecordLinkManager;
31
+ get coachingsession(): DbRecordLinkManager;
32
+ get qaevaluationanswer(): DbRecordLinkManager;
33
+ setRecord(sourceRecord: any): void;
34
+ /**
35
+ * Search records with manual pagination control
36
+ * @param params - Search parameters
37
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
38
+ */
39
+ searchRecords(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationProperties>>>;
40
+ /**
41
+ * Search all records with automatic pagination
42
+ * @param params - Search parameters
43
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
44
+ */
45
+ searchAllRecordsAndPaginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationProperties>>>;
46
+ /**
47
+ * Get a single record by primary key
48
+ * @param qaEvaluationId - Record ID
49
+ * @param queryOptions - Query options (WHAT: entities to include)
50
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
51
+ *
52
+ * @example
53
+ * // Simple get
54
+ * const record = await db.getByPrimaryKey(id);
55
+ *
56
+ * // With related entities
57
+ * const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
58
+ *
59
+ * // With permissions bypass
60
+ * const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
61
+ *
62
+ * // Both options
63
+ * const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
64
+ */
65
+ getByPrimaryKey(qaEvaluationId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationProperties>>;
66
+ /**
67
+ * Get multiple records by primary keys
68
+ * @param qaEvaluationIds - Array of record IDs
69
+ * @param queryOptions - Query options (WHAT: entities to include)
70
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
71
+ */
72
+ getManyByPrimaryKey(qaEvaluationIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaEvaluationProperties>[]>;
73
+ /**
74
+ * Upsert a single record
75
+ * @param upsertDto - Record to upsert
76
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
77
+ */
78
+ upsert(upsertDto: OdinRecordCreateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
79
+ /**
80
+ * Upsert multiple records
81
+ * @param upsertDtos - Records to upsert
82
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
83
+ */
84
+ upsertMany(upsertDtos: OdinRecordCreateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
85
+ /**
86
+ * Update a single record
87
+ * @param updateDto - Record to update
88
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
89
+ */
90
+ update(updateDto: OdinRecordUpdateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
91
+ /**
92
+ * Update multiple records
93
+ * @param updateDtos - Records to update
94
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
95
+ */
96
+ updateMany(updateDtos: OdinRecordUpdateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
97
+ /**
98
+ * Delete one or many records
99
+ * @param qaEvaluationIds - Record IDs to delete
100
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
101
+ */
102
+ delete(qaEvaluationIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
103
+ /**
104
+ * Restore one or many deleted records
105
+ * @param qaEvaluationIds - Record IDs to restore
106
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
107
+ */
108
+ restore(qaEvaluationIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordRestored[]>;
109
+ /**
110
+ * Apply an action to a record
111
+ * @param actionName - The action key
112
+ * @param dto - The action DTO
113
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
114
+ */
115
+ applyAction(actionName: string, dto: any, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
116
+ /**
117
+ * Get version history for the current source record
118
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
119
+ */
120
+ getVersions(providerOptions?: DbProviderOptions): Promise<any>;
121
+ /**
122
+ * Get revision timeline for the current source record
123
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
124
+ */
125
+ getRevisionTimeline(providerOptions?: DbProviderOptions): Promise<any>;
126
+ }