@d19n/youfibre-odin-sdk 2.0.337 → 2.0.339
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 +4 -2
- package/dist/actions-v2/CreateCollectionAmcoWorkOrderDto.d.ts +1 -1
- package/dist/actions-v2/CreateCollectionAmcoWorkOrderFromOrderDto.d.ts +1 -1
- package/dist/actions-v2/CreateDispatchAmcoWorkOrderDto.d.ts +1 -1
- package/dist/actions-v2/CreateDispatchAmcoWorkOrderFromOrderDto.d.ts +1 -1
- package/dist/actions-v2/CreateInstallDayBeforeWifiEducationDto.d.ts +72 -0
- package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +1 -1
- package/dist/actions-v2/UpdateAppointmentSalesAppDto.d.ts +129 -0
- package/dist/actions-v2/UpdateAppointmentSalesAppDto.js +56 -0
- package/dist/api-sdk-v2/AiRouteRequestApi.d.ts +45 -0
- package/dist/api-sdk-v2/AiRouteRequestApi.js +151 -0
- package/dist/db-sdk-v2/AiRouteRequestDb.d.ts +117 -0
- package/dist/db-sdk-v2/AiRouteRequestDb.js +200 -0
- package/dist/entities-v2/AiRouteRequest.d.ts +248 -0
- package/dist/entities-v2/AiRouteRequest.js +162 -0
- package/dist/entities-v2/Appointment.d.ts +16 -16
- package/dist/entities-v2/Appointment.js +4 -4
- package/dist/entities-v2/Lead.d.ts +2 -0
- package/dist/entities-v2/Lead.js +2 -0
- package/dist/entities-v2/Order.d.ts +23 -1
- package/dist/entities-v2/Order.js +18 -2
- package/dist/entities-v2/WorkOrder.d.ts +23 -19
- package/dist/entities-v2/WorkOrder.js +6 -2
- package/dist/records-v2/AppointmentRecord.d.ts +28 -0
- package/dist/records-v2/AppointmentRecord.js +40 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ await workOrder.completeWorkOrder({ ... });
|
|
|
124
124
|
|
|
125
125
|
## Entities
|
|
126
126
|
|
|
127
|
-
This SDK includes **
|
|
127
|
+
This SDK includes **192** entities across **12** modules.
|
|
128
128
|
|
|
129
129
|
### CrmModule
|
|
130
130
|
|
|
@@ -205,6 +205,7 @@ This SDK includes **191** entities across **12** modules.
|
|
|
205
205
|
|--------|-------------|-------|
|
|
206
206
|
| **AgentStatus** | AgentStatus Entity Definition | DEFAULT |
|
|
207
207
|
| **AgentStatusHistory** | AgentStatusHistory Entity Definition | DEFAULT |
|
|
208
|
+
| **AiRouteRequest** | AiRouteRequest Entity Definition | DEFAULT |
|
|
208
209
|
| **Case** | Case Entity Definition | OUTAGE |
|
|
209
210
|
| **CaseAction** | CaseAction Entity Definition | DEFAULT |
|
|
210
211
|
| **CaseQueueListView** | CaseQueueListView Entity Definition | DEFAULT |
|
|
@@ -379,7 +380,7 @@ This SDK includes **191** entities across **12** modules.
|
|
|
379
380
|
|
|
380
381
|
## Actions
|
|
381
382
|
|
|
382
|
-
This SDK includes **
|
|
383
|
+
This SDK includes **897** actions.
|
|
383
384
|
|
|
384
385
|
### Action Types
|
|
385
386
|
|
|
@@ -1473,6 +1474,7 @@ This SDK includes **896** actions.
|
|
|
1473
1474
|
| Action | Type | Event |
|
|
1474
1475
|
|--------|------|-------|
|
|
1475
1476
|
| `CreateAppointment` | CREATE | k1.t-hEOJjsDb.CrmModule.Appointment.Create.CreateAppointment |
|
|
1477
|
+
| `UpdateAppointmentSalesApp` | UPDATE | k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp |
|
|
1476
1478
|
|
|
1477
1479
|
#### PgFileAllocation
|
|
1478
1480
|
|
|
@@ -87,7 +87,7 @@ export interface CreateCollectionAmcoWorkOrderProperties {
|
|
|
87
87
|
/**
|
|
88
88
|
* Source
|
|
89
89
|
*
|
|
90
|
-
*
|
|
90
|
+
* Source of WO creation
|
|
91
91
|
* @type {ENUM}
|
|
92
92
|
*/
|
|
93
93
|
Source?: string | null;
|
|
@@ -79,7 +79,7 @@ export interface CreateCollectionAmcoWorkOrderProperties {
|
|
|
79
79
|
/**
|
|
80
80
|
* Source
|
|
81
81
|
*
|
|
82
|
-
*
|
|
82
|
+
* Source of WO creation
|
|
83
83
|
* @type {ENUM}
|
|
84
84
|
*/
|
|
85
85
|
Source?: string | null;
|
|
@@ -80,7 +80,7 @@ export interface CreateDispatchAmcoWorkOrderProperties {
|
|
|
80
80
|
/**
|
|
81
81
|
* Source
|
|
82
82
|
*
|
|
83
|
-
*
|
|
83
|
+
* Source of WO creation
|
|
84
84
|
* @type {ENUM}
|
|
85
85
|
*/
|
|
86
86
|
Source?: string | null;
|
|
@@ -72,7 +72,7 @@ export interface CreateDispatchAmcoWorkOrderProperties {
|
|
|
72
72
|
/**
|
|
73
73
|
* Source
|
|
74
74
|
*
|
|
75
|
-
*
|
|
75
|
+
* Source of WO creation
|
|
76
76
|
* @type {ENUM}
|
|
77
77
|
*/
|
|
78
78
|
Source?: string | null;
|
|
@@ -22,8 +22,80 @@ export interface CreateInstallDayBeforeWifiEducationMessage extends OdinRecordCr
|
|
|
22
22
|
/**
|
|
23
23
|
* Properties for CreateInstallDayBeforeWifiEducation action
|
|
24
24
|
*
|
|
25
|
+
* @property Required fields: 0
|
|
26
|
+
* @property Optional fields: 10
|
|
25
27
|
*/
|
|
26
28
|
export interface CreateInstallDayBeforeWifiEducationProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Date
|
|
31
|
+
*
|
|
32
|
+
* Date field for Email records. Used by Communications team.
|
|
33
|
+
* @type {DATE_TIME}
|
|
34
|
+
*/
|
|
35
|
+
Date?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* EmailingService
|
|
38
|
+
*
|
|
39
|
+
* The provider we use to send email (eg. Sendgrid)
|
|
40
|
+
* @type {ENUM}
|
|
41
|
+
*/
|
|
42
|
+
EmailingService?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* ContactId
|
|
45
|
+
*
|
|
46
|
+
* The related Contact to send the email
|
|
47
|
+
* @type {LOOKUP}
|
|
48
|
+
*/
|
|
49
|
+
ContactId?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* TemplateLabel
|
|
52
|
+
*
|
|
53
|
+
* The template label from email templates engine
|
|
54
|
+
* @type {TEXT}
|
|
55
|
+
*/
|
|
56
|
+
TemplateLabel?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* MessageId
|
|
59
|
+
*
|
|
60
|
+
* SMTP Message Id (Communications - Email)
|
|
61
|
+
* @type {TEXT}
|
|
62
|
+
*/
|
|
63
|
+
MessageId?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* EmailSenderId
|
|
66
|
+
*
|
|
67
|
+
* The Email Sender related entity
|
|
68
|
+
* @type {LOOKUP}
|
|
69
|
+
*/
|
|
70
|
+
EmailSenderId?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* DynamicData
|
|
73
|
+
*
|
|
74
|
+
* Data will pass to emailing service (variables)
|
|
75
|
+
* @type {JSON}
|
|
76
|
+
*/
|
|
77
|
+
DynamicData?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Title
|
|
80
|
+
*
|
|
81
|
+
* Used for title
|
|
82
|
+
* @type {TEXT}
|
|
83
|
+
*/
|
|
84
|
+
Title?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Subject
|
|
87
|
+
*
|
|
88
|
+
* Data field for Email records. Used by Communications team.
|
|
89
|
+
* @type {TEXT}
|
|
90
|
+
*/
|
|
91
|
+
Subject?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* To
|
|
94
|
+
*
|
|
95
|
+
* Data field for Email records. Used by Communications team.
|
|
96
|
+
* @type {TEXT}
|
|
97
|
+
*/
|
|
98
|
+
To?: string | null;
|
|
27
99
|
}
|
|
28
100
|
/**
|
|
29
101
|
* CreateInstallDayBeforeWifiEducation
|
|
@@ -22,7 +22,7 @@ export interface CreateLeadSalesAppMessage extends OdinRecordCreatedEvent<Create
|
|
|
22
22
|
* Properties for CreateLeadSalesApp action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 5
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 0
|
|
26
26
|
*/
|
|
27
27
|
export interface CreateLeadSalesAppProperties {
|
|
28
28
|
/**
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateAppointmentSalesApp Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Update Appointment in mobile app
|
|
5
|
+
*
|
|
6
|
+
* @module CrmModule
|
|
7
|
+
* @entity Appointment
|
|
8
|
+
* @actionKey UpdateAppointmentSalesApp
|
|
9
|
+
* @event k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for UpdateAppointmentSalesApp updated events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp
|
|
18
|
+
*/
|
|
19
|
+
export interface UpdateAppointmentSalesAppMessage extends OdinRecordUpdatedEvent<UpdateAppointmentSalesAppDto, UpdateAppointmentSalesAppProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for UpdateAppointmentSalesApp action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 0
|
|
25
|
+
* @property Optional fields: 9
|
|
26
|
+
*/
|
|
27
|
+
export interface UpdateAppointmentSalesAppProperties {
|
|
28
|
+
/**
|
|
29
|
+
* Meeting title
|
|
30
|
+
*
|
|
31
|
+
* The title of the appointment (Sales - Appointment)
|
|
32
|
+
* @type {TEXT}
|
|
33
|
+
*/
|
|
34
|
+
MeetingTitle?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Appointment type
|
|
37
|
+
*
|
|
38
|
+
* Appointment type (Sales - Appointment)
|
|
39
|
+
* @type {ENUM}
|
|
40
|
+
*/
|
|
41
|
+
Type?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* date
|
|
44
|
+
*
|
|
45
|
+
* Date field for Appointment records. Used by Sales team.
|
|
46
|
+
* @type {DATE_TIME}
|
|
47
|
+
* @format DD/MM/YYYY HH:mm
|
|
48
|
+
*/
|
|
49
|
+
Date?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* first name
|
|
52
|
+
*
|
|
53
|
+
* Display name/title for Appointment records. Primary identifier for Sales team.
|
|
54
|
+
* @type {TEXT}
|
|
55
|
+
*/
|
|
56
|
+
FirstName?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* last name
|
|
59
|
+
*
|
|
60
|
+
* Display name/title for Appointment records. Primary identifier for Sales team.
|
|
61
|
+
* @type {TEXT}
|
|
62
|
+
*/
|
|
63
|
+
LastName?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* email address
|
|
66
|
+
*
|
|
67
|
+
* email address (Sales - Appointment)
|
|
68
|
+
* @type {EMAIL}
|
|
69
|
+
*/
|
|
70
|
+
EmailAddress?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* phone
|
|
73
|
+
*
|
|
74
|
+
* Contact information field for Appointment. Used by Sales team for communication.
|
|
75
|
+
* @type {PHONE_NUMBER_E164_GB}
|
|
76
|
+
*/
|
|
77
|
+
Phone?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* AddressId
|
|
80
|
+
*
|
|
81
|
+
* Reference identifier for Appointment relationships. Used for data integrity.
|
|
82
|
+
* @type {LOOKUP}
|
|
83
|
+
*/
|
|
84
|
+
AddressId?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Additional Information
|
|
87
|
+
*
|
|
88
|
+
* Additional appointment information (Sales - Appointment)
|
|
89
|
+
* @type {TEXT_LONG}
|
|
90
|
+
*/
|
|
91
|
+
Comment?: string | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* UpdateAppointmentSalesApp
|
|
95
|
+
*
|
|
96
|
+
* Update Appointment in mobile app
|
|
97
|
+
*
|
|
98
|
+
* @actionType UPDATE - Updates an existing Appointment record
|
|
99
|
+
* @module CrmModule
|
|
100
|
+
* @entity Appointment
|
|
101
|
+
* @event k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp
|
|
102
|
+
* @permission schema.action.updateappointmentsalesapp.trigger
|
|
103
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
104
|
+
*/
|
|
105
|
+
export declare class UpdateAppointmentSalesAppDto extends OdinRecordUpdateDto<UpdateAppointmentSalesAppProperties> {
|
|
106
|
+
/** Used by SDK generators to identify action type */
|
|
107
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
108
|
+
static readonly ACTION_KEY = "UpdateAppointmentSalesApp";
|
|
109
|
+
static readonly MODULE_NAME = "CrmModule";
|
|
110
|
+
static readonly ENTITIES: string[];
|
|
111
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp";
|
|
112
|
+
static readonly PERMISSION = "schema.action.updateappointmentsalesapp.trigger";
|
|
113
|
+
/** Step metadata - entity this action targets */
|
|
114
|
+
static readonly STEP_ENTITY = "CrmModule:Appointment";
|
|
115
|
+
static readonly STEP_SCHEMA_ID = "aeb1234e-2c70-4ac2-9fe7-88273d700901";
|
|
116
|
+
static readonly STEP_SCHEMA_ACTION_ID = "918ee080-7103-4791-9a31-83d0fd4f6fa2";
|
|
117
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
118
|
+
readonly actionName: string;
|
|
119
|
+
readonly schemaActionId: string;
|
|
120
|
+
readonly entity: string;
|
|
121
|
+
constructor(record: OdinRecord<any> | {
|
|
122
|
+
id: string;
|
|
123
|
+
entity: string;
|
|
124
|
+
type?: string;
|
|
125
|
+
}, properties: UpdateAppointmentSalesAppProperties, options?: {
|
|
126
|
+
journeyId?: string;
|
|
127
|
+
stageKey?: string;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateAppointmentSalesApp Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Update Appointment in mobile app
|
|
6
|
+
*
|
|
7
|
+
* @module CrmModule
|
|
8
|
+
* @entity Appointment
|
|
9
|
+
* @actionKey UpdateAppointmentSalesApp
|
|
10
|
+
* @event k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UpdateAppointmentSalesAppDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* UpdateAppointmentSalesApp
|
|
19
|
+
*
|
|
20
|
+
* Update Appointment in mobile app
|
|
21
|
+
*
|
|
22
|
+
* @actionType UPDATE - Updates an existing Appointment record
|
|
23
|
+
* @module CrmModule
|
|
24
|
+
* @entity Appointment
|
|
25
|
+
* @event k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp
|
|
26
|
+
* @permission schema.action.updateappointmentsalesapp.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class UpdateAppointmentSalesAppDto extends core_1.OdinRecordUpdateDto {
|
|
30
|
+
constructor(record, properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
id: record.id,
|
|
33
|
+
entity: record.entity,
|
|
34
|
+
type: record.type,
|
|
35
|
+
properties,
|
|
36
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
37
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'UpdateAppointmentSalesApp';
|
|
40
|
+
this.schemaActionId = '918ee080-7103-4791-9a31-83d0fd4f6fa2';
|
|
41
|
+
this.entity = 'CrmModule:Appointment';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateAppointmentSalesAppDto = UpdateAppointmentSalesAppDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
UpdateAppointmentSalesAppDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
+
UpdateAppointmentSalesAppDto.ACTION_KEY = 'UpdateAppointmentSalesApp';
|
|
48
|
+
UpdateAppointmentSalesAppDto.MODULE_NAME = 'CrmModule';
|
|
49
|
+
UpdateAppointmentSalesAppDto.ENTITIES = ['Appointment'];
|
|
50
|
+
UpdateAppointmentSalesAppDto.EVENT_NAME = 'k1.t-hEOJjsDb.CrmModule.Appointment.Update.UpdateAppointmentSalesApp';
|
|
51
|
+
UpdateAppointmentSalesAppDto.PERMISSION = 'schema.action.updateappointmentsalesapp.trigger';
|
|
52
|
+
/** Step metadata - entity this action targets */
|
|
53
|
+
UpdateAppointmentSalesAppDto.STEP_ENTITY = 'CrmModule:Appointment';
|
|
54
|
+
UpdateAppointmentSalesAppDto.STEP_SCHEMA_ID = 'aeb1234e-2c70-4ac2-9fe7-88273d700901';
|
|
55
|
+
UpdateAppointmentSalesAppDto.STEP_SCHEMA_ACTION_ID = '918ee080-7103-4791-9a31-83d0fd4f6fa2';
|
|
56
|
+
UpdateAppointmentSalesAppDto.AUTO_LINK_PARENT = false;
|
|
@@ -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 { AiRouteRequestProperties } from '../entities-v2/AiRouteRequest';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinApiClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new AiRouteRequestApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.airouterequest.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AiRouteRequestApi 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<AiRouteRequestProperties>>>;
|
|
23
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AiRouteRequestProperties>>>;
|
|
24
|
+
reIndex(body: {
|
|
25
|
+
id: string;
|
|
26
|
+
schemaId: string;
|
|
27
|
+
}[]): Promise<any>;
|
|
28
|
+
get(aiRouteRequestId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiRouteRequestProperties>>;
|
|
29
|
+
getMany(aiRouteRequestIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiRouteRequestProperties>[]>;
|
|
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(aiRouteRequestId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
35
|
+
deleteMany(aiRouteRequestIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
36
|
+
restore(aiRouteRequestIds: 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.AiRouteRequestApi = 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 AiRouteRequestApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.airouterequest.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
22
|
+
*/
|
|
23
|
+
class AiRouteRequestApi 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 = 'SupportModule';
|
|
31
|
+
this.entityName = 'AiRouteRequest';
|
|
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(aiRouteRequestId) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, aiRouteRequestId);
|
|
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(aiRouteRequestIds) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, aiRouteRequestIds);
|
|
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(aiRouteRequestId) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._delete(this.moduleName, this.entityName, [aiRouteRequestId]);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to delete many records
|
|
115
|
+
deleteMany(aiRouteRequestIds) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._delete(this.moduleName, this.entityName, aiRouteRequestIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to restore one or many records
|
|
121
|
+
restore(aiRouteRequestIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._restore(this.moduleName, this.entityName, aiRouteRequestIds);
|
|
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.AiRouteRequestApi = AiRouteRequestApi;
|
|
@@ -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 { AiRouteRequestProperties } from '../entities-v2/AiRouteRequest';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use OdinDbClient.
|
|
6
|
+
*
|
|
7
|
+
* Migration:
|
|
8
|
+
* - Old: new AiRouteRequestApi(authParams).get(id)
|
|
9
|
+
* - New: new odin.airouterequest.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 AiRouteRequestDb(principal, dbService, { omitPermissionsCheck: true })
|
|
15
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
16
|
+
*/
|
|
17
|
+
export declare class AiRouteRequestDb 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<AiRouteRequestProperties>>>;
|
|
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<AiRouteRequestProperties>>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a single record by primary key
|
|
39
|
+
* @param aiRouteRequestId - 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(aiRouteRequestId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiRouteRequestProperties>>;
|
|
57
|
+
/**
|
|
58
|
+
* Get multiple records by primary keys
|
|
59
|
+
* @param aiRouteRequestIds - Array of record IDs
|
|
60
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
61
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
62
|
+
*/
|
|
63
|
+
getManyByPrimaryKey(aiRouteRequestIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiRouteRequestProperties>[]>;
|
|
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-types/dist/core").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-types/dist/core").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-types/dist/core").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-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete one or many records
|
|
90
|
+
* @param aiRouteRequestIds - Record IDs to delete
|
|
91
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
92
|
+
*/
|
|
93
|
+
delete(aiRouteRequestIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Restore one or many deleted records
|
|
96
|
+
* @param aiRouteRequestIds - Record IDs to restore
|
|
97
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
98
|
+
*/
|
|
99
|
+
restore(aiRouteRequestIds: 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-types/dist/core").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
|
+
}
|