@d19n/youfibre-odin-sdk 2.0.370 → 2.0.372

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 (54) hide show
  1. package/README.md +7 -3
  2. package/dist/actions-v2/CreateNoteForCaseSalesAppDto.d.ts +73 -0
  3. package/dist/actions-v2/CreateNoteForCaseSalesAppDto.js +59 -0
  4. package/dist/actions-v2/CreateOutboundDialCampaignDto.d.ts +8 -1
  5. package/dist/actions-v2/MoveCaseToSolvedWithNoteSalesAppDto.d.ts +171 -0
  6. package/dist/actions-v2/MoveCaseToSolvedWithNoteSalesAppDto.js +124 -0
  7. package/dist/actions-v2/OrderBuilderUpdateContactDto.d.ts +182 -0
  8. package/dist/actions-v2/OrderBuilderUpdateContactDto.js +56 -0
  9. package/dist/actions-v2/UpdateOutboundDialCampaignCaseDto.d.ts +15 -1
  10. package/dist/actions-v2/UpdateOutboundDialCampaignCaseOnDialEndDto.d.ts +15 -1
  11. package/dist/actions-v2/UpdateoutbounddialcampaignDto.d.ts +8 -1
  12. package/dist/api-sdk-v2/QaBatchApi.d.ts +48 -0
  13. package/dist/api-sdk-v2/QaBatchApi.js +155 -0
  14. package/dist/api-sdk-v2/QaReportApi.d.ts +2 -0
  15. package/dist/api-sdk-v2/QaReportApi.js +6 -0
  16. package/dist/db-sdk-v2/QaBatchDb.d.ts +120 -0
  17. package/dist/db-sdk-v2/QaBatchDb.js +204 -0
  18. package/dist/db-sdk-v2/QaReportDb.d.ts +2 -0
  19. package/dist/db-sdk-v2/QaReportDb.js +6 -0
  20. package/dist/entities-v2/AiRouteRequest.d.ts +2 -0
  21. package/dist/entities-v2/AiRouteRequest.js +2 -0
  22. package/dist/entities-v2/Document.d.ts +821 -12
  23. package/dist/entities-v2/Document.js +63 -1
  24. package/dist/entities-v2/DocumentProcessing.d.ts +7 -1
  25. package/dist/entities-v2/DocumentProcessing.js +6 -0
  26. package/dist/entities-v2/EquipmentReturnItem.d.ts +6 -6
  27. package/dist/entities-v2/EquipmentReturnItem.js +6 -6
  28. package/dist/entities-v2/HomeMove.d.ts +23 -1
  29. package/dist/entities-v2/HomeMove.js +17 -1
  30. package/dist/entities-v2/Note.d.ts +9 -9
  31. package/dist/entities-v2/Note.js +2 -2
  32. package/dist/entities-v2/Order.d.ts +9 -1
  33. package/dist/entities-v2/Order.js +2 -0
  34. package/dist/entities-v2/OutboundDialCampaign.d.ts +9 -1
  35. package/dist/entities-v2/OutboundDialCampaign.js +2 -0
  36. package/dist/entities-v2/OutboundDialCampaignCase.d.ts +17 -1
  37. package/dist/entities-v2/OutboundDialCampaignCase.js +4 -0
  38. package/dist/entities-v2/QaBatch.d.ts +235 -0
  39. package/dist/entities-v2/QaBatch.js +122 -0
  40. package/dist/entities-v2/QaReport.d.ts +12 -1
  41. package/dist/entities-v2/QaReport.js +2 -0
  42. package/dist/entities-v2/Recontract.d.ts +17 -1
  43. package/dist/entities-v2/Recontract.js +4 -0
  44. package/dist/entities-v2/Returns.d.ts +30 -30
  45. package/dist/entities-v2/Returns.js +30 -30
  46. package/dist/records-v2/CaseRecord.d.ts +87 -0
  47. package/dist/records-v2/CaseRecord.js +133 -1
  48. package/dist/records-v2/ContactRecord.d.ts +27 -0
  49. package/dist/records-v2/ContactRecord.js +29 -0
  50. package/dist/records-v2/DocumentRecord.d.ts +35 -3
  51. package/dist/records-v2/DocumentRecord.js +33 -1
  52. package/dist/records-v2/NoteRecord.d.ts +29 -0
  53. package/dist/records-v2/NoteRecord.js +36 -0
  54. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * OrderBuilderUpdateContact Action DTO
4
+ *
5
+ * Updates an existing Contact from Order Builder V2 step 2. Loaded by name by the desktop builder and saved through CrmModule/v2.0/records/apply-action, so the fields an agent may change on an existing contact are set on this form rather than in React. A sibling of UpdateContact, which keeps serving the Contact detail view: this one is not the default form and is not a record-header button. Form copied from UpdateContact, Critical Dependencies section included. CORE-1493.
6
+ *
7
+ * @module CrmModule
8
+ * @entity Contact
9
+ * @actionKey OrderBuilderUpdateContact
10
+ * @event k1.t-hEOJjsDb.CrmModule.Contact.Update.OrderBuilderUpdateContact
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.OrderBuilderUpdateContactDto = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * OrderBuilderUpdateContact
19
+ *
20
+ * Updates an existing Contact from Order Builder V2 step 2. Loaded by name by the desktop builder and saved through CrmModule/v2.0/records/apply-action, so the fields an agent may change on an existing contact are set on this form rather than in React. A sibling of UpdateContact, which keeps serving the Contact detail view: this one is not the default form and is not a record-header button. Form copied from UpdateContact, Critical Dependencies section included. CORE-1493.
21
+ *
22
+ * @actionType UPDATE - Updates an existing Contact record
23
+ * @module CrmModule
24
+ * @entity Contact
25
+ * @event k1.t-hEOJjsDb.CrmModule.Contact.Update.OrderBuilderUpdateContact
26
+ * @permission schema.action.orderbuilderupdatecontact.trigger
27
+ * @benchmark This action is tracked for performance benchmarks
28
+ */
29
+ class OrderBuilderUpdateContactDto 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 = 'OrderBuilderUpdateContact';
40
+ this.schemaActionId = '4466e908-e22c-4980-8523-9a18492ab692';
41
+ this.entity = 'CrmModule:Contact';
42
+ }
43
+ }
44
+ exports.OrderBuilderUpdateContactDto = OrderBuilderUpdateContactDto;
45
+ /** Used by SDK generators to identify action type */
46
+ OrderBuilderUpdateContactDto.ACTION_TYPE = 'UPDATE';
47
+ OrderBuilderUpdateContactDto.ACTION_KEY = 'OrderBuilderUpdateContact';
48
+ OrderBuilderUpdateContactDto.MODULE_NAME = 'CrmModule';
49
+ OrderBuilderUpdateContactDto.ENTITIES = ['Contact'];
50
+ OrderBuilderUpdateContactDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.Contact.Update.OrderBuilderUpdateContact';
51
+ OrderBuilderUpdateContactDto.PERMISSION = 'schema.action.orderbuilderupdatecontact.trigger';
52
+ /** Step metadata - entity this action targets */
53
+ OrderBuilderUpdateContactDto.STEP_ENTITY = 'CrmModule:Contact';
54
+ OrderBuilderUpdateContactDto.STEP_SCHEMA_ID = '33643a0d-5b77-4895-a2da-991e0fd3432f';
55
+ OrderBuilderUpdateContactDto.STEP_SCHEMA_ACTION_ID = '4466e908-e22c-4980-8523-9a18492ab692';
56
+ OrderBuilderUpdateContactDto.AUTO_LINK_PARENT = false;
@@ -22,7 +22,7 @@ export interface UpdateOutboundDialCampaignCaseMessage extends OdinRecordUpdated
22
22
  * Properties for UpdateOutboundDialCampaignCase action
23
23
  *
24
24
  * @property Required fields: 0
25
- * @property Optional fields: 7
25
+ * @property Optional fields: 9
26
26
  */
27
27
  export interface UpdateOutboundDialCampaignCaseProperties {
28
28
  /**
@@ -74,6 +74,20 @@ export interface UpdateOutboundDialCampaignCaseProperties {
74
74
  * @type {TEXT}
75
75
  */
76
76
  LastDialOutcome?: string | null;
77
+ /**
78
+ * AgentOutcome
79
+ *
80
+ * The call outcome the agent saved, e.g. "RET - Re-Contracted - Free MESH" (CASES-1993). Reporting only: LastDialOutcome is what drives retries.
81
+ * @type {TEXT}
82
+ */
83
+ AgentOutcome?: string | null;
84
+ /**
85
+ * SkipReason
86
+ *
87
+ * Why the agent skipped this case before dialling: ALREADY_RECONTRACTED, OTS_OTHER_PROCESS, PENDING_CANCELLATION, or "OTHER: <note>" (CASES-1993).
88
+ * @type {TEXT}
89
+ */
90
+ SkipReason?: string | null;
77
91
  }
78
92
  /**
79
93
  * UpdateOutboundDialCampaignCase
@@ -22,7 +22,7 @@ export interface UpdateOutboundDialCampaignCaseOnDialEndMessage extends OdinReco
22
22
  * Properties for UpdateOutboundDialCampaignCaseOnDialEnd action
23
23
  *
24
24
  * @property Required fields: 1
25
- * @property Optional fields: 5
25
+ * @property Optional fields: 7
26
26
  */
27
27
  export interface UpdateOutboundDialCampaignCaseOnDialEndProperties {
28
28
  /**
@@ -68,6 +68,20 @@ export interface UpdateOutboundDialCampaignCaseOnDialEndProperties {
68
68
  * @type {TEXT}
69
69
  */
70
70
  LastDialOutcome?: string | null;
71
+ /**
72
+ * AgentOutcome
73
+ *
74
+ * The call outcome the agent saved, e.g. "RET - Re-Contracted - Free MESH" (CASES-1993). Reporting only: LastDialOutcome is what drives retries.
75
+ * @type {TEXT}
76
+ */
77
+ AgentOutcome?: string | null;
78
+ /**
79
+ * SkipReason
80
+ *
81
+ * Why the agent skipped this case before dialling: ALREADY_RECONTRACTED, OTS_OTHER_PROCESS, PENDING_CANCELLATION, or "OTHER: <note>" (CASES-1993).
82
+ * @type {TEXT}
83
+ */
84
+ SkipReason?: string | null;
71
85
  }
72
86
  /**
73
87
  * UpdateOutboundDialCampaignCaseOnDialEnd
@@ -22,7 +22,7 @@ export interface UpdateoutbounddialcampaignMessage extends OdinRecordUpdatedEven
22
22
  * Properties for Updateoutbounddialcampaign action
23
23
  *
24
24
  * @property Required fields: 0
25
- * @property Optional fields: 8
25
+ * @property Optional fields: 9
26
26
  */
27
27
  export interface UpdateoutbounddialcampaignProperties {
28
28
  /**
@@ -81,6 +81,13 @@ export interface UpdateoutbounddialcampaignProperties {
81
81
  * @type {TEXT}
82
82
  */
83
83
  DistributionMode?: string | null;
84
+ /**
85
+ * RetentionCampaign
86
+ *
87
+ * When true, agents on this campaign record the retention RET outcomes and give a reason when they skip a case (CASES-1993). Empty means false.
88
+ * @type {BOOLEAN}
89
+ */
90
+ RetentionCampaign?: boolean | null;
84
91
  }
85
92
  /**
86
93
  * Updateoutbounddialcampaign
@@ -0,0 +1,48 @@
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 { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
5
+ import { QaBatchProperties } from '../entities-v2/QaBatch';
6
+ /**
7
+ * @deprecated Use OdinApiClient.
8
+ *
9
+ * Migration:
10
+ * - Old: new QaBatchApi(authParams).get(id)
11
+ * - New: new odin.qabatch.get(id)
12
+ *
13
+ * The new OdinApiClient returns typed record wrappers with action methods.
14
+ */
15
+ export declare class QaBatchApi extends ApiProvider {
16
+ protected readonly authToken?: string;
17
+ private readonly moduleName;
18
+ private readonly entityName;
19
+ private sourceRecord;
20
+ private _qareport?;
21
+ constructor(authParams?: OauthParams, authToken?: string);
22
+ get qareport(): ApiRecordLinkManager;
23
+ setRecord(sourceRecord: any): void;
24
+ schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
25
+ search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaBatchProperties>>>;
26
+ searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaBatchProperties>>>;
27
+ reIndex(body: {
28
+ id: string;
29
+ schemaId: string;
30
+ }[]): Promise<any>;
31
+ get(qaBatchId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaBatchProperties>>;
32
+ getMany(qaBatchIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaBatchProperties>[]>;
33
+ upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
34
+ upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
35
+ update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
36
+ updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
37
+ delete(qaBatchId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
38
+ deleteMany(qaBatchIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
39
+ restore(qaBatchIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
40
+ applyAction(dto: any): Promise<any[]>;
41
+ bulkApplyActions(dtos: any[]): Promise<any[]>;
42
+ getVersions(): Promise<{
43
+ [key: string]: Record<string, any>;
44
+ }>;
45
+ getRevisionTimeline(): Promise<{
46
+ [key: string]: Record<string, any>[];
47
+ }>;
48
+ }
@@ -0,0 +1,155 @@
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.QaBatchApi = void 0;
13
+ const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
14
+ const api_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/api.record.link.manager");
15
+ /**
16
+ * @deprecated Use OdinApiClient.
17
+ *
18
+ * Migration:
19
+ * - Old: new QaBatchApi(authParams).get(id)
20
+ * - New: new odin.qabatch.get(id)
21
+ *
22
+ * The new OdinApiClient returns typed record wrappers with action methods.
23
+ */
24
+ class QaBatchApi extends api_provider_1.ApiProvider {
25
+ constructor(authParams, authToken) {
26
+ super(authParams, authToken);
27
+ this.authToken = authToken;
28
+ this.moduleName = 'SupportModule';
29
+ this.entityName = 'QaBatch';
30
+ // Link managers are lazy-loaded on first access
31
+ }
32
+ // ============================================
33
+ // LAZY-LOADED LINK MANAGERS (Public Getters)
34
+ // ============================================
35
+ // Usage remains identical: api.address.list(recordId)
36
+ get qareport() {
37
+ if (!this._qareport) {
38
+ this._qareport = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaBatch', 'SupportModule:QaReport', 'QaBatch__Report');
39
+ }
40
+ return this._qareport;
41
+ }
42
+ // ============================================
43
+ // STANDARD METHODS (Unchanged API)
44
+ // ============================================
45
+ setRecord(sourceRecord) {
46
+ this.sourceRecord = sourceRecord;
47
+ }
48
+ schema() {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ return yield this.getSchema(this.moduleName, this.entityName);
51
+ });
52
+ }
53
+ // Use this function when you want to search and handle all pagination on your own
54
+ search(params) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ return yield this._searchRecords(this.moduleName, this.entityName, params);
57
+ });
58
+ }
59
+ // Use this function when you want paginating through the results to be handled
60
+ searchAndPaginate(params) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
63
+ });
64
+ }
65
+ // Use this function to re-index records in elastic search
66
+ reIndex(body) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return yield this._reIndexRecords(body);
69
+ });
70
+ }
71
+ // Use this function when you want to return a single record
72
+ get(qaBatchId) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaBatchId);
75
+ if (res)
76
+ this.setRecord(res);
77
+ return res;
78
+ });
79
+ }
80
+ // Use this function when you want to return many records by primaryKeys
81
+ getMany(qaBatchIds) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaBatchIds);
84
+ });
85
+ }
86
+ // Use this function when you want to upsert one record
87
+ upsert(upsertDto) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
90
+ return res[0];
91
+ });
92
+ }
93
+ // Use this function when you want to upsert many records
94
+ upsertMany(upsertDtos) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
97
+ });
98
+ }
99
+ // Use this function when you want to update one record
100
+ update(updateDto) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
103
+ return res[0];
104
+ });
105
+ }
106
+ // Use this function when you want to update many records
107
+ updateMany(updateDtos) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ return yield this._update(this.moduleName, this.entityName, updateDtos);
110
+ });
111
+ }
112
+ // Use this function when you want to delete one record
113
+ delete(qaBatchId) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ return yield this._delete(this.moduleName, this.entityName, [qaBatchId]);
116
+ });
117
+ }
118
+ // Use this function when you want to delete many records
119
+ deleteMany(qaBatchIds) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ return yield this._delete(this.moduleName, this.entityName, qaBatchIds);
122
+ });
123
+ }
124
+ // Use this function when you want to restore one or many records
125
+ restore(qaBatchIds) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ return yield this._restore(this.moduleName, this.entityName, qaBatchIds);
128
+ });
129
+ }
130
+ // Use this function when you want to apply a single action
131
+ applyAction(dto) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ return yield this._applyAction(this.moduleName, this.entityName, dto);
134
+ });
135
+ }
136
+ // Use this function when you want to bulk apply actions
137
+ bulkApplyActions(dtos) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
140
+ });
141
+ }
142
+ // Use this function when you want to return the versions for a single record
143
+ getVersions() {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
146
+ });
147
+ }
148
+ // Use this function when you want to return the change history for a single record
149
+ getRevisionTimeline() {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
152
+ });
153
+ }
154
+ }
155
+ exports.QaBatchApi = QaBatchApi;
@@ -19,9 +19,11 @@ export declare class QaReportApi extends ApiProvider {
19
19
  private sourceRecord;
20
20
  private _case?;
21
21
  private _qareportamendment?;
22
+ private _qabatch?;
22
23
  constructor(authParams?: OauthParams, authToken?: string);
23
24
  get case(): ApiRecordLinkManager;
24
25
  get qareportamendment(): ApiRecordLinkManager;
26
+ get qabatch(): ApiRecordLinkManager;
25
27
  setRecord(sourceRecord: any): void;
26
28
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
27
29
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>>>;
@@ -45,6 +45,12 @@ class QaReportApi extends api_provider_1.ApiProvider {
45
45
  }
46
46
  return this._qareportamendment;
47
47
  }
48
+ get qabatch() {
49
+ if (!this._qabatch) {
50
+ this._qabatch = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaReport', 'SupportModule:QaBatch', 'QaBatch__Report');
51
+ }
52
+ return this._qabatch;
53
+ }
48
54
  // ============================================
49
55
  // STANDARD METHODS (Unchanged API)
50
56
  // ============================================
@@ -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 { QaBatchProperties } from '../entities-v2/QaBatch';
5
+ /**
6
+ * @deprecated Use OdinDbClient.
7
+ *
8
+ * Migration:
9
+ * - Old: new QaBatchApi(authParams).get(id)
10
+ * - New: new odin.qabatch.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 QaBatchDb(principal, dbService, { omitPermissionsCheck: true })
16
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
17
+ */
18
+ export declare class QaBatchDb 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 _qareport?;
25
+ constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
26
+ get qareport(): 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<QaBatchProperties>>>;
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<QaBatchProperties>>>;
40
+ /**
41
+ * Get a single record by primary key
42
+ * @param qaBatchId - 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(qaBatchId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaBatchProperties>>;
60
+ /**
61
+ * Get multiple records by primary keys
62
+ * @param qaBatchIds - Array of record IDs
63
+ * @param queryOptions - Query options (WHAT: entities to include)
64
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
65
+ */
66
+ getManyByPrimaryKey(qaBatchIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaBatchProperties>[]>;
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 qaBatchIds - Record IDs to delete
94
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
95
+ */
96
+ delete(qaBatchIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
97
+ /**
98
+ * Restore one or many deleted records
99
+ * @param qaBatchIds - Record IDs to restore
100
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
101
+ */
102
+ restore(qaBatchIds: 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
+ }