@d19n/youfibre-odin-sdk 2.0.342 → 2.0.344
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 +26 -2
- package/dist/EntityRegistry.d.ts +4 -0
- package/dist/EntityRegistry.js +4 -0
- package/dist/OdinApiClient.d.ts +8 -0
- package/dist/OdinApiClient.js +16 -0
- package/dist/OdinDbClient.d.ts +8 -0
- package/dist/OdinDbClient.js +16 -0
- package/dist/accessors-v2/DocumentAccessor.d.ts +112 -0
- package/dist/accessors-v2/DocumentAccessor.js +191 -0
- package/dist/accessors-v2/DocumentProcessingAccessor.d.ts +112 -0
- package/dist/accessors-v2/DocumentProcessingAccessor.js +191 -0
- package/dist/accessors-v2/index.d.ts +2 -0
- package/dist/accessors-v2/index.js +7 -3
- package/dist/actions-v2/CreateAiRouteRequestDto.d.ts +1 -1
- package/dist/actions-v2/CreateChurnRequestDto.d.ts +2 -0
- package/dist/actions-v2/CreateChurnRequestDto.js +2 -0
- package/dist/actions-v2/CreateDocumentDto.d.ts +235 -0
- package/dist/actions-v2/CreateDocumentDto.js +57 -0
- package/dist/actions-v2/CreateDocumentProcessingDto.d.ts +192 -0
- package/dist/actions-v2/CreateDocumentProcessingDto.js +57 -0
- package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +9 -17
- package/dist/actions-v2/UpdateDocumentDto.d.ts +236 -0
- package/dist/actions-v2/UpdateDocumentDto.js +59 -0
- package/dist/actions-v2/UpdateMessageReadByCustomerDto.d.ts +72 -0
- package/dist/actions-v2/UpdateMessageReadByCustomerDto.js +56 -0
- package/dist/api-sdk-v2/CommitmentApi.d.ts +48 -0
- package/dist/api-sdk-v2/CommitmentApi.js +155 -0
- package/dist/api-sdk-v2/ContractBuyOutApi.d.ts +2 -0
- package/dist/api-sdk-v2/ContractBuyOutApi.js +6 -0
- package/dist/api-sdk-v2/DocumentApi.d.ts +52 -0
- package/dist/api-sdk-v2/DocumentApi.js +167 -0
- package/dist/api-sdk-v2/DocumentProcessingApi.d.ts +50 -0
- package/dist/api-sdk-v2/DocumentProcessingApi.js +161 -0
- package/dist/api-sdk-v2/EquipmentReturnApi.d.ts +45 -0
- package/dist/api-sdk-v2/EquipmentReturnApi.js +151 -0
- package/dist/api-sdk-v2/EquipmentReturnItemApi.d.ts +45 -0
- package/dist/api-sdk-v2/EquipmentReturnItemApi.js +151 -0
- package/dist/api-sdk-v2/FileApi.d.ts +4 -0
- package/dist/api-sdk-v2/FileApi.js +12 -0
- package/dist/api-sdk-v2/OrderApi.d.ts +2 -0
- package/dist/api-sdk-v2/OrderApi.js +6 -0
- package/dist/db-accessors-v2/DocumentDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/DocumentDbAccessor.js +265 -0
- package/dist/db-accessors-v2/DocumentProcessingDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/DocumentProcessingDbAccessor.js +265 -0
- package/dist/db-accessors-v2/index.d.ts +2 -0
- package/dist/db-accessors-v2/index.js +7 -3
- package/dist/db-sdk-v2/CommitmentDb.d.ts +120 -0
- package/dist/db-sdk-v2/CommitmentDb.js +204 -0
- package/dist/db-sdk-v2/ContractBuyOutDb.d.ts +2 -0
- package/dist/db-sdk-v2/ContractBuyOutDb.js +6 -0
- package/dist/db-sdk-v2/DocumentDb.d.ts +124 -0
- package/dist/db-sdk-v2/DocumentDb.js +216 -0
- package/dist/db-sdk-v2/DocumentProcessingDb.d.ts +122 -0
- package/dist/db-sdk-v2/DocumentProcessingDb.js +210 -0
- package/dist/db-sdk-v2/EquipmentReturnDb.d.ts +117 -0
- package/dist/db-sdk-v2/EquipmentReturnDb.js +200 -0
- package/dist/db-sdk-v2/EquipmentReturnItemDb.d.ts +117 -0
- package/dist/db-sdk-v2/EquipmentReturnItemDb.js +200 -0
- package/dist/db-sdk-v2/FileDb.d.ts +4 -0
- package/dist/db-sdk-v2/FileDb.js +12 -0
- package/dist/db-sdk-v2/OrderDb.d.ts +2 -0
- package/dist/db-sdk-v2/OrderDb.js +6 -0
- package/dist/entities-v2/AiRouteRequest.d.ts +23 -11
- package/dist/entities-v2/AiRouteRequest.js +15 -3
- package/dist/entities-v2/Commitment.d.ts +154 -0
- package/dist/entities-v2/Commitment.js +115 -0
- package/dist/entities-v2/ContractBuyOut.d.ts +7 -0
- package/dist/entities-v2/ContractBuyOut.js +5 -1
- package/dist/entities-v2/Document.d.ts +1145 -0
- package/dist/entities-v2/Document.js +220 -0
- package/dist/entities-v2/DocumentProcessing.d.ts +272 -0
- package/dist/entities-v2/DocumentProcessing.js +156 -0
- package/dist/entities-v2/EquipmentReturn.d.ts +66 -0
- package/dist/entities-v2/EquipmentReturn.js +64 -0
- package/dist/entities-v2/EquipmentReturnItem.d.ts +66 -0
- package/dist/entities-v2/EquipmentReturnItem.js +64 -0
- package/dist/entities-v2/File.d.ts +81 -1
- package/dist/entities-v2/File.js +9 -1
- package/dist/entities-v2/Message.d.ts +27 -1
- package/dist/entities-v2/Message.js +2 -0
- package/dist/entities-v2/Order.d.ts +49 -8
- package/dist/entities-v2/Order.js +24 -4
- package/dist/entities-v2/YfStockCount.d.ts +197 -1
- package/dist/entities-v2/YfStockCount.js +28 -0
- package/dist/records-v2/ContractBuyOutRecord.d.ts +20 -0
- package/dist/records-v2/ContractBuyOutRecord.js +33 -0
- package/dist/records-v2/DocumentProcessingRecord.d.ts +227 -0
- package/dist/records-v2/DocumentProcessingRecord.js +315 -0
- package/dist/records-v2/DocumentRecord.d.ts +355 -0
- package/dist/records-v2/DocumentRecord.js +468 -0
- package/dist/records-v2/FileRecord.d.ts +59 -3
- package/dist/records-v2/FileRecord.js +83 -1
- package/dist/records-v2/MessageRecord.d.ts +28 -0
- package/dist/records-v2/MessageRecord.js +37 -0
- package/dist/records-v2/index.d.ts +2 -0
- package/dist/records-v2/index.js +10 -4
- package/package.json +1 -1
|
@@ -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.DocumentProcessingApi = 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 DocumentProcessingApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.documentprocessing.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class DocumentProcessingApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'AiModule';
|
|
29
|
+
this.entityName = 'DocumentProcessing';
|
|
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 document() {
|
|
37
|
+
if (!this._document) {
|
|
38
|
+
this._document = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'AiModule:DocumentProcessing', 'AiModule:Document', 'Document__DocumentProcessing');
|
|
39
|
+
}
|
|
40
|
+
return this._document;
|
|
41
|
+
}
|
|
42
|
+
get file() {
|
|
43
|
+
if (!this._file) {
|
|
44
|
+
this._file = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'AiModule:DocumentProcessing', 'SchemaModule:File', 'DocumentProcessing__File');
|
|
45
|
+
}
|
|
46
|
+
return this._file;
|
|
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(documentProcessingId) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, documentProcessingId);
|
|
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(documentProcessingIds) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, documentProcessingIds);
|
|
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(documentProcessingId) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, [documentProcessingId]);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to delete many records
|
|
125
|
+
deleteMany(documentProcessingIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._delete(this.moduleName, this.entityName, documentProcessingIds);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Use this function when you want to restore one or many records
|
|
131
|
+
restore(documentProcessingIds) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return yield this._restore(this.moduleName, this.entityName, documentProcessingIds);
|
|
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.DocumentProcessingApi = DocumentProcessingApi;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { EquipmentReturnProperties } from '../entities-v2/EquipmentReturn';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinApiClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new EquipmentReturnApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.equipmentreturn.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare class EquipmentReturnApi extends ApiProvider {
|
|
15
|
+
protected readonly authToken?: string;
|
|
16
|
+
private readonly moduleName;
|
|
17
|
+
private readonly entityName;
|
|
18
|
+
private sourceRecord;
|
|
19
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
20
|
+
setRecord(sourceRecord: any): void;
|
|
21
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
22
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnProperties>>>;
|
|
23
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnProperties>>>;
|
|
24
|
+
reIndex(body: {
|
|
25
|
+
id: string;
|
|
26
|
+
schemaId: string;
|
|
27
|
+
}[]): Promise<any>;
|
|
28
|
+
get(equipmentReturnId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnProperties>>;
|
|
29
|
+
getMany(equipmentReturnIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnProperties>[]>;
|
|
30
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
31
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
32
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
33
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
34
|
+
delete(equipmentReturnId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
35
|
+
deleteMany(equipmentReturnIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
36
|
+
restore(equipmentReturnIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
37
|
+
applyAction(dto: any): Promise<any[]>;
|
|
38
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
39
|
+
getVersions(): Promise<{
|
|
40
|
+
[key: string]: Record<string, any>;
|
|
41
|
+
}>;
|
|
42
|
+
getRevisionTimeline(): Promise<{
|
|
43
|
+
[key: string]: Record<string, any>[];
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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.EquipmentReturnApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use OdinApiClient.
|
|
16
|
+
*
|
|
17
|
+
* Migration:
|
|
18
|
+
* - Old: new EquipmentReturnApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.equipmentreturn.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
22
|
+
*/
|
|
23
|
+
class EquipmentReturnApi extends api_provider_1.ApiProvider {
|
|
24
|
+
// ============================================
|
|
25
|
+
// PRIVATE BACKING FIELDS (Lazy Loading)
|
|
26
|
+
// ============================================
|
|
27
|
+
constructor(authParams, authToken) {
|
|
28
|
+
super(authParams, authToken);
|
|
29
|
+
this.authToken = authToken;
|
|
30
|
+
this.moduleName = 'FieldServiceModule';
|
|
31
|
+
this.entityName = 'EquipmentReturn';
|
|
32
|
+
// Link managers are lazy-loaded on first access
|
|
33
|
+
}
|
|
34
|
+
// ============================================
|
|
35
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
36
|
+
// ============================================
|
|
37
|
+
// Usage remains identical: api.address.list(recordId)
|
|
38
|
+
// ============================================
|
|
39
|
+
// STANDARD METHODS (Unchanged API)
|
|
40
|
+
// ============================================
|
|
41
|
+
setRecord(sourceRecord) {
|
|
42
|
+
this.sourceRecord = sourceRecord;
|
|
43
|
+
}
|
|
44
|
+
schema() {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
50
|
+
search(params) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want paginating through the results to be handled
|
|
56
|
+
searchAndPaginate(params) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function to re-index records in elastic search
|
|
62
|
+
reIndex(body) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
return yield this._reIndexRecords(body);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Use this function when you want to return a single record
|
|
68
|
+
get(equipmentReturnId) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, equipmentReturnId);
|
|
71
|
+
if (res)
|
|
72
|
+
this.setRecord(res);
|
|
73
|
+
return res;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Use this function when you want to return many records by primaryKeys
|
|
77
|
+
getMany(equipmentReturnIds) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, equipmentReturnIds);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// Use this function when you want to upsert one record
|
|
83
|
+
upsert(upsertDto) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
86
|
+
return res[0];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Use this function when you want to upsert many records
|
|
90
|
+
upsertMany(upsertDtos) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// Use this function when you want to update one record
|
|
96
|
+
update(updateDto) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
99
|
+
return res[0];
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Use this function when you want to update many records
|
|
103
|
+
updateMany(updateDtos) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
// Use this function when you want to delete one record
|
|
109
|
+
delete(equipmentReturnId) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._delete(this.moduleName, this.entityName, [equipmentReturnId]);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to delete many records
|
|
115
|
+
deleteMany(equipmentReturnIds) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._delete(this.moduleName, this.entityName, equipmentReturnIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to restore one or many records
|
|
121
|
+
restore(equipmentReturnIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._restore(this.moduleName, this.entityName, equipmentReturnIds);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// Use this function when you want to apply a single action
|
|
127
|
+
applyAction(dto) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
// Use this function when you want to bulk apply actions
|
|
133
|
+
bulkApplyActions(dtos) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Use this function when you want to return the versions for a single record
|
|
139
|
+
getVersions() {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Use this function when you want to return the change history for a single record
|
|
145
|
+
getRevisionTimeline() {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.EquipmentReturnApi = EquipmentReturnApi;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { EquipmentReturnItemProperties } from '../entities-v2/EquipmentReturnItem';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinApiClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new EquipmentReturnItemApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.equipmentreturnitem.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare class EquipmentReturnItemApi extends ApiProvider {
|
|
15
|
+
protected readonly authToken?: string;
|
|
16
|
+
private readonly moduleName;
|
|
17
|
+
private readonly entityName;
|
|
18
|
+
private sourceRecord;
|
|
19
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
20
|
+
setRecord(sourceRecord: any): void;
|
|
21
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
22
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnItemProperties>>>;
|
|
23
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnItemProperties>>>;
|
|
24
|
+
reIndex(body: {
|
|
25
|
+
id: string;
|
|
26
|
+
schemaId: string;
|
|
27
|
+
}[]): Promise<any>;
|
|
28
|
+
get(equipmentReturnItemId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnItemProperties>>;
|
|
29
|
+
getMany(equipmentReturnItemIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<EquipmentReturnItemProperties>[]>;
|
|
30
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
31
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
32
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
33
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
34
|
+
delete(equipmentReturnItemId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
35
|
+
deleteMany(equipmentReturnItemIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
36
|
+
restore(equipmentReturnItemIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
37
|
+
applyAction(dto: any): Promise<any[]>;
|
|
38
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
39
|
+
getVersions(): Promise<{
|
|
40
|
+
[key: string]: Record<string, any>;
|
|
41
|
+
}>;
|
|
42
|
+
getRevisionTimeline(): Promise<{
|
|
43
|
+
[key: string]: Record<string, any>[];
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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.EquipmentReturnItemApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use OdinApiClient.
|
|
16
|
+
*
|
|
17
|
+
* Migration:
|
|
18
|
+
* - Old: new EquipmentReturnItemApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.equipmentreturnitem.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
22
|
+
*/
|
|
23
|
+
class EquipmentReturnItemApi extends api_provider_1.ApiProvider {
|
|
24
|
+
// ============================================
|
|
25
|
+
// PRIVATE BACKING FIELDS (Lazy Loading)
|
|
26
|
+
// ============================================
|
|
27
|
+
constructor(authParams, authToken) {
|
|
28
|
+
super(authParams, authToken);
|
|
29
|
+
this.authToken = authToken;
|
|
30
|
+
this.moduleName = 'FieldServiceModule';
|
|
31
|
+
this.entityName = 'EquipmentReturnItem';
|
|
32
|
+
// Link managers are lazy-loaded on first access
|
|
33
|
+
}
|
|
34
|
+
// ============================================
|
|
35
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
36
|
+
// ============================================
|
|
37
|
+
// Usage remains identical: api.address.list(recordId)
|
|
38
|
+
// ============================================
|
|
39
|
+
// STANDARD METHODS (Unchanged API)
|
|
40
|
+
// ============================================
|
|
41
|
+
setRecord(sourceRecord) {
|
|
42
|
+
this.sourceRecord = sourceRecord;
|
|
43
|
+
}
|
|
44
|
+
schema() {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
50
|
+
search(params) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want paginating through the results to be handled
|
|
56
|
+
searchAndPaginate(params) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function to re-index records in elastic search
|
|
62
|
+
reIndex(body) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
return yield this._reIndexRecords(body);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Use this function when you want to return a single record
|
|
68
|
+
get(equipmentReturnItemId) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, equipmentReturnItemId);
|
|
71
|
+
if (res)
|
|
72
|
+
this.setRecord(res);
|
|
73
|
+
return res;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Use this function when you want to return many records by primaryKeys
|
|
77
|
+
getMany(equipmentReturnItemIds) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, equipmentReturnItemIds);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// Use this function when you want to upsert one record
|
|
83
|
+
upsert(upsertDto) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
86
|
+
return res[0];
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Use this function when you want to upsert many records
|
|
90
|
+
upsertMany(upsertDtos) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// Use this function when you want to update one record
|
|
96
|
+
update(updateDto) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
99
|
+
return res[0];
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Use this function when you want to update many records
|
|
103
|
+
updateMany(updateDtos) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
// Use this function when you want to delete one record
|
|
109
|
+
delete(equipmentReturnItemId) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._delete(this.moduleName, this.entityName, [equipmentReturnItemId]);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to delete many records
|
|
115
|
+
deleteMany(equipmentReturnItemIds) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._delete(this.moduleName, this.entityName, equipmentReturnItemIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to restore one or many records
|
|
121
|
+
restore(equipmentReturnItemIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._restore(this.moduleName, this.entityName, equipmentReturnItemIds);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// Use this function when you want to apply a single action
|
|
127
|
+
applyAction(dto) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
// Use this function when you want to bulk apply actions
|
|
133
|
+
bulkApplyActions(dtos) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// Use this function when you want to return the versions for a single record
|
|
139
|
+
getVersions() {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Use this function when you want to return the change history for a single record
|
|
145
|
+
getRevisionTimeline() {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.EquipmentReturnItemApi = EquipmentReturnItemApi;
|
|
@@ -81,6 +81,8 @@ export declare class FileApi extends ApiProvider {
|
|
|
81
81
|
private _pgdirectdebitfile?;
|
|
82
82
|
private _yfwifisurvey?;
|
|
83
83
|
private _yffieldvisitoutcomeform?;
|
|
84
|
+
private _document?;
|
|
85
|
+
private _documentprocessing?;
|
|
84
86
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
85
87
|
get servicevisitaudit(): ApiRecordLinkManager;
|
|
86
88
|
get blockagea55(): ApiRecordLinkManager;
|
|
@@ -146,6 +148,8 @@ export declare class FileApi extends ApiProvider {
|
|
|
146
148
|
get pgdirectdebitfile(): ApiRecordLinkManager;
|
|
147
149
|
get yfwifisurvey(): ApiRecordLinkManager;
|
|
148
150
|
get yffieldvisitoutcomeform(): ApiRecordLinkManager;
|
|
151
|
+
get document(): ApiRecordLinkManager;
|
|
152
|
+
get documentprocessing(): ApiRecordLinkManager;
|
|
149
153
|
setRecord(sourceRecord: any): void;
|
|
150
154
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
151
155
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<FileProperties>>>;
|
|
@@ -417,6 +417,18 @@ class FileApi extends api_provider_1.ApiProvider {
|
|
|
417
417
|
}
|
|
418
418
|
return this._yffieldvisitoutcomeform;
|
|
419
419
|
}
|
|
420
|
+
get document() {
|
|
421
|
+
if (!this._document) {
|
|
422
|
+
this._document = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SchemaModule:File', 'AiModule:Document', 'Document__File');
|
|
423
|
+
}
|
|
424
|
+
return this._document;
|
|
425
|
+
}
|
|
426
|
+
get documentprocessing() {
|
|
427
|
+
if (!this._documentprocessing) {
|
|
428
|
+
this._documentprocessing = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SchemaModule:File', 'AiModule:DocumentProcessing', 'DocumentProcessing__File');
|
|
429
|
+
}
|
|
430
|
+
return this._documentprocessing;
|
|
431
|
+
}
|
|
420
432
|
// ============================================
|
|
421
433
|
// STANDARD METHODS (Unchanged API)
|
|
422
434
|
// ============================================
|
|
@@ -59,6 +59,7 @@ export declare class OrderApi extends ApiProvider {
|
|
|
59
59
|
private _dataissue?;
|
|
60
60
|
private _workorder?;
|
|
61
61
|
private _email?;
|
|
62
|
+
private _commitment?;
|
|
62
63
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
63
64
|
get note(): ApiRecordLinkManager;
|
|
64
65
|
get lead(): ApiRecordLinkManager;
|
|
@@ -102,6 +103,7 @@ export declare class OrderApi extends ApiProvider {
|
|
|
102
103
|
get dataissue(): ApiRecordLinkManager;
|
|
103
104
|
get workorder(): ApiRecordLinkManager;
|
|
104
105
|
get email(): ApiRecordLinkManager;
|
|
106
|
+
get commitment(): ApiRecordLinkManager;
|
|
105
107
|
setRecord(sourceRecord: any): void;
|
|
106
108
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
107
109
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<OrderProperties>>>;
|
|
@@ -285,6 +285,12 @@ class OrderApi extends api_provider_1.ApiProvider {
|
|
|
285
285
|
}
|
|
286
286
|
return this._email;
|
|
287
287
|
}
|
|
288
|
+
get commitment() {
|
|
289
|
+
if (!this._commitment) {
|
|
290
|
+
this._commitment = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'OrderModule:Order', 'OrderModule:Commitment', 'Commitment__Order');
|
|
291
|
+
}
|
|
292
|
+
return this._commitment;
|
|
293
|
+
}
|
|
288
294
|
// ============================================
|
|
289
295
|
// STANDARD METHODS (Unchanged API)
|
|
290
296
|
// ============================================
|