@d19n/youfibre-odin-sdk 1.0.124-beta.0 → 1.0.124-beta.2
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/dist/actions-v2/CompletePicRequestFlowDto.d.ts +1 -0
- package/dist/actions-v2/CompletePicRequestFlowDto.js +1 -0
- package/dist/actions-v2/CreateContactDto.d.ts +0 -9
- package/dist/actions-v2/CreateLeadFromAddressDto.d.ts +0 -9
- package/dist/api-sdk-v2/CustomerDeviceConfigurationApi.d.ts +38 -0
- package/dist/api-sdk-v2/CustomerDeviceConfigurationApi.js +127 -0
- package/dist/api-sdk-v2/UserApi.d.ts +1 -0
- package/dist/api-sdk-v2/UserApi.js +1 -0
- package/dist/db-sdk-v2/CustomerDeviceConfigurationDb.d.ts +28 -0
- package/dist/db-sdk-v2/CustomerDeviceConfigurationDb.js +110 -0
- package/dist/db-sdk-v2/UserDb.d.ts +1 -0
- package/dist/db-sdk-v2/UserDb.js +1 -0
- package/dist/entities-v2/CustomerDeviceConfiguration.d.ts +29 -0
- package/dist/entities-v2/CustomerDeviceConfiguration.js +23 -0
- package/dist/entities-v2/NotificationTemplate.d.ts +2 -0
- package/dist/entities-v2/NotificationTemplate.js +1 -0
- package/dist/entities-v2/User.d.ts +4 -0
- package/dist/entities-v2/User.js +3 -1
- package/dist/types-v1/Types.d.ts +37 -36
- package/dist/types-v1/Types.js +37 -36
- package/package.json +1 -1
- package/src/actions-v2/CompletePicRequestFlowDto.ts +1 -0
- package/src/actions-v2/CreateContactDto.ts +0 -9
- package/src/actions-v2/CreateLeadFromAddressDto.ts +0 -9
- package/src/api-sdk-v2/CustomerDeviceConfigurationApi.ts +140 -0
- package/src/api-sdk-v2/UserApi.ts +7 -0
- package/src/db-sdk-v2/CustomerDeviceConfigurationDb.ts +127 -0
- package/src/db-sdk-v2/UserDb.ts +8 -0
- package/src/entities-v2/CustomerDeviceConfiguration.ts +54 -0
- package/src/entities-v2/NotificationTemplate.ts +3 -0
- package/src/entities-v2/User.ts +4 -0
- package/src/types-v1/Types.ts +37 -36
|
@@ -18,6 +18,7 @@ export interface CompletePicRequestFlowMessage extends OdinRecordUpdatedEvent<Co
|
|
|
18
18
|
}
|
|
19
19
|
export declare class CompletePicRequestFlowDto extends OdinRecordUpdateDto {
|
|
20
20
|
readonly actionName: string;
|
|
21
|
+
readonly stageKey: string;
|
|
21
22
|
constructor(record: OdinRecord<any>);
|
|
22
23
|
static readonly stepClasses: readonly ["CompletePicRequestDto"];
|
|
23
24
|
steps: StepClassMap[(typeof CompletePicRequestFlowDto.stepClasses)[number]][];
|
|
@@ -13,6 +13,7 @@ class CompletePicRequestFlowDto extends odin_dtos_1.OdinRecordUpdateDto {
|
|
|
13
13
|
constructor(record) {
|
|
14
14
|
super(record, null);
|
|
15
15
|
this.actionName = 'CompletePicRequestFlow';
|
|
16
|
+
this.stageKey = 'PicRequestPipelineStageDone';
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
exports.CompletePicRequestFlowDto = CompletePicRequestFlowDto;
|
|
@@ -4,15 +4,6 @@ interface CreateContactProperties {
|
|
|
4
4
|
FirstName: string;
|
|
5
5
|
LastName: string;
|
|
6
6
|
EmailAddress: string;
|
|
7
|
-
Phone?: string;
|
|
8
|
-
ReferralEmail?: string;
|
|
9
|
-
DirectDebitConsent?: boolean;
|
|
10
|
-
MarketingConsent?: boolean;
|
|
11
|
-
TermsAndConditionsConsent?: boolean;
|
|
12
|
-
ReferralCode?: string;
|
|
13
|
-
CurrentContractType?: string;
|
|
14
|
-
HomeownerStatus?: string;
|
|
15
|
-
InitialSource?: string;
|
|
16
7
|
}
|
|
17
8
|
export declare class CreateContactDto extends OdinRecordCreateDto {
|
|
18
9
|
readonly actionName: string;
|
|
@@ -16,15 +16,6 @@ interface CreateContactProperties {
|
|
|
16
16
|
FirstName: string;
|
|
17
17
|
LastName: string;
|
|
18
18
|
EmailAddress: string;
|
|
19
|
-
Phone?: string;
|
|
20
|
-
ReferralEmail?: string;
|
|
21
|
-
DirectDebitConsent?: boolean;
|
|
22
|
-
MarketingConsent?: boolean;
|
|
23
|
-
TermsAndConditionsConsent?: boolean;
|
|
24
|
-
ReferralCode?: string;
|
|
25
|
-
CurrentContractType?: string;
|
|
26
|
-
HomeownerStatus?: string;
|
|
27
|
-
InitialSource?: string;
|
|
28
19
|
}
|
|
29
20
|
export declare class CreateContactDto extends OdinRecordCreateDto {
|
|
30
21
|
readonly actionName: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
5
|
+
import { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
|
|
6
|
+
import { CustomerDeviceConfigurationProperties } from '../entities-v2/CustomerDeviceConfiguration';
|
|
7
|
+
export declare class CustomerDeviceConfigurationApi extends ApiProvider {
|
|
8
|
+
protected readonly authToken?: string;
|
|
9
|
+
private readonly moduleName;
|
|
10
|
+
private readonly entityName;
|
|
11
|
+
private sourceRecord;
|
|
12
|
+
readonly user: ApiRecordLinkManager;
|
|
13
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
14
|
+
setRecord(sourceRecord: any): void;
|
|
15
|
+
schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
|
|
16
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>>>;
|
|
17
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>>>;
|
|
18
|
+
reIndex(body: {
|
|
19
|
+
id: string;
|
|
20
|
+
schemaId: string;
|
|
21
|
+
}[]): Promise<any>;
|
|
22
|
+
get(customerDeviceConfigurationId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>>;
|
|
23
|
+
getMany(customerDeviceConfigurationIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>[]>;
|
|
24
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
25
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
26
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
27
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
28
|
+
delete(customerDeviceConfigurationId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse>;
|
|
29
|
+
deleteMany(customerDeviceConfigurationIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse[]>;
|
|
30
|
+
restore(customerDeviceConfigurationIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRestoreResponse[]>;
|
|
31
|
+
applyAction(dto: any): Promise<any[]>;
|
|
32
|
+
getVersions(): Promise<{
|
|
33
|
+
[key: string]: Record<string, any>;
|
|
34
|
+
}>;
|
|
35
|
+
getRevisionTimeline(): Promise<{
|
|
36
|
+
[key: string]: Record<string, any>[];
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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.CustomerDeviceConfigurationApi = 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
|
+
class CustomerDeviceConfigurationApi extends api_provider_1.ApiProvider {
|
|
16
|
+
constructor(authParams, authToken) {
|
|
17
|
+
super(authParams, authToken);
|
|
18
|
+
this.authToken = authToken;
|
|
19
|
+
this.moduleName = 'NotificationModule';
|
|
20
|
+
this.entityName = 'CustomerDeviceConfiguration';
|
|
21
|
+
this.user = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'NotificationModule:CustomerDeviceConfiguration', 'IdentityModule:User', 'User__CustomerDeviceConfiguration');
|
|
22
|
+
}
|
|
23
|
+
setRecord(sourceRecord) {
|
|
24
|
+
this.sourceRecord = sourceRecord;
|
|
25
|
+
}
|
|
26
|
+
schema() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
32
|
+
search(params) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
// Use this function when you want paginating through the results to be handled
|
|
38
|
+
searchAndPaginate(params) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// Use this function to re-index records in elastic search
|
|
44
|
+
reIndex(body) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield this._reIndexRecords(body);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Use this function when you want to return a single record
|
|
50
|
+
get(customerDeviceConfigurationId) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, customerDeviceConfigurationId);
|
|
53
|
+
this.setRecord(res);
|
|
54
|
+
return res;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
// Use this function when you want to return many records by primaryKeys
|
|
58
|
+
getMany(customerDeviceConfigurationIds) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, customerDeviceConfigurationIds);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// Use this function when you want to upsert one record
|
|
64
|
+
upsert(upsertDto) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
67
|
+
return res[0];
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
// Use this function when you want to upsert many records
|
|
71
|
+
upsertMany(upsertDtos) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Use this function when you want to update one record
|
|
77
|
+
update(updateDto) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
80
|
+
return res[0];
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Use this function when you want to update many records
|
|
84
|
+
updateMany(updateDtos) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Use this function when you want to delete one record
|
|
90
|
+
delete(customerDeviceConfigurationId) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const res = yield this._delete(this.moduleName, this.entityName, [customerDeviceConfigurationId]);
|
|
93
|
+
return res[0];
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
// Use this function when you want to delete many records
|
|
97
|
+
deleteMany(customerDeviceConfigurationIds) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
return yield this._delete(this.moduleName, this.entityName, customerDeviceConfigurationIds);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Use this function when you want to restore one or many records
|
|
103
|
+
restore(customerDeviceConfigurationIds) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._restore(this.moduleName, this.entityName, customerDeviceConfigurationIds);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
// Use this function when you want to apply actions
|
|
109
|
+
applyAction(dto) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to return the versions for a single record
|
|
115
|
+
getVersions() {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to return the change history for a single record
|
|
121
|
+
getRevisionTimeline() {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.CustomerDeviceConfigurationApi = CustomerDeviceConfigurationApi;
|
|
@@ -30,6 +30,7 @@ export declare class UserApi extends ApiProvider {
|
|
|
30
30
|
readonly yfvanaudit: ApiRecordLinkManager;
|
|
31
31
|
readonly email: ApiRecordLinkManager;
|
|
32
32
|
readonly contractbuyout: ApiRecordLinkManager;
|
|
33
|
+
readonly customerdeviceconfiguration: ApiRecordLinkManager;
|
|
33
34
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
34
35
|
setRecord(sourceRecord: any): void;
|
|
35
36
|
schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
|
|
@@ -39,6 +39,7 @@ class UserApi extends api_provider_1.ApiProvider {
|
|
|
39
39
|
this.yfvanaudit = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'IdentityModule:User', 'FieldServiceModule:YfVanAudit', 'YfVanAudit_User');
|
|
40
40
|
this.email = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'IdentityModule:User', 'NotificationModule:Email', 'Email_User');
|
|
41
41
|
this.contractbuyout = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'IdentityModule:User', 'OrderModule:ContractBuyOut', 'ContractBuyOut__User');
|
|
42
|
+
this.customerdeviceconfiguration = new api_record_link_manager_1.ApiRecordLinkManager(authParams, 'IdentityModule:User', 'NotificationModule:CustomerDeviceConfiguration', 'User__CustomerDeviceConfiguration');
|
|
42
43
|
}
|
|
43
44
|
setRecord(sourceRecord) {
|
|
44
45
|
this.sourceRecord = sourceRecord;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DbProvider } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
2
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
3
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
4
|
+
import { DbRecordLinkManager } from '@d19n/odin-sdk-generator/dist/db.record.link.manager';
|
|
5
|
+
import { CustomerDeviceConfigurationProperties } from '../entities-v2/CustomerDeviceConfiguration';
|
|
6
|
+
export declare class CustomerDeviceConfigurationDb extends DbProvider {
|
|
7
|
+
protected readonly principal: any;
|
|
8
|
+
protected readonly dbService: any;
|
|
9
|
+
private readonly moduleName;
|
|
10
|
+
private readonly entityName;
|
|
11
|
+
private sourceRecord;
|
|
12
|
+
readonly user: DbRecordLinkManager;
|
|
13
|
+
constructor(principal: any, dbService: any);
|
|
14
|
+
setRecord(sourceRecord: any): void;
|
|
15
|
+
searchRecords(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-types/dist/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>>>;
|
|
16
|
+
searchAllRecordsAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-types/dist/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>>>;
|
|
17
|
+
getByPrimaryKey(customerDeviceConfigurationId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>>;
|
|
18
|
+
getManyByPrimaryKey(customerDeviceConfigurationIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CustomerDeviceConfigurationProperties>[]>;
|
|
19
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
20
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
21
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
22
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
23
|
+
delete(customerDeviceConfigurationIds: string[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").DbRecordDeleted[]>;
|
|
24
|
+
restore(customerDeviceConfigurationIds: string[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").DbRecordRestored[]>;
|
|
25
|
+
applyAction(actionName: string, dto: any): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
26
|
+
getVersions(): Promise<any>;
|
|
27
|
+
getRevisionTimeline(): Promise<any>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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.CustomerDeviceConfigurationDb = 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
|
+
class CustomerDeviceConfigurationDb extends db_provider_1.DbProvider {
|
|
16
|
+
constructor(principal, dbService) {
|
|
17
|
+
super(principal, dbService);
|
|
18
|
+
this.moduleName = 'NotificationModule';
|
|
19
|
+
this.entityName = 'CustomerDeviceConfiguration';
|
|
20
|
+
this.principal = principal;
|
|
21
|
+
this.dbService = dbService;
|
|
22
|
+
this.user = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'NotificationModule:CustomerDeviceConfiguration', 'IdentityModule:User', 'User__CustomerDeviceConfiguration');
|
|
23
|
+
}
|
|
24
|
+
setRecord(sourceRecord) {
|
|
25
|
+
this.sourceRecord = sourceRecord;
|
|
26
|
+
}
|
|
27
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
28
|
+
searchRecords(params) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// Use this function when you want paginating through the results to be handled
|
|
34
|
+
searchAllRecordsAndPaginate(params) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// Use this function when you want to return a single record
|
|
40
|
+
getByPrimaryKey(customerDeviceConfigurationId) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, customerDeviceConfigurationId);
|
|
43
|
+
this.setRecord(res);
|
|
44
|
+
return res;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// Use this function when you want to return many records by primaryKeys
|
|
48
|
+
getManyByPrimaryKey(customerDeviceConfigurationIds) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, customerDeviceConfigurationIds);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// Use this function when you want to upsert one record
|
|
54
|
+
upsert(upsertDto) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
57
|
+
return res[0];
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
// Use this function when you want to upsert many records
|
|
61
|
+
upsertMany(upsertDtos) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Use this function when you want to update one record
|
|
67
|
+
update(updateDto) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
70
|
+
return res[0];
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
// Use this function when you want to update many records
|
|
74
|
+
updateMany(updateDtos) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
// Use this function when you want to delete one or many records
|
|
80
|
+
delete(customerDeviceConfigurationIds) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
return yield this._delete(this.moduleName, this.entityName, customerDeviceConfigurationIds);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
// Use this function when you want to restore one or many records
|
|
86
|
+
restore(customerDeviceConfigurationIds) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return yield this._restore(this.moduleName, this.entityName, customerDeviceConfigurationIds);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// Use this function when you want to apply actions
|
|
92
|
+
applyAction(actionName, dto) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
// Use this function when you want to return the versions for a single record
|
|
98
|
+
getVersions() {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
// Use this function when you want to return the change history for a single record
|
|
104
|
+
getRevisionTimeline() {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.CustomerDeviceConfigurationDb = CustomerDeviceConfigurationDb;
|
|
@@ -30,6 +30,7 @@ export declare class UserDb extends DbProvider {
|
|
|
30
30
|
readonly yfvanaudit: DbRecordLinkManager;
|
|
31
31
|
readonly email: DbRecordLinkManager;
|
|
32
32
|
readonly contractbuyout: DbRecordLinkManager;
|
|
33
|
+
readonly customerdeviceconfiguration: DbRecordLinkManager;
|
|
33
34
|
constructor(principal: any, dbService: any);
|
|
34
35
|
setRecord(sourceRecord: any): void;
|
|
35
36
|
searchRecords(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-types/dist/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<UserProperties>>>;
|
package/dist/db-sdk-v2/UserDb.js
CHANGED
|
@@ -40,6 +40,7 @@ class UserDb extends db_provider_1.DbProvider {
|
|
|
40
40
|
this.yfvanaudit = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'IdentityModule:User', 'FieldServiceModule:YfVanAudit', 'YfVanAudit_User');
|
|
41
41
|
this.email = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'IdentityModule:User', 'NotificationModule:Email', 'Email_User');
|
|
42
42
|
this.contractbuyout = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'IdentityModule:User', 'OrderModule:ContractBuyOut', 'ContractBuyOut__User');
|
|
43
|
+
this.customerdeviceconfiguration = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'IdentityModule:User', 'NotificationModule:CustomerDeviceConfiguration', 'User__CustomerDeviceConfiguration');
|
|
43
44
|
}
|
|
44
45
|
setRecord(sourceRecord) {
|
|
45
46
|
this.sourceRecord = sourceRecord;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/types/odin.types';
|
|
2
|
+
import { UserProperties } from './User';
|
|
3
|
+
export declare enum CustomerDeviceConfigurationEntityTypes {
|
|
4
|
+
DEFAULT = "DEFAULT"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CustomerDeviceConfigurationPropertyKeys {
|
|
7
|
+
UserId = "UserId",
|
|
8
|
+
Platform = "Platform",
|
|
9
|
+
DeviceToken = "DeviceToken",
|
|
10
|
+
DeviceInfo = "DeviceInfo",
|
|
11
|
+
ArnEndpoint = "ArnEndpoint"
|
|
12
|
+
}
|
|
13
|
+
export interface CustomerDeviceConfigurationProperties {
|
|
14
|
+
UserId?: string;
|
|
15
|
+
Platform?: string;
|
|
16
|
+
DeviceToken?: string;
|
|
17
|
+
DeviceInfo?: string;
|
|
18
|
+
ArnEndpoint?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class CustomerDeviceConfiguration extends OdinRecord<CustomerDeviceConfigurationProperties> {
|
|
21
|
+
entity: 'NotificationModule:CustomerDeviceConfiguration';
|
|
22
|
+
type: CustomerDeviceConfigurationEntityTypes;
|
|
23
|
+
schemaId: '3bb94d97-e20a-4380-953c-0bf368229c06';
|
|
24
|
+
properties: CustomerDeviceConfigurationProperties;
|
|
25
|
+
User: OdinLink<LinkedOdinRecord<UserProperties>>;
|
|
26
|
+
}
|
|
27
|
+
export declare const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = "NotificationModule.CustomerDeviceConfiguration.SubDbRecordCreated";
|
|
28
|
+
export declare const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = "NotificationModule.CustomerDeviceConfiguration.SubDbRecordUpdated";
|
|
29
|
+
export declare const ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = "NotificationModule.CustomerDeviceConfiguration.SubDbRecordDeleted";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = exports.CustomerDeviceConfiguration = exports.CustomerDeviceConfigurationPropertyKeys = exports.CustomerDeviceConfigurationEntityTypes = void 0;
|
|
4
|
+
const odin_types_1 = require("@d19n/odin-types/dist/types/odin.types");
|
|
5
|
+
var CustomerDeviceConfigurationEntityTypes;
|
|
6
|
+
(function (CustomerDeviceConfigurationEntityTypes) {
|
|
7
|
+
CustomerDeviceConfigurationEntityTypes["DEFAULT"] = "DEFAULT";
|
|
8
|
+
})(CustomerDeviceConfigurationEntityTypes = exports.CustomerDeviceConfigurationEntityTypes || (exports.CustomerDeviceConfigurationEntityTypes = {}));
|
|
9
|
+
var CustomerDeviceConfigurationPropertyKeys;
|
|
10
|
+
(function (CustomerDeviceConfigurationPropertyKeys) {
|
|
11
|
+
CustomerDeviceConfigurationPropertyKeys["UserId"] = "UserId";
|
|
12
|
+
CustomerDeviceConfigurationPropertyKeys["Platform"] = "Platform";
|
|
13
|
+
CustomerDeviceConfigurationPropertyKeys["DeviceToken"] = "DeviceToken";
|
|
14
|
+
CustomerDeviceConfigurationPropertyKeys["DeviceInfo"] = "DeviceInfo";
|
|
15
|
+
CustomerDeviceConfigurationPropertyKeys["ArnEndpoint"] = "ArnEndpoint";
|
|
16
|
+
})(CustomerDeviceConfigurationPropertyKeys = exports.CustomerDeviceConfigurationPropertyKeys || (exports.CustomerDeviceConfigurationPropertyKeys = {}));
|
|
17
|
+
class CustomerDeviceConfiguration extends odin_types_1.OdinRecord {
|
|
18
|
+
}
|
|
19
|
+
exports.CustomerDeviceConfiguration = CustomerDeviceConfiguration;
|
|
20
|
+
// Rabbitmq event routing keys
|
|
21
|
+
exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_CREATED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordCreated';
|
|
22
|
+
exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_UPDATED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordUpdated';
|
|
23
|
+
exports.ROUTING_KEY_CUSTOMER_DEVICE_CONFIGURATION_DELETED = 'NotificationModule.CustomerDeviceConfiguration.SubDbRecordDeleted';
|
|
@@ -3,11 +3,13 @@ export declare enum NotificationTemplateEntityTypes {
|
|
|
3
3
|
DEFAULT = "DEFAULT"
|
|
4
4
|
}
|
|
5
5
|
export declare enum NotificationTemplatePropertyKeys {
|
|
6
|
+
SampleData = "SampleData",
|
|
6
7
|
Title = "Title",
|
|
7
8
|
Template = "Template",
|
|
8
9
|
Link = "Link"
|
|
9
10
|
}
|
|
10
11
|
export interface NotificationTemplateProperties {
|
|
12
|
+
SampleData?: string;
|
|
11
13
|
Title?: string;
|
|
12
14
|
Template?: string;
|
|
13
15
|
Link?: string;
|
|
@@ -8,6 +8,7 @@ var NotificationTemplateEntityTypes;
|
|
|
8
8
|
})(NotificationTemplateEntityTypes = exports.NotificationTemplateEntityTypes || (exports.NotificationTemplateEntityTypes = {}));
|
|
9
9
|
var NotificationTemplatePropertyKeys;
|
|
10
10
|
(function (NotificationTemplatePropertyKeys) {
|
|
11
|
+
NotificationTemplatePropertyKeys["SampleData"] = "SampleData";
|
|
11
12
|
NotificationTemplatePropertyKeys["Title"] = "Title";
|
|
12
13
|
NotificationTemplatePropertyKeys["Template"] = "Template";
|
|
13
14
|
NotificationTemplatePropertyKeys["Link"] = "Link";
|
|
@@ -15,6 +15,7 @@ import { TeamProperties } from './Team';
|
|
|
15
15
|
import { YfVanAuditProperties } from './YfVanAudit';
|
|
16
16
|
import { EmailProperties } from './Email';
|
|
17
17
|
import { ContractBuyOutProperties } from './ContractBuyOut';
|
|
18
|
+
import { CustomerDeviceConfigurationProperties } from './CustomerDeviceConfiguration';
|
|
18
19
|
export declare enum UserEntityTypes {
|
|
19
20
|
DEFAULT = "DEFAULT"
|
|
20
21
|
}
|
|
@@ -81,6 +82,7 @@ export declare class User extends OdinRecord<UserProperties> {
|
|
|
81
82
|
YfVanAudit: OdinLink<LinkedOdinRecord<YfVanAuditProperties>>;
|
|
82
83
|
Email: OdinLink<LinkedOdinRecord<EmailProperties>>;
|
|
83
84
|
ContractBuyOut: OdinLink<LinkedOdinRecord<ContractBuyOutProperties>>;
|
|
85
|
+
CustomerDeviceConfiguration: OdinLink<LinkedOdinRecord<CustomerDeviceConfigurationProperties>>;
|
|
84
86
|
}
|
|
85
87
|
export declare const ROUTING_KEY_USER_CREATED = "IdentityModule.User.SubDbRecordCreated";
|
|
86
88
|
export declare const ROUTING_KEY_USER_UPDATED = "IdentityModule.User.SubDbRecordUpdated";
|
|
@@ -89,3 +91,5 @@ export declare const ROUTING_KEY_LINK_USER_TIME_SLOT_CREATED = "IdentityModule.U
|
|
|
89
91
|
export declare const ROUTING_KEY_LINK_USER_TIME_SLOT_DELETED = "IdentityModule.User.TimeSlot.SubDbRecordAssociationDeleted";
|
|
90
92
|
export declare const ROUTING_KEY_LINK_USER_TIME_OFF_CREATED = "IdentityModule.User.TimeOff.SubDbRecordAssociationCreated";
|
|
91
93
|
export declare const ROUTING_KEY_LINK_USER_TIME_OFF_DELETED = "IdentityModule.User.TimeOff.SubDbRecordAssociationDeleted";
|
|
94
|
+
export declare const ROUTING_KEY_LINK_USER_CUSTOMER_DEVICE_CONFIGURATION_CREATED = "IdentityModule.User.CustomerDeviceConfiguration.SubDbRecordAssociationCreated";
|
|
95
|
+
export declare const ROUTING_KEY_LINK_USER_CUSTOMER_DEVICE_CONFIGURATION_DELETED = "IdentityModule.User.CustomerDeviceConfiguration.SubDbRecordAssociationDeleted";
|
package/dist/entities-v2/User.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROUTING_KEY_LINK_USER_TIME_OFF_DELETED = exports.ROUTING_KEY_LINK_USER_TIME_OFF_CREATED = exports.ROUTING_KEY_LINK_USER_TIME_SLOT_DELETED = exports.ROUTING_KEY_LINK_USER_TIME_SLOT_CREATED = exports.ROUTING_KEY_USER_DELETED = exports.ROUTING_KEY_USER_UPDATED = exports.ROUTING_KEY_USER_CREATED = exports.User = exports.UserPropertyKeys = exports.UserAccredited = exports.UserEntityTypes = void 0;
|
|
3
|
+
exports.ROUTING_KEY_LINK_USER_CUSTOMER_DEVICE_CONFIGURATION_DELETED = exports.ROUTING_KEY_LINK_USER_CUSTOMER_DEVICE_CONFIGURATION_CREATED = exports.ROUTING_KEY_LINK_USER_TIME_OFF_DELETED = exports.ROUTING_KEY_LINK_USER_TIME_OFF_CREATED = exports.ROUTING_KEY_LINK_USER_TIME_SLOT_DELETED = exports.ROUTING_KEY_LINK_USER_TIME_SLOT_CREATED = exports.ROUTING_KEY_USER_DELETED = exports.ROUTING_KEY_USER_UPDATED = exports.ROUTING_KEY_USER_CREATED = exports.User = exports.UserPropertyKeys = exports.UserAccredited = exports.UserEntityTypes = void 0;
|
|
4
4
|
const odin_types_1 = require("@d19n/odin-types/dist/types/odin.types");
|
|
5
5
|
var UserEntityTypes;
|
|
6
6
|
(function (UserEntityTypes) {
|
|
@@ -42,3 +42,5 @@ exports.ROUTING_KEY_LINK_USER_TIME_SLOT_CREATED = 'IdentityModule.User.TimeSlot.
|
|
|
42
42
|
exports.ROUTING_KEY_LINK_USER_TIME_SLOT_DELETED = 'IdentityModule.User.TimeSlot.SubDbRecordAssociationDeleted';
|
|
43
43
|
exports.ROUTING_KEY_LINK_USER_TIME_OFF_CREATED = 'IdentityModule.User.TimeOff.SubDbRecordAssociationCreated';
|
|
44
44
|
exports.ROUTING_KEY_LINK_USER_TIME_OFF_DELETED = 'IdentityModule.User.TimeOff.SubDbRecordAssociationDeleted';
|
|
45
|
+
exports.ROUTING_KEY_LINK_USER_CUSTOMER_DEVICE_CONFIGURATION_CREATED = 'IdentityModule.User.CustomerDeviceConfiguration.SubDbRecordAssociationCreated';
|
|
46
|
+
exports.ROUTING_KEY_LINK_USER_CUSTOMER_DEVICE_CONFIGURATION_DELETED = 'IdentityModule.User.CustomerDeviceConfiguration.SubDbRecordAssociationDeleted';
|