@d19n/youfibre-odin-sdk 2.0.338 → 2.0.340
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 +10 -2
- package/dist/EntityRegistry.d.ts +2 -0
- package/dist/EntityRegistry.js +2 -0
- package/dist/OdinApiClient.d.ts +4 -0
- package/dist/OdinApiClient.js +8 -0
- package/dist/OdinDbClient.d.ts +4 -0
- package/dist/OdinDbClient.js +8 -0
- package/dist/accessors-v2/AiRouteRequestAccessor.d.ts +112 -0
- package/dist/accessors-v2/AiRouteRequestAccessor.js +191 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +5 -3
- package/dist/actions-v2/CreateAiRouteRequestDto.d.ts +165 -0
- package/dist/actions-v2/CreateAiRouteRequestDto.js +57 -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-accessors-v2/AiRouteRequestDbAccessor.d.ts +180 -0
- package/dist/db-accessors-v2/AiRouteRequestDbAccessor.js +265 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +5 -3
- 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/records-v2/AiRouteRequestRecord.d.ts +186 -0
- package/dist/records-v2/AiRouteRequestRecord.js +245 -0
- package/dist/records-v2/AppointmentRecord.d.ts +28 -0
- package/dist/records-v2/AppointmentRecord.js +40 -0
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +8 -4
- package/package.json +1 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateAiRouteRequest Action DTO
|
|
3
|
+
*
|
|
4
|
+
* CreateAiRouteRequest
|
|
5
|
+
*
|
|
6
|
+
* @module SupportModule
|
|
7
|
+
* @entity AiRouteRequest
|
|
8
|
+
* @entityType DEFAULT
|
|
9
|
+
* @actionKey CreateAiRouteRequest
|
|
10
|
+
* @event k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
/**
|
|
16
|
+
* RabbitMQ message payload for CreateAiRouteRequest created events
|
|
17
|
+
*
|
|
18
|
+
* @event k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest
|
|
19
|
+
*/
|
|
20
|
+
export interface CreateAiRouteRequestMessage extends OdinRecordCreatedEvent<CreateAiRouteRequestDto, CreateAiRouteRequestProperties> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties for CreateAiRouteRequest action
|
|
24
|
+
*
|
|
25
|
+
* @property Required fields: 4
|
|
26
|
+
* @property Optional fields: 10
|
|
27
|
+
*/
|
|
28
|
+
export interface CreateAiRouteRequestProperties {
|
|
29
|
+
/**
|
|
30
|
+
* Feature
|
|
31
|
+
*
|
|
32
|
+
* Which AI feature made the request.
|
|
33
|
+
* @type {ENUM}
|
|
34
|
+
* @required
|
|
35
|
+
*/
|
|
36
|
+
Feature: string;
|
|
37
|
+
/**
|
|
38
|
+
* Provider
|
|
39
|
+
*
|
|
40
|
+
* The model that answered: qwen (Kattuz) or databricks.
|
|
41
|
+
* @type {ENUM}
|
|
42
|
+
* @required
|
|
43
|
+
*/
|
|
44
|
+
Provider: string;
|
|
45
|
+
/**
|
|
46
|
+
* Outcome
|
|
47
|
+
*
|
|
48
|
+
* ok when the provider answered and the reply passed its check; failed after the last try.
|
|
49
|
+
* @type {ENUM}
|
|
50
|
+
* @required
|
|
51
|
+
*/
|
|
52
|
+
Outcome: string;
|
|
53
|
+
/**
|
|
54
|
+
* Started at
|
|
55
|
+
*
|
|
56
|
+
* When the router started the request. The record is written a few hundred milliseconds later.
|
|
57
|
+
* @type {DATE_TIME}
|
|
58
|
+
* @required
|
|
59
|
+
*/
|
|
60
|
+
StartedAt: string;
|
|
61
|
+
/**
|
|
62
|
+
* Routing reason
|
|
63
|
+
*
|
|
64
|
+
* split: the 50/50 counter chose. Otherwise why the split was skipped and Databricks answered: config-off, config-unreadable, redis-unavailable, too-large (prompt over the Qwen size guard).
|
|
65
|
+
* @type {ENUM}
|
|
66
|
+
*/
|
|
67
|
+
Reason?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Counter
|
|
70
|
+
*
|
|
71
|
+
* The per-feature counter value this request drew (odd = qwen, even = databricks). Empty when the split was skipped.
|
|
72
|
+
* @type {NUMBER}
|
|
73
|
+
*/
|
|
74
|
+
Count?: number | null;
|
|
75
|
+
/**
|
|
76
|
+
* Attempts
|
|
77
|
+
*
|
|
78
|
+
* 1 for Databricks; 1 to 6 for Qwen (one try plus up to five retries).
|
|
79
|
+
* @type {NUMBER}
|
|
80
|
+
*/
|
|
81
|
+
Attempts?: number | null;
|
|
82
|
+
/**
|
|
83
|
+
* Latency (ms)
|
|
84
|
+
*
|
|
85
|
+
* Wall time of the whole request including retries, in milliseconds.
|
|
86
|
+
* @type {NUMBER}
|
|
87
|
+
*/
|
|
88
|
+
LatencyMs?: number | null;
|
|
89
|
+
/**
|
|
90
|
+
* On screen
|
|
91
|
+
*
|
|
92
|
+
* true for a request a person is waiting for (one Qwen try); false for background work (retried).
|
|
93
|
+
* @type {BOOLEAN}
|
|
94
|
+
*/
|
|
95
|
+
OnScreen?: boolean | null;
|
|
96
|
+
/**
|
|
97
|
+
* Prompt size (chars)
|
|
98
|
+
*
|
|
99
|
+
* Characters sent to the model. Filled for Qwen turns; empty for Databricks turns until the proxy reports it.
|
|
100
|
+
* @type {NUMBER}
|
|
101
|
+
*/
|
|
102
|
+
PromptChars?: number | null;
|
|
103
|
+
/**
|
|
104
|
+
* Model used
|
|
105
|
+
*
|
|
106
|
+
* llm_endpoint_used from the result, e.g. Qwen3.8-27B-FP8 or system.ai.gpt-5-4-nano. Empty on failure.
|
|
107
|
+
* @type {TEXT}
|
|
108
|
+
*/
|
|
109
|
+
ModelUsed?: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* Error
|
|
112
|
+
*
|
|
113
|
+
* First 500 characters of the failure message. Empty on success.
|
|
114
|
+
* @type {TEXT}
|
|
115
|
+
*/
|
|
116
|
+
ErrorMessage?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Journey entity
|
|
119
|
+
*
|
|
120
|
+
* Case or Conversation.
|
|
121
|
+
* @type {TEXT}
|
|
122
|
+
*/
|
|
123
|
+
JourneyEntity?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* Journey id
|
|
126
|
+
*
|
|
127
|
+
* Id of the case or conversation the request was for. Links the row back to the record.
|
|
128
|
+
* @type {TEXT}
|
|
129
|
+
*/
|
|
130
|
+
JourneyId?: string | null;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* CreateAiRouteRequest
|
|
134
|
+
*
|
|
135
|
+
* @actionType CREATE - Creates a new AiRouteRequest record
|
|
136
|
+
* @module SupportModule
|
|
137
|
+
* @entity AiRouteRequest
|
|
138
|
+
* @entityType DEFAULT (Default)
|
|
139
|
+
* @event k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest
|
|
140
|
+
* @permission schema.action.createairouterequest.trigger
|
|
141
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
142
|
+
*/
|
|
143
|
+
export declare class CreateAiRouteRequestDto extends OdinRecordCreateDto<CreateAiRouteRequestProperties> {
|
|
144
|
+
/** Used by SDK generators to identify action type */
|
|
145
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
146
|
+
static readonly ACTION_KEY = "CreateAiRouteRequest";
|
|
147
|
+
static readonly MODULE_NAME = "SupportModule";
|
|
148
|
+
static readonly ENTITIES: string[];
|
|
149
|
+
static readonly ENTITY_TYPE = "DEFAULT";
|
|
150
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest";
|
|
151
|
+
static readonly PERMISSION = "schema.action.createairouterequest.trigger";
|
|
152
|
+
/** Step metadata - entity this action targets */
|
|
153
|
+
static readonly STEP_ENTITY = "SupportModule:AiRouteRequest";
|
|
154
|
+
static readonly STEP_SCHEMA_ID = "6e672d1d-d7c4-401d-8bcc-042b208664d6";
|
|
155
|
+
static readonly STEP_SCHEMA_ACTION_ID = "c1d7f43c-d918-4f4f-9465-123a54988fc4";
|
|
156
|
+
static readonly STEP_SCHEMA_TYPE_ID = "9248c8dc-39e4-48d9-81ea-3816da8b7cf1";
|
|
157
|
+
static readonly STEP_TYPE = "DEFAULT";
|
|
158
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
159
|
+
readonly actionName: string;
|
|
160
|
+
readonly schemaActionId: string;
|
|
161
|
+
readonly entity: string;
|
|
162
|
+
constructor(properties: CreateAiRouteRequestProperties, options?: {
|
|
163
|
+
journeyId?: string;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateAiRouteRequest Action DTO
|
|
4
|
+
*
|
|
5
|
+
* CreateAiRouteRequest
|
|
6
|
+
*
|
|
7
|
+
* @module SupportModule
|
|
8
|
+
* @entity AiRouteRequest
|
|
9
|
+
* @entityType DEFAULT
|
|
10
|
+
* @actionKey CreateAiRouteRequest
|
|
11
|
+
* @event k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateAiRouteRequestDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* CreateAiRouteRequest
|
|
20
|
+
*
|
|
21
|
+
* @actionType CREATE - Creates a new AiRouteRequest record
|
|
22
|
+
* @module SupportModule
|
|
23
|
+
* @entity AiRouteRequest
|
|
24
|
+
* @entityType DEFAULT (Default)
|
|
25
|
+
* @event k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest
|
|
26
|
+
* @permission schema.action.createairouterequest.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class CreateAiRouteRequestDto extends core_1.OdinRecordCreateDto {
|
|
30
|
+
constructor(properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
entity: 'SupportModule:AiRouteRequest',
|
|
33
|
+
type: 'DEFAULT',
|
|
34
|
+
properties,
|
|
35
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
36
|
+
});
|
|
37
|
+
this.actionName = 'CreateAiRouteRequest';
|
|
38
|
+
this.schemaActionId = 'c1d7f43c-d918-4f4f-9465-123a54988fc4';
|
|
39
|
+
this.entity = 'SupportModule:AiRouteRequest';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CreateAiRouteRequestDto = CreateAiRouteRequestDto;
|
|
43
|
+
/** Used by SDK generators to identify action type */
|
|
44
|
+
CreateAiRouteRequestDto.ACTION_TYPE = 'CREATE';
|
|
45
|
+
CreateAiRouteRequestDto.ACTION_KEY = 'CreateAiRouteRequest';
|
|
46
|
+
CreateAiRouteRequestDto.MODULE_NAME = 'SupportModule';
|
|
47
|
+
CreateAiRouteRequestDto.ENTITIES = ['AiRouteRequest'];
|
|
48
|
+
CreateAiRouteRequestDto.ENTITY_TYPE = 'DEFAULT';
|
|
49
|
+
CreateAiRouteRequestDto.EVENT_NAME = 'k1.t-hEOJjsDb.SupportModule.AiRouteRequest.Create.CreateAiRouteRequest';
|
|
50
|
+
CreateAiRouteRequestDto.PERMISSION = 'schema.action.createairouterequest.trigger';
|
|
51
|
+
/** Step metadata - entity this action targets */
|
|
52
|
+
CreateAiRouteRequestDto.STEP_ENTITY = 'SupportModule:AiRouteRequest';
|
|
53
|
+
CreateAiRouteRequestDto.STEP_SCHEMA_ID = '6e672d1d-d7c4-401d-8bcc-042b208664d6';
|
|
54
|
+
CreateAiRouteRequestDto.STEP_SCHEMA_ACTION_ID = 'c1d7f43c-d918-4f4f-9465-123a54988fc4';
|
|
55
|
+
CreateAiRouteRequestDto.STEP_SCHEMA_TYPE_ID = '9248c8dc-39e4-48d9-81ea-3816da8b7cf1';
|
|
56
|
+
CreateAiRouteRequestDto.STEP_TYPE = 'DEFAULT';
|
|
57
|
+
CreateAiRouteRequestDto.AUTO_LINK_PARENT = true;
|
|
@@ -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;
|