@d19n/youfibre-odin-sdk 2.0.335 → 2.0.337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -2
- package/dist/EntityRegistry.d.ts +8 -0
- package/dist/EntityRegistry.js +8 -0
- package/dist/OdinApiClient.d.ts +16 -0
- package/dist/OdinApiClient.js +32 -0
- package/dist/OdinDbClient.d.ts +16 -0
- package/dist/OdinDbClient.js +32 -0
- package/dist/accessors-v2/QaAutoFailAccessor.d.ts +112 -0
- package/dist/accessors-v2/QaAutoFailAccessor.js +191 -0
- package/dist/accessors-v2/QaRubricAccessor.d.ts +112 -0
- package/dist/accessors-v2/QaRubricAccessor.js +191 -0
- package/dist/accessors-v2/QaRubricItemAccessor.d.ts +112 -0
- package/dist/accessors-v2/QaRubricItemAccessor.js +191 -0
- package/dist/accessors-v2/QaRubricSectionAccessor.d.ts +112 -0
- package/dist/accessors-v2/QaRubricSectionAccessor.js +191 -0
- package/dist/accessors-v2/index.d.ts +4 -0
- package/dist/accessors-v2/index.js +10 -2
- package/dist/actions-v2/CreateContactSalesAppDto.d.ts +2 -25
- package/dist/actions-v2/CreateInstallDayBeforeWifiEducationDto.d.ts +63 -0
- package/dist/actions-v2/CreateInstallDayBeforeWifiEducationDto.js +59 -0
- package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +10 -2
- package/dist/actions-v2/CreateTransactionalEmailDto.d.ts +8 -1
- package/dist/actions-v2/UpdateQaAutoFailDto.d.ts +102 -0
- package/dist/actions-v2/UpdateQaAutoFailDto.js +56 -0
- package/dist/actions-v2/UpdateQaRubricDto.d.ts +103 -0
- package/dist/actions-v2/UpdateQaRubricDto.js +56 -0
- package/dist/actions-v2/UpdateQaRubricItemDto.d.ts +157 -0
- package/dist/actions-v2/UpdateQaRubricItemDto.js +56 -0
- package/dist/actions-v2/UpdateQaRubricSectionDto.d.ts +87 -0
- package/dist/actions-v2/UpdateQaRubricSectionDto.js +56 -0
- package/dist/api-sdk-v2/QaAutoFailApi.d.ts +48 -0
- package/dist/api-sdk-v2/QaAutoFailApi.js +155 -0
- package/dist/api-sdk-v2/QaRubricApi.d.ts +50 -0
- package/dist/api-sdk-v2/QaRubricApi.js +161 -0
- package/dist/api-sdk-v2/QaRubricItemApi.d.ts +48 -0
- package/dist/api-sdk-v2/QaRubricItemApi.js +155 -0
- package/dist/api-sdk-v2/QaRubricSectionApi.d.ts +50 -0
- package/dist/api-sdk-v2/QaRubricSectionApi.js +161 -0
- package/dist/db-accessors-v2/QaAutoFailDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/QaAutoFailDbAccessor.js +265 -0
- package/dist/db-accessors-v2/QaRubricDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/QaRubricDbAccessor.js +265 -0
- package/dist/db-accessors-v2/QaRubricItemDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/QaRubricItemDbAccessor.js +265 -0
- package/dist/db-accessors-v2/QaRubricSectionDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/QaRubricSectionDbAccessor.js +265 -0
- package/dist/db-accessors-v2/index.d.ts +4 -0
- package/dist/db-accessors-v2/index.js +10 -2
- package/dist/db-sdk-v2/QaAutoFailDb.d.ts +120 -0
- package/dist/db-sdk-v2/QaAutoFailDb.js +204 -0
- package/dist/db-sdk-v2/QaRubricDb.d.ts +122 -0
- package/dist/db-sdk-v2/QaRubricDb.js +210 -0
- package/dist/db-sdk-v2/QaRubricItemDb.d.ts +120 -0
- package/dist/db-sdk-v2/QaRubricItemDb.js +204 -0
- package/dist/db-sdk-v2/QaRubricSectionDb.d.ts +122 -0
- package/dist/db-sdk-v2/QaRubricSectionDb.js +210 -0
- package/dist/entities-v2/QaAutoFail.d.ts +117 -0
- package/dist/entities-v2/QaAutoFail.js +76 -0
- package/dist/entities-v2/QaReport.d.ts +41 -1
- package/dist/entities-v2/QaReport.js +10 -0
- package/dist/entities-v2/QaRubric.d.ts +152 -0
- package/dist/entities-v2/QaRubric.js +114 -0
- package/dist/entities-v2/QaRubricItem.d.ts +199 -0
- package/dist/entities-v2/QaRubricItem.js +110 -0
- package/dist/entities-v2/QaRubricSection.d.ts +108 -0
- package/dist/entities-v2/QaRubricSection.js +76 -0
- package/dist/records-v2/EmailRecord.d.ts +29 -0
- package/dist/records-v2/EmailRecord.js +36 -0
- package/dist/records-v2/QaAutoFailRecord.d.ts +205 -0
- package/dist/records-v2/QaAutoFailRecord.js +275 -0
- package/dist/records-v2/QaRubricItemRecord.d.ts +205 -0
- package/dist/records-v2/QaRubricItemRecord.js +275 -0
- package/dist/records-v2/QaRubricRecord.d.ts +225 -0
- package/dist/records-v2/QaRubricRecord.js +308 -0
- package/dist/records-v2/QaRubricSectionRecord.d.ts +225 -0
- package/dist/records-v2/QaRubricSectionRecord.js +308 -0
- package/dist/records-v2/index.d.ts +4 -0
- package/dist/records-v2/index.js +13 -1
- package/package.json +1 -1
|
@@ -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 { QaAutoFailProperties } from '../entities-v2/QaAutoFail';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new QaAutoFailApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.qaautofail.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class QaAutoFailApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _qarubric?;
|
|
21
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
22
|
+
get qarubric(): 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<QaAutoFailProperties>>>;
|
|
26
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaAutoFailProperties>>>;
|
|
27
|
+
reIndex(body: {
|
|
28
|
+
id: string;
|
|
29
|
+
schemaId: string;
|
|
30
|
+
}[]): Promise<any>;
|
|
31
|
+
get(qaAutoFailId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaAutoFailProperties>>;
|
|
32
|
+
getMany(qaAutoFailIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaAutoFailProperties>[]>;
|
|
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(qaAutoFailId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
38
|
+
deleteMany(qaAutoFailIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
39
|
+
restore(qaAutoFailIds: 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.QaAutoFailApi = 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 QaAutoFailApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.qaautofail.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class QaAutoFailApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'QaAutoFail';
|
|
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 qarubric() {
|
|
37
|
+
if (!this._qarubric) {
|
|
38
|
+
this._qarubric = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaAutoFail', 'SupportModule:QaRubric', 'Rubric__AutoFail');
|
|
39
|
+
}
|
|
40
|
+
return this._qarubric;
|
|
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(qaAutoFailId) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaAutoFailId);
|
|
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(qaAutoFailIds) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaAutoFailIds);
|
|
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(qaAutoFailId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._delete(this.moduleName, this.entityName, [qaAutoFailId]);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete many records
|
|
119
|
+
deleteMany(qaAutoFailIds) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, qaAutoFailIds);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to restore one or many records
|
|
125
|
+
restore(qaAutoFailIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._restore(this.moduleName, this.entityName, qaAutoFailIds);
|
|
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.QaAutoFailApi = QaAutoFailApi;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { QaRubricProperties } from '../entities-v2/QaRubric';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new QaRubricApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.qarubric.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class QaRubricApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _qarubricsection?;
|
|
21
|
+
private _qaautofail?;
|
|
22
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
23
|
+
get qarubricsection(): ApiRecordLinkManager;
|
|
24
|
+
get qaautofail(): ApiRecordLinkManager;
|
|
25
|
+
setRecord(sourceRecord: any): void;
|
|
26
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
27
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricProperties>>>;
|
|
28
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricProperties>>>;
|
|
29
|
+
reIndex(body: {
|
|
30
|
+
id: string;
|
|
31
|
+
schemaId: string;
|
|
32
|
+
}[]): Promise<any>;
|
|
33
|
+
get(qaRubricId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricProperties>>;
|
|
34
|
+
getMany(qaRubricIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricProperties>[]>;
|
|
35
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
36
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
37
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
38
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
39
|
+
delete(qaRubricId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
40
|
+
deleteMany(qaRubricIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
41
|
+
restore(qaRubricIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
42
|
+
applyAction(dto: any): Promise<any[]>;
|
|
43
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
44
|
+
getVersions(): Promise<{
|
|
45
|
+
[key: string]: Record<string, any>;
|
|
46
|
+
}>;
|
|
47
|
+
getRevisionTimeline(): Promise<{
|
|
48
|
+
[key: string]: Record<string, any>[];
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
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.QaRubricApi = 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 QaRubricApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.qarubric.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class QaRubricApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'QaRubric';
|
|
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 qarubricsection() {
|
|
37
|
+
if (!this._qarubricsection) {
|
|
38
|
+
this._qarubricsection = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaRubric', 'SupportModule:QaRubricSection', 'Rubric__Section');
|
|
39
|
+
}
|
|
40
|
+
return this._qarubricsection;
|
|
41
|
+
}
|
|
42
|
+
get qaautofail() {
|
|
43
|
+
if (!this._qaautofail) {
|
|
44
|
+
this._qaautofail = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaRubric', 'SupportModule:QaAutoFail', 'Rubric__AutoFail');
|
|
45
|
+
}
|
|
46
|
+
return this._qaautofail;
|
|
47
|
+
}
|
|
48
|
+
// ============================================
|
|
49
|
+
// STANDARD METHODS (Unchanged API)
|
|
50
|
+
// ============================================
|
|
51
|
+
setRecord(sourceRecord) {
|
|
52
|
+
this.sourceRecord = sourceRecord;
|
|
53
|
+
}
|
|
54
|
+
schema() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
60
|
+
search(params) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Use this function when you want paginating through the results to be handled
|
|
66
|
+
searchAndPaginate(params) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Use this function to re-index records in elastic search
|
|
72
|
+
reIndex(body) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return yield this._reIndexRecords(body);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// Use this function when you want to return a single record
|
|
78
|
+
get(qaRubricId) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaRubricId);
|
|
81
|
+
if (res)
|
|
82
|
+
this.setRecord(res);
|
|
83
|
+
return res;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
// Use this function when you want to return many records by primaryKeys
|
|
87
|
+
getMany(qaRubricIds) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaRubricIds);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// Use this function when you want to upsert one record
|
|
93
|
+
upsert(upsertDto) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
96
|
+
return res[0];
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// Use this function when you want to upsert many records
|
|
100
|
+
upsertMany(upsertDtos) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// Use this function when you want to update one record
|
|
106
|
+
update(updateDto) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
109
|
+
return res[0];
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to update many records
|
|
113
|
+
updateMany(updateDtos) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete one record
|
|
119
|
+
delete(qaRubricId) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, [qaRubricId]);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to delete many records
|
|
125
|
+
deleteMany(qaRubricIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._delete(this.moduleName, this.entityName, qaRubricIds);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Use this function when you want to restore one or many records
|
|
131
|
+
restore(qaRubricIds) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return yield this._restore(this.moduleName, this.entityName, qaRubricIds);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Use this function when you want to apply a single action
|
|
137
|
+
applyAction(dto) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Use this function when you want to bulk apply actions
|
|
143
|
+
bulkApplyActions(dtos) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Use this function when you want to return the versions for a single record
|
|
149
|
+
getVersions() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// Use this function when you want to return the change history for a single record
|
|
155
|
+
getRevisionTimeline() {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.QaRubricApi = QaRubricApi;
|
|
@@ -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 { QaRubricItemProperties } from '../entities-v2/QaRubricItem';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new QaRubricItemApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.qarubricitem.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class QaRubricItemApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _qarubricsection?;
|
|
21
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
22
|
+
get qarubricsection(): 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<QaRubricItemProperties>>>;
|
|
26
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricItemProperties>>>;
|
|
27
|
+
reIndex(body: {
|
|
28
|
+
id: string;
|
|
29
|
+
schemaId: string;
|
|
30
|
+
}[]): Promise<any>;
|
|
31
|
+
get(qaRubricItemId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricItemProperties>>;
|
|
32
|
+
getMany(qaRubricItemIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaRubricItemProperties>[]>;
|
|
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(qaRubricItemId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
38
|
+
deleteMany(qaRubricItemIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
39
|
+
restore(qaRubricItemIds: 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.QaRubricItemApi = 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 QaRubricItemApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.qarubricitem.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class QaRubricItemApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'QaRubricItem';
|
|
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 qarubricsection() {
|
|
37
|
+
if (!this._qarubricsection) {
|
|
38
|
+
this._qarubricsection = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaRubricItem', 'SupportModule:QaRubricSection', 'Section__Item');
|
|
39
|
+
}
|
|
40
|
+
return this._qarubricsection;
|
|
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(qaRubricItemId) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaRubricItemId);
|
|
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(qaRubricItemIds) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaRubricItemIds);
|
|
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(qaRubricItemId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._delete(this.moduleName, this.entityName, [qaRubricItemId]);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete many records
|
|
119
|
+
deleteMany(qaRubricItemIds) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, qaRubricItemIds);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to restore one or many records
|
|
125
|
+
restore(qaRubricItemIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._restore(this.moduleName, this.entityName, qaRubricItemIds);
|
|
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.QaRubricItemApi = QaRubricItemApi;
|