@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,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.QaBatchDb = 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 QaBatchApi(authParams).get(id)
20
+ * - New: new odin.qabatch.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 QaBatchDb(principal, dbService, { omitPermissionsCheck: true })
26
+ * - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
27
+ */
28
+ class QaBatchDb extends db_provider_1.DbProvider {
29
+ constructor(principal, dbService, defaultOptions) {
30
+ super(principal, dbService, defaultOptions);
31
+ this.moduleName = 'SupportModule';
32
+ this.entityName = 'QaBatch';
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 qareport() {
42
+ if (!this._qareport) {
43
+ this._qareport = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:QaBatch', 'SupportModule:QaReport', 'QaBatch__Report');
44
+ }
45
+ return this._qareport;
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 qaBatchId - 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(qaBatchId, queryOptions, providerOptions) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaBatchId, queryOptions, providerOptions);
96
+ if (res)
97
+ this.setRecord(res);
98
+ return res;
99
+ });
100
+ }
101
+ /**
102
+ * Get multiple records by primary keys
103
+ * @param qaBatchIds - Array of record IDs
104
+ * @param queryOptions - Query options (WHAT: entities to include)
105
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
106
+ */
107
+ getManyByPrimaryKey(qaBatchIds, queryOptions, providerOptions) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaBatchIds, 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 qaBatchIds - Record IDs to delete
157
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
158
+ */
159
+ delete(qaBatchIds, providerOptions) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ return yield this._delete(this.moduleName, this.entityName, qaBatchIds, providerOptions);
162
+ });
163
+ }
164
+ /**
165
+ * Restore one or many deleted records
166
+ * @param qaBatchIds - Record IDs to restore
167
+ * @param providerOptions - Provider options (HOW: omitPermissionsCheck)
168
+ */
169
+ restore(qaBatchIds, providerOptions) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ return yield this._restore(this.moduleName, this.entityName, qaBatchIds, 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.QaBatchDb = QaBatchDb;
@@ -23,9 +23,11 @@ export declare class QaReportDb extends DbProvider {
23
23
  private sourceRecord;
24
24
  private _case?;
25
25
  private _qareportamendment?;
26
+ private _qabatch?;
26
27
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
27
28
  get case(): DbRecordLinkManager;
28
29
  get qareportamendment(): DbRecordLinkManager;
30
+ get qabatch(): DbRecordLinkManager;
29
31
  setRecord(sourceRecord: any): void;
30
32
  /**
31
33
  * Search records with manual pagination control
@@ -50,6 +50,12 @@ class QaReportDb extends db_provider_1.DbProvider {
50
50
  }
51
51
  return this._qareportamendment;
52
52
  }
53
+ get qabatch() {
54
+ if (!this._qabatch) {
55
+ this._qabatch = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:QaReport', 'SupportModule:QaBatch', 'QaBatch__Report');
56
+ }
57
+ return this._qabatch;
58
+ }
53
59
  // ============================================
54
60
  // STANDARD METHODS
55
61
  // ============================================
@@ -31,6 +31,7 @@ export declare enum AiRouteRequestEntityTypes {
31
31
  * - `CUSTOMER_CONTEXT_SUMMARY`
32
32
  * - `DOCUMENT_DESCRIBE`
33
33
  * - `EDGAR_CHAT`
34
+ * - `EMAIL_POLISH`
34
35
  * - `INSTALL_FORM_REVIEW`
35
36
  * - `MAGRATHEA_PORTING`
36
37
  * - `QA_REPORT`
@@ -43,6 +44,7 @@ export declare enum AiRouteRequestFeature {
43
44
  CUSTOMER_CONTEXT_SUMMARY = "CUSTOMER_CONTEXT_SUMMARY",
44
45
  DOCUMENT_DESCRIBE = "DOCUMENT_DESCRIBE",
45
46
  EDGAR_CHAT = "EDGAR_CHAT",
47
+ EMAIL_POLISH = "EMAIL_POLISH",
46
48
  INSTALL_FORM_REVIEW = "INSTALL_FORM_REVIEW",
47
49
  MAGRATHEA_PORTING = "MAGRATHEA_PORTING",
48
50
  QA_REPORT = "QA_REPORT"
@@ -35,6 +35,7 @@ var AiRouteRequestEntityTypes;
35
35
  * - `CUSTOMER_CONTEXT_SUMMARY`
36
36
  * - `DOCUMENT_DESCRIBE`
37
37
  * - `EDGAR_CHAT`
38
+ * - `EMAIL_POLISH`
38
39
  * - `INSTALL_FORM_REVIEW`
39
40
  * - `MAGRATHEA_PORTING`
40
41
  * - `QA_REPORT`
@@ -48,6 +49,7 @@ var AiRouteRequestFeature;
48
49
  AiRouteRequestFeature["CUSTOMER_CONTEXT_SUMMARY"] = "CUSTOMER_CONTEXT_SUMMARY";
49
50
  AiRouteRequestFeature["DOCUMENT_DESCRIBE"] = "DOCUMENT_DESCRIBE";
50
51
  AiRouteRequestFeature["EDGAR_CHAT"] = "EDGAR_CHAT";
52
+ AiRouteRequestFeature["EMAIL_POLISH"] = "EMAIL_POLISH";
51
53
  AiRouteRequestFeature["INSTALL_FORM_REVIEW"] = "INSTALL_FORM_REVIEW";
52
54
  AiRouteRequestFeature["MAGRATHEA_PORTING"] = "MAGRATHEA_PORTING";
53
55
  AiRouteRequestFeature["QA_REPORT"] = "QA_REPORT";