@d19n/youfibre-odin-sdk 2.0.94 → 2.0.98
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 +9 -2
- package/dist/actions-v2/CreateTeamDto.d.ts +8 -1
- package/dist/actions-v2/MovePgTransactionChargeToCancelledDto.d.ts +70 -0
- package/dist/actions-v2/MovePgTransactionChargeToCancelledDto.js +62 -0
- package/dist/actions-v2/MovePgTransactionRefundToCancelledDto.d.ts +70 -0
- package/dist/actions-v2/MovePgTransactionRefundToCancelledDto.js +62 -0
- package/dist/actions-v2/UpdateTeamDto.d.ts +8 -1
- package/dist/api-sdk-v2/AddressInteractionApi.d.ts +45 -0
- package/dist/api-sdk-v2/AddressInteractionApi.js +151 -0
- package/dist/db-sdk-v2/AddressInteractionDb.d.ts +117 -0
- package/dist/db-sdk-v2/AddressInteractionDb.js +200 -0
- package/dist/entities-v2/AddressInteraction.d.ts +159 -0
- package/dist/entities-v2/AddressInteraction.js +102 -0
- package/dist/entities-v2/Call.d.ts +0 -14
- package/dist/entities-v2/Call.js +0 -4
- package/dist/entities-v2/CallLeg.d.ts +0 -35
- package/dist/entities-v2/CallLeg.js +0 -10
- package/dist/entities-v2/CallTransfer.d.ts +0 -7
- package/dist/entities-v2/CallTransfer.js +0 -2
- package/dist/entities-v2/Case.d.ts +2 -0
- package/dist/entities-v2/Case.js +2 -0
- package/dist/entities-v2/PgTransaction.d.ts +12 -4
- package/dist/entities-v2/PgTransaction.js +8 -0
- package/dist/entities-v2/RemediationRequiredReason.d.ts +26 -19
- package/dist/entities-v2/RemediationRequiredReason.js +26 -19
- package/dist/entities-v2/Team.d.ts +8 -1
- package/dist/entities-v2/Team.js +2 -0
- package/dist/records-v2/PgTransactionRecord.d.ts +50 -0
- package/dist/records-v2/PgTransactionRecord.js +58 -0
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
2
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
3
|
+
import { AddressInteractionProperties } from '../entities-v2/AddressInteraction';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use OdinDbClient.
|
|
6
|
+
*
|
|
7
|
+
* Migration:
|
|
8
|
+
* - Old: new AddressInteractionApi(authParams).get(id)
|
|
9
|
+
* - New: new odin.addressinteraction.get(id)
|
|
10
|
+
*
|
|
11
|
+
* The new OdinDbClient returns typed record wrappers with action methods.
|
|
12
|
+
*
|
|
13
|
+
* Supports separate query options and provider options:
|
|
14
|
+
* - Constructor level: new AddressInteractionDb(principal, dbService, { omitPermissionsCheck: true })
|
|
15
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
16
|
+
*/
|
|
17
|
+
export declare class AddressInteractionDb extends DbProvider {
|
|
18
|
+
protected readonly principal: any;
|
|
19
|
+
protected readonly dbService: any;
|
|
20
|
+
private readonly moduleName;
|
|
21
|
+
private readonly entityName;
|
|
22
|
+
private sourceRecord;
|
|
23
|
+
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
24
|
+
setRecord(sourceRecord: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Search records with manual pagination control
|
|
27
|
+
* @param params - Search parameters
|
|
28
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
29
|
+
*/
|
|
30
|
+
searchRecords(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AddressInteractionProperties>>>;
|
|
31
|
+
/**
|
|
32
|
+
* Search all records with automatic pagination
|
|
33
|
+
* @param params - Search parameters
|
|
34
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
35
|
+
*/
|
|
36
|
+
searchAllRecordsAndPaginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AddressInteractionProperties>>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a single record by primary key
|
|
39
|
+
* @param addressInteractionId - Record ID
|
|
40
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
41
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Simple get
|
|
45
|
+
* const record = await db.getByPrimaryKey(id);
|
|
46
|
+
*
|
|
47
|
+
* // With related entities
|
|
48
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
|
|
49
|
+
*
|
|
50
|
+
* // With permissions bypass
|
|
51
|
+
* const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
|
|
52
|
+
*
|
|
53
|
+
* // Both options
|
|
54
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
|
|
55
|
+
*/
|
|
56
|
+
getByPrimaryKey(addressInteractionId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AddressInteractionProperties>>;
|
|
57
|
+
/**
|
|
58
|
+
* Get multiple records by primary keys
|
|
59
|
+
* @param addressInteractionIds - Array of record IDs
|
|
60
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
61
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
62
|
+
*/
|
|
63
|
+
getManyByPrimaryKey(addressInteractionIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AddressInteractionProperties>[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Upsert a single record
|
|
66
|
+
* @param upsertDto - Record to upsert
|
|
67
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
68
|
+
*/
|
|
69
|
+
upsert(upsertDto: OdinRecordCreateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes>;
|
|
70
|
+
/**
|
|
71
|
+
* Upsert multiple records
|
|
72
|
+
* @param upsertDtos - Records to upsert
|
|
73
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
74
|
+
*/
|
|
75
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Update a single record
|
|
78
|
+
* @param updateDto - Record to update
|
|
79
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
80
|
+
*/
|
|
81
|
+
update(updateDto: OdinRecordUpdateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes>;
|
|
82
|
+
/**
|
|
83
|
+
* Update multiple records
|
|
84
|
+
* @param updateDtos - Records to update
|
|
85
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
86
|
+
*/
|
|
87
|
+
updateMany(updateDtos: OdinRecordUpdateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete one or many records
|
|
90
|
+
* @param addressInteractionIds - Record IDs to delete
|
|
91
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
92
|
+
*/
|
|
93
|
+
delete(addressInteractionIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Restore one or many deleted records
|
|
96
|
+
* @param addressInteractionIds - Record IDs to restore
|
|
97
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
98
|
+
*/
|
|
99
|
+
restore(addressInteractionIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordRestored[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Apply an action to a record
|
|
102
|
+
* @param actionName - The action key
|
|
103
|
+
* @param dto - The action DTO
|
|
104
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
105
|
+
*/
|
|
106
|
+
applyAction(actionName: string, dto: any, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes[]>;
|
|
107
|
+
/**
|
|
108
|
+
* Get version history for the current source record
|
|
109
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
110
|
+
*/
|
|
111
|
+
getVersions(providerOptions?: DbProviderOptions): Promise<any>;
|
|
112
|
+
/**
|
|
113
|
+
* Get revision timeline for the current source record
|
|
114
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
115
|
+
*/
|
|
116
|
+
getRevisionTimeline(providerOptions?: DbProviderOptions): Promise<any>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
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.AddressInteractionDb = void 0;
|
|
13
|
+
const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use OdinDbClient.
|
|
16
|
+
*
|
|
17
|
+
* Migration:
|
|
18
|
+
* - Old: new AddressInteractionApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.addressinteraction.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinDbClient returns typed record wrappers with action methods.
|
|
22
|
+
*
|
|
23
|
+
* Supports separate query options and provider options:
|
|
24
|
+
* - Constructor level: new AddressInteractionDb(principal, dbService, { omitPermissionsCheck: true })
|
|
25
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
26
|
+
*/
|
|
27
|
+
class AddressInteractionDb extends db_provider_1.DbProvider {
|
|
28
|
+
// ============================================
|
|
29
|
+
// PRIVATE BACKING FIELDS (Lazy Loading)
|
|
30
|
+
// ============================================
|
|
31
|
+
constructor(principal, dbService, defaultOptions) {
|
|
32
|
+
super(principal, dbService, defaultOptions);
|
|
33
|
+
this.moduleName = 'CrmModule';
|
|
34
|
+
this.entityName = 'AddressInteraction';
|
|
35
|
+
this.principal = principal;
|
|
36
|
+
this.dbService = dbService;
|
|
37
|
+
// Link managers are lazy-loaded on first access
|
|
38
|
+
}
|
|
39
|
+
// ============================================
|
|
40
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
41
|
+
// ============================================
|
|
42
|
+
// Usage remains identical: db.address.list(recordId)
|
|
43
|
+
// ============================================
|
|
44
|
+
// STANDARD METHODS
|
|
45
|
+
// ============================================
|
|
46
|
+
// Methods support separate query options and provider options for clean API
|
|
47
|
+
setRecord(sourceRecord) {
|
|
48
|
+
this.sourceRecord = sourceRecord;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Search records with manual pagination control
|
|
52
|
+
* @param params - Search parameters
|
|
53
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
54
|
+
*/
|
|
55
|
+
searchRecords(params, providerOptions) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params, providerOptions);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Search all records with automatic pagination
|
|
62
|
+
* @param params - Search parameters
|
|
63
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
64
|
+
*/
|
|
65
|
+
searchAllRecordsAndPaginate(params, providerOptions) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params, 0, providerOptions);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get a single record by primary key
|
|
72
|
+
* @param addressInteractionId - Record ID
|
|
73
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
74
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // Simple get
|
|
78
|
+
* const record = await db.getByPrimaryKey(id);
|
|
79
|
+
*
|
|
80
|
+
* // With related entities
|
|
81
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
|
|
82
|
+
*
|
|
83
|
+
* // With permissions bypass
|
|
84
|
+
* const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
|
|
85
|
+
*
|
|
86
|
+
* // Both options
|
|
87
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
|
|
88
|
+
*/
|
|
89
|
+
getByPrimaryKey(addressInteractionId, queryOptions, providerOptions) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, addressInteractionId, queryOptions, providerOptions);
|
|
92
|
+
if (res)
|
|
93
|
+
this.setRecord(res);
|
|
94
|
+
return res;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get multiple records by primary keys
|
|
99
|
+
* @param addressInteractionIds - Array of record IDs
|
|
100
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
101
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
102
|
+
*/
|
|
103
|
+
getManyByPrimaryKey(addressInteractionIds, queryOptions, providerOptions) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, addressInteractionIds, queryOptions, providerOptions);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Upsert a single record
|
|
110
|
+
* @param upsertDto - Record to upsert
|
|
111
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
112
|
+
*/
|
|
113
|
+
upsert(upsertDto, providerOptions) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto], providerOptions);
|
|
116
|
+
return res[0];
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Upsert multiple records
|
|
121
|
+
* @param upsertDtos - Records to upsert
|
|
122
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
123
|
+
*/
|
|
124
|
+
upsertMany(upsertDtos, providerOptions) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos, providerOptions);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Update a single record
|
|
131
|
+
* @param updateDto - Record to update
|
|
132
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
133
|
+
*/
|
|
134
|
+
update(updateDto, providerOptions) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto], providerOptions);
|
|
137
|
+
return res[0];
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Update multiple records
|
|
142
|
+
* @param updateDtos - Records to update
|
|
143
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
144
|
+
*/
|
|
145
|
+
updateMany(updateDtos, providerOptions) {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos, providerOptions);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Delete one or many records
|
|
152
|
+
* @param addressInteractionIds - Record IDs to delete
|
|
153
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
154
|
+
*/
|
|
155
|
+
delete(addressInteractionIds, providerOptions) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return yield this._delete(this.moduleName, this.entityName, addressInteractionIds, providerOptions);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Restore one or many deleted records
|
|
162
|
+
* @param addressInteractionIds - Record IDs to restore
|
|
163
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
164
|
+
*/
|
|
165
|
+
restore(addressInteractionIds, providerOptions) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
return yield this._restore(this.moduleName, this.entityName, addressInteractionIds, providerOptions);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Apply an action to a record
|
|
172
|
+
* @param actionName - The action key
|
|
173
|
+
* @param dto - The action DTO
|
|
174
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
175
|
+
*/
|
|
176
|
+
applyAction(actionName, dto, providerOptions) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto, providerOptions);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Get version history for the current source record
|
|
183
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
184
|
+
*/
|
|
185
|
+
getVersions(providerOptions) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Get revision timeline for the current source record
|
|
192
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
193
|
+
*/
|
|
194
|
+
getRevisionTimeline(providerOptions) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.AddressInteractionDb = AddressInteractionDb;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AddressInteraction Entity Definition
|
|
3
|
+
*
|
|
4
|
+
* When a user enters an address in the lead form checker but does not submit the form, the address is flagged in the database
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity AddressInteraction
|
|
8
|
+
* @schemaId 4eab8349-297d-4a68-84fd-608443d74043
|
|
9
|
+
*
|
|
10
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
11
|
+
* Generated from Odin schema definition
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* Available types for AddressInteraction records
|
|
16
|
+
*/
|
|
17
|
+
export declare enum AddressInteractionEntityTypes {
|
|
18
|
+
/** This is the default record type */
|
|
19
|
+
DEFAULT = "DEFAULT"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Valid values for AddressInteraction.source
|
|
23
|
+
*
|
|
24
|
+
* Which website/form the interaction came from: YF_RESIDENTIAL, YF_BUSINESS, NETOMNIA — important given the team manages multiple brands
|
|
25
|
+
*
|
|
26
|
+
* @remarks Available options:
|
|
27
|
+
* - `YF_BUSINESS` - Business
|
|
28
|
+
* - `NETOMNIA` - Netomnia
|
|
29
|
+
* - `YF_RESIDENTIAL` - Residential
|
|
30
|
+
*/
|
|
31
|
+
export declare enum AddressInteractionsource {
|
|
32
|
+
BUSINESS = "YF_BUSINESS",
|
|
33
|
+
NETOMNIA = "NETOMNIA",
|
|
34
|
+
RESIDENTIAL = "YF_RESIDENTIAL"
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Property keys for AddressInteraction
|
|
38
|
+
* Use these constants instead of string literals for type safety
|
|
39
|
+
*/
|
|
40
|
+
export declare enum AddressInteractionPropertyKeys {
|
|
41
|
+
/** Primary key, auto-generated */
|
|
42
|
+
Id = "id",
|
|
43
|
+
/** Royal Mail UDPRN (Unique Delivery Point Reference Number) — the canonical identifier for a UK address. */
|
|
44
|
+
Udprn = "udprn",
|
|
45
|
+
/** Human-readable address string */
|
|
46
|
+
FullAddress = "fullAddress",
|
|
47
|
+
/** Extracted postcode — useful for Marketing to segment and target by area */
|
|
48
|
+
Postcode = "postcode",
|
|
49
|
+
/** Timestamp of the first time this address was checked without completing a lead */
|
|
50
|
+
FirstInteractionAt = "firstInteractionAt",
|
|
51
|
+
/** Timestamp of the most recent interaction — useful to gauge recency for mailing targeting */
|
|
52
|
+
LastInteractionAt = "lastInteractionAt",
|
|
53
|
+
/** Number of times this address has been checked without a lead being created — helps Marketing prioritise warm addresses */
|
|
54
|
+
InteractionCount = "interactionCount",
|
|
55
|
+
/** Flag indicating whether a full Lead record exists in Odin against this address (cross-reference with the Lead schema) — allows Marketing to filter out already-converted addresses */
|
|
56
|
+
HasFullLead = "hasFullLead",
|
|
57
|
+
/** Which website/form the interaction came from: YF_RESIDENTIAL, YF_BUSINESS, NETOMNIA — important given the team manages multiple brands */
|
|
58
|
+
Source = "source",
|
|
59
|
+
/** Record creation timestamp (auto-managed by Odin) */
|
|
60
|
+
CreatedAt = "createdAt",
|
|
61
|
+
/** Last updated timestamp (auto-managed by Odin) */
|
|
62
|
+
UpdatedAt = "updatedAt"
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Properties for AddressInteraction records
|
|
66
|
+
*
|
|
67
|
+
* @see CrmModule:AddressInteraction
|
|
68
|
+
*/
|
|
69
|
+
export interface AddressInteractionProperties {
|
|
70
|
+
/** Primary key, auto-generated
|
|
71
|
+
*
|
|
72
|
+
* @type {UUID}
|
|
73
|
+
*/
|
|
74
|
+
Id: string;
|
|
75
|
+
/** Royal Mail UDPRN (Unique Delivery Point Reference Number) — the canonical identifier for a UK address.
|
|
76
|
+
*
|
|
77
|
+
* @type {TEXT}
|
|
78
|
+
*/
|
|
79
|
+
Udprn: string;
|
|
80
|
+
/** Human-readable address string
|
|
81
|
+
*
|
|
82
|
+
* @type {TEXT}
|
|
83
|
+
*/
|
|
84
|
+
FullAddress: string;
|
|
85
|
+
/** Extracted postcode — useful for Marketing to segment and target by area
|
|
86
|
+
*
|
|
87
|
+
* @type {TEXT}
|
|
88
|
+
*/
|
|
89
|
+
Postcode: string;
|
|
90
|
+
/** Timestamp of the first time this address was checked without completing a lead
|
|
91
|
+
*
|
|
92
|
+
* @type {DATE_TIME}
|
|
93
|
+
*/
|
|
94
|
+
FirstInteractionAt: string;
|
|
95
|
+
/** Timestamp of the most recent interaction — useful to gauge recency for mailing targeting
|
|
96
|
+
*
|
|
97
|
+
* @type {DATE_TIME}
|
|
98
|
+
*/
|
|
99
|
+
LastInteractionAt: string;
|
|
100
|
+
/** Number of times this address has been checked without a lead being created — helps Marketing prioritise warm addresses
|
|
101
|
+
*
|
|
102
|
+
* @type {NUMBER}
|
|
103
|
+
*/
|
|
104
|
+
InteractionCount: number;
|
|
105
|
+
/** Flag indicating whether a full Lead record exists in Odin against this address (cross-reference with the Lead schema) — allows Marketing to filter out already-converted addresses
|
|
106
|
+
*
|
|
107
|
+
* @type {BOOLEAN}
|
|
108
|
+
*/
|
|
109
|
+
HasFullLead: boolean;
|
|
110
|
+
/** Which website/form the interaction came from: YF_RESIDENTIAL, YF_BUSINESS, NETOMNIA — important given the team manages multiple brands
|
|
111
|
+
*
|
|
112
|
+
* @type {ENUM}
|
|
113
|
+
* @enum {AddressInteractionsource}
|
|
114
|
+
*/
|
|
115
|
+
Source: AddressInteractionsource;
|
|
116
|
+
/** Record creation timestamp (auto-managed by Odin)
|
|
117
|
+
*
|
|
118
|
+
* @type {DATE_TIME}
|
|
119
|
+
*/
|
|
120
|
+
CreatedAt: string;
|
|
121
|
+
/** Last updated timestamp (auto-managed by Odin)
|
|
122
|
+
*
|
|
123
|
+
* @type {DATE_TIME}
|
|
124
|
+
*/
|
|
125
|
+
UpdatedAt: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* AddressInteraction entity from CrmModule
|
|
129
|
+
*
|
|
130
|
+
* When a user enters an address in the lead form checker but does not submit the form, the address is flagged in the database
|
|
131
|
+
*
|
|
132
|
+
* @module CrmModule
|
|
133
|
+
* @entity AddressInteraction
|
|
134
|
+
* @schemaId 4eab8349-297d-4a68-84fd-608443d74043
|
|
135
|
+
* @recordPrefix AINT
|
|
136
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
137
|
+
*/
|
|
138
|
+
export declare class AddressInteraction extends OdinRecord<AddressInteractionProperties> {
|
|
139
|
+
entity: 'CrmModule:AddressInteraction';
|
|
140
|
+
type: AddressInteractionEntityTypes;
|
|
141
|
+
schemaId: '4eab8349-297d-4a68-84fd-608443d74043';
|
|
142
|
+
properties: AddressInteractionProperties;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* RabbitMQ routing keys for AddressInteraction events
|
|
146
|
+
*/
|
|
147
|
+
export declare const ROUTING_KEY_ADDRESS_INTERACTION_CREATED = "CrmModule.AddressInteraction.SubDbRecordCreated";
|
|
148
|
+
export declare const ROUTING_KEY_ADDRESS_INTERACTION_UPDATED = "CrmModule.AddressInteraction.SubDbRecordUpdated";
|
|
149
|
+
export declare const ROUTING_KEY_ADDRESS_INTERACTION_DELETED = "CrmModule.AddressInteraction.SubDbRecordDeleted";
|
|
150
|
+
/**
|
|
151
|
+
* Type-specific routing keys for AddressInteraction events
|
|
152
|
+
* Subscribe to these for events on specific entity types only
|
|
153
|
+
*/
|
|
154
|
+
/** This is the default record type created */
|
|
155
|
+
export declare const ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_CREATED = "CrmModule.AddressInteraction.DEFAULT.SubDbRecordCreated";
|
|
156
|
+
/** This is the default record type updated */
|
|
157
|
+
export declare const ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_UPDATED = "CrmModule.AddressInteraction.DEFAULT.SubDbRecordUpdated";
|
|
158
|
+
/** This is the default record type deleted */
|
|
159
|
+
export declare const ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_DELETED = "CrmModule.AddressInteraction.DEFAULT.SubDbRecordDeleted";
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AddressInteraction Entity Definition
|
|
4
|
+
*
|
|
5
|
+
* When a user enters an address in the lead form checker but does not submit the form, the address is flagged in the database
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity AddressInteraction
|
|
9
|
+
* @schemaId 4eab8349-297d-4a68-84fd-608443d74043
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
* Generated from Odin schema definition
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_DELETED = exports.ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_UPDATED = exports.ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_CREATED = exports.ROUTING_KEY_ADDRESS_INTERACTION_DELETED = exports.ROUTING_KEY_ADDRESS_INTERACTION_UPDATED = exports.ROUTING_KEY_ADDRESS_INTERACTION_CREATED = exports.AddressInteraction = exports.AddressInteractionPropertyKeys = exports.AddressInteractionsource = exports.AddressInteractionEntityTypes = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Available types for AddressInteraction records
|
|
19
|
+
*/
|
|
20
|
+
var AddressInteractionEntityTypes;
|
|
21
|
+
(function (AddressInteractionEntityTypes) {
|
|
22
|
+
/** This is the default record type */
|
|
23
|
+
AddressInteractionEntityTypes["DEFAULT"] = "DEFAULT";
|
|
24
|
+
})(AddressInteractionEntityTypes = exports.AddressInteractionEntityTypes || (exports.AddressInteractionEntityTypes = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Valid values for AddressInteraction.source
|
|
27
|
+
*
|
|
28
|
+
* Which website/form the interaction came from: YF_RESIDENTIAL, YF_BUSINESS, NETOMNIA — important given the team manages multiple brands
|
|
29
|
+
*
|
|
30
|
+
* @remarks Available options:
|
|
31
|
+
* - `YF_BUSINESS` - Business
|
|
32
|
+
* - `NETOMNIA` - Netomnia
|
|
33
|
+
* - `YF_RESIDENTIAL` - Residential
|
|
34
|
+
*/
|
|
35
|
+
var AddressInteractionsource;
|
|
36
|
+
(function (AddressInteractionsource) {
|
|
37
|
+
AddressInteractionsource["BUSINESS"] = "YF_BUSINESS";
|
|
38
|
+
AddressInteractionsource["NETOMNIA"] = "NETOMNIA";
|
|
39
|
+
AddressInteractionsource["RESIDENTIAL"] = "YF_RESIDENTIAL";
|
|
40
|
+
})(AddressInteractionsource = exports.AddressInteractionsource || (exports.AddressInteractionsource = {}));
|
|
41
|
+
/**
|
|
42
|
+
* Property keys for AddressInteraction
|
|
43
|
+
* Use these constants instead of string literals for type safety
|
|
44
|
+
*/
|
|
45
|
+
var AddressInteractionPropertyKeys;
|
|
46
|
+
(function (AddressInteractionPropertyKeys) {
|
|
47
|
+
/** Primary key, auto-generated */
|
|
48
|
+
AddressInteractionPropertyKeys["Id"] = "id";
|
|
49
|
+
/** Royal Mail UDPRN (Unique Delivery Point Reference Number) — the canonical identifier for a UK address. */
|
|
50
|
+
AddressInteractionPropertyKeys["Udprn"] = "udprn";
|
|
51
|
+
/** Human-readable address string */
|
|
52
|
+
AddressInteractionPropertyKeys["FullAddress"] = "fullAddress";
|
|
53
|
+
/** Extracted postcode — useful for Marketing to segment and target by area */
|
|
54
|
+
AddressInteractionPropertyKeys["Postcode"] = "postcode";
|
|
55
|
+
/** Timestamp of the first time this address was checked without completing a lead */
|
|
56
|
+
AddressInteractionPropertyKeys["FirstInteractionAt"] = "firstInteractionAt";
|
|
57
|
+
/** Timestamp of the most recent interaction — useful to gauge recency for mailing targeting */
|
|
58
|
+
AddressInteractionPropertyKeys["LastInteractionAt"] = "lastInteractionAt";
|
|
59
|
+
/** Number of times this address has been checked without a lead being created — helps Marketing prioritise warm addresses */
|
|
60
|
+
AddressInteractionPropertyKeys["InteractionCount"] = "interactionCount";
|
|
61
|
+
/** Flag indicating whether a full Lead record exists in Odin against this address (cross-reference with the Lead schema) — allows Marketing to filter out already-converted addresses */
|
|
62
|
+
AddressInteractionPropertyKeys["HasFullLead"] = "hasFullLead";
|
|
63
|
+
/** Which website/form the interaction came from: YF_RESIDENTIAL, YF_BUSINESS, NETOMNIA — important given the team manages multiple brands */
|
|
64
|
+
AddressInteractionPropertyKeys["Source"] = "source";
|
|
65
|
+
/** Record creation timestamp (auto-managed by Odin) */
|
|
66
|
+
AddressInteractionPropertyKeys["CreatedAt"] = "createdAt";
|
|
67
|
+
/** Last updated timestamp (auto-managed by Odin) */
|
|
68
|
+
AddressInteractionPropertyKeys["UpdatedAt"] = "updatedAt";
|
|
69
|
+
})(AddressInteractionPropertyKeys = exports.AddressInteractionPropertyKeys || (exports.AddressInteractionPropertyKeys = {}));
|
|
70
|
+
/**
|
|
71
|
+
* AddressInteraction entity from CrmModule
|
|
72
|
+
*
|
|
73
|
+
* When a user enters an address in the lead form checker but does not submit the form, the address is flagged in the database
|
|
74
|
+
*
|
|
75
|
+
* @module CrmModule
|
|
76
|
+
* @entity AddressInteraction
|
|
77
|
+
* @schemaId 4eab8349-297d-4a68-84fd-608443d74043
|
|
78
|
+
* @recordPrefix AINT
|
|
79
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
80
|
+
*/
|
|
81
|
+
class AddressInteraction extends core_1.OdinRecord {
|
|
82
|
+
}
|
|
83
|
+
exports.AddressInteraction = AddressInteraction;
|
|
84
|
+
// ============================================
|
|
85
|
+
// RABBITMQ EVENT ROUTING KEYS
|
|
86
|
+
// ============================================
|
|
87
|
+
/**
|
|
88
|
+
* RabbitMQ routing keys for AddressInteraction events
|
|
89
|
+
*/
|
|
90
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_CREATED = 'CrmModule.AddressInteraction.SubDbRecordCreated';
|
|
91
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_UPDATED = 'CrmModule.AddressInteraction.SubDbRecordUpdated';
|
|
92
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_DELETED = 'CrmModule.AddressInteraction.SubDbRecordDeleted';
|
|
93
|
+
/**
|
|
94
|
+
* Type-specific routing keys for AddressInteraction events
|
|
95
|
+
* Subscribe to these for events on specific entity types only
|
|
96
|
+
*/
|
|
97
|
+
/** This is the default record type created */
|
|
98
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_CREATED = 'CrmModule.AddressInteraction.DEFAULT.SubDbRecordCreated';
|
|
99
|
+
/** This is the default record type updated */
|
|
100
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_UPDATED = 'CrmModule.AddressInteraction.DEFAULT.SubDbRecordUpdated';
|
|
101
|
+
/** This is the default record type deleted */
|
|
102
|
+
exports.ROUTING_KEY_ADDRESS_INTERACTION_DEFAULT_DELETED = 'CrmModule.AddressInteraction.DEFAULT.SubDbRecordDeleted';
|
|
@@ -142,8 +142,6 @@ export declare enum CallPropertyKeys {
|
|
|
142
142
|
Source = "Source",
|
|
143
143
|
/** the status of the call (Communications - Call) */
|
|
144
144
|
CallStatus = "CallStatus",
|
|
145
|
-
/** IsConference (Communications - Call) */
|
|
146
|
-
IsConference = "IsConference",
|
|
147
145
|
/** transcription url from AWS (Communications - Call) */
|
|
148
146
|
TranscriptionUrl = "TranscriptionUrl",
|
|
149
147
|
/** TimeInInitiated (Communications - Call) */
|
|
@@ -176,8 +174,6 @@ export declare enum CallPropertyKeys {
|
|
|
176
174
|
AirCallAgentId = "AirCallAgentId",
|
|
177
175
|
/** WorkOrderId (Communications - Call) */
|
|
178
176
|
WorkOrderId = "WorkOrderId",
|
|
179
|
-
/** Twilio conference name if converted to conference (Communications - Call) */
|
|
180
|
-
ConferenceName = "ConferenceName",
|
|
181
177
|
/** TransferCallId (Communications - Call) */
|
|
182
178
|
TransferCallId = "TransferCallId",
|
|
183
179
|
/** Wrap up taskSid (Communications - Call) */
|
|
@@ -305,11 +301,6 @@ export interface CallProperties {
|
|
|
305
301
|
* @tracked Changes to this field are tracked in audit history
|
|
306
302
|
*/
|
|
307
303
|
CallStatus: string;
|
|
308
|
-
/** IsConference (Communications - Call)
|
|
309
|
-
*
|
|
310
|
-
* @type {BOOLEAN}
|
|
311
|
-
*/
|
|
312
|
-
IsConference: boolean;
|
|
313
304
|
/** transcription url from AWS (Communications - Call)
|
|
314
305
|
*
|
|
315
306
|
* @type {TEXT}
|
|
@@ -397,11 +388,6 @@ export interface CallProperties {
|
|
|
397
388
|
* @hidden This field is hidden in the UI
|
|
398
389
|
*/
|
|
399
390
|
WorkOrderId: string;
|
|
400
|
-
/** Twilio conference name if converted to conference (Communications - Call)
|
|
401
|
-
*
|
|
402
|
-
* @type {TEXT}
|
|
403
|
-
*/
|
|
404
|
-
ConferenceName: string;
|
|
405
391
|
/** TransferCallId (Communications - Call)
|
|
406
392
|
*
|
|
407
393
|
* @type {UUID}
|
package/dist/entities-v2/Call.js
CHANGED
|
@@ -142,8 +142,6 @@ var CallPropertyKeys;
|
|
|
142
142
|
CallPropertyKeys["Source"] = "Source";
|
|
143
143
|
/** the status of the call (Communications - Call) */
|
|
144
144
|
CallPropertyKeys["CallStatus"] = "CallStatus";
|
|
145
|
-
/** IsConference (Communications - Call) */
|
|
146
|
-
CallPropertyKeys["IsConference"] = "IsConference";
|
|
147
145
|
/** transcription url from AWS (Communications - Call) */
|
|
148
146
|
CallPropertyKeys["TranscriptionUrl"] = "TranscriptionUrl";
|
|
149
147
|
/** TimeInInitiated (Communications - Call) */
|
|
@@ -176,8 +174,6 @@ var CallPropertyKeys;
|
|
|
176
174
|
CallPropertyKeys["AirCallAgentId"] = "AirCallAgentId";
|
|
177
175
|
/** WorkOrderId (Communications - Call) */
|
|
178
176
|
CallPropertyKeys["WorkOrderId"] = "WorkOrderId";
|
|
179
|
-
/** Twilio conference name if converted to conference (Communications - Call) */
|
|
180
|
-
CallPropertyKeys["ConferenceName"] = "ConferenceName";
|
|
181
177
|
/** TransferCallId (Communications - Call) */
|
|
182
178
|
CallPropertyKeys["TransferCallId"] = "TransferCallId";
|
|
183
179
|
/** Wrap up taskSid (Communications - Call) */
|