@d19n/youfibre-odin-sdk 2.0.288 → 2.0.290

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 CHANGED
@@ -124,7 +124,7 @@ await workOrder.completeWorkOrder({ ... });
124
124
 
125
125
  ## Entities
126
126
 
127
- This SDK includes **178** entities across **12** modules.
127
+ This SDK includes **180** entities across **12** modules.
128
128
 
129
129
  ### CrmModule
130
130
 
@@ -199,6 +199,28 @@ This SDK includes **178** entities across **12** modules.
199
199
  | **PgWebhook** | PgWebhook Entity Definition | DEFAULT |
200
200
  | **PgWebhookAttempt** | PgWebhookAttempt Entity Definition | DEFAULT |
201
201
 
202
+ ### SupportModule
203
+
204
+ | Entity | Description | Types |
205
+ |--------|-------------|-------|
206
+ | **AgentStatus** | AgentStatus Entity Definition | DEFAULT |
207
+ | **AgentStatusHistory** | AgentStatusHistory Entity Definition | DEFAULT |
208
+ | **Case** | Case Entity Definition | OUTAGE |
209
+ | **CaseAction** | CaseAction Entity Definition | DEFAULT |
210
+ | **CaseQueueListView** | CaseQueueListView Entity Definition | DEFAULT |
211
+ | **KnowledgeArticle** | KnowledgeArticle Entity Definition | RELEASE_NOTE, USER_GUIDE |
212
+ | **LinearIssue** | LinearIssue Entity Definition | DEFAULT |
213
+ | **Note** | Note Entity Definition | DEFAULT |
214
+ | **OutboundDialCampaign** | OutboundDialCampaign Entity Definition | DEFAULT |
215
+ | **OutboundDialCampaignCase** | OutboundDialCampaignCase Entity Definition | DEFAULT |
216
+ | **OutboundDialSession** | OutboundDialSession Entity Definition | DEFAULT |
217
+ | **Queue** | Queue Entity Definition | DEFAULT |
218
+ | **QueueChange** | QueueChange Entity Definition | DEFAULT |
219
+ | **SupportTask** | SupportTask Entity Definition | DEFAULT |
220
+ | **TwilioActivity** | TwilioActivity Entity Definition | DEFAULT |
221
+ | **TwilioTaskQueue** | TwilioTaskQueue Entity Definition | DEFAULT |
222
+ | **TwilioWorker** | TwilioWorker Entity Definition | DEFAULT |
223
+
202
224
  ### OrderModule
203
225
 
204
226
  | Entity | Description | Types |
@@ -308,26 +330,6 @@ This SDK includes **178** entities across **12** modules.
308
330
  | **TwilioCallEvent** | TwilioCallEvent Entity Definition | CALL_RECORDING_EVENT, INBOUND_CALL_EVENT, OUTBOUND_CALL_EVENT... |
309
331
  | **TwilioUserUpdate** | TwilioUserUpdate Entity Definition | DEFAULT |
310
332
 
311
- ### SupportModule
312
-
313
- | Entity | Description | Types |
314
- |--------|-------------|-------|
315
- | **Case** | Case Entity Definition | OUTAGE |
316
- | **CaseAction** | CaseAction Entity Definition | DEFAULT |
317
- | **CaseQueueListView** | CaseQueueListView Entity Definition | DEFAULT |
318
- | **KnowledgeArticle** | KnowledgeArticle Entity Definition | RELEASE_NOTE, USER_GUIDE |
319
- | **LinearIssue** | LinearIssue Entity Definition | DEFAULT |
320
- | **Note** | Note Entity Definition | DEFAULT |
321
- | **OutboundDialCampaign** | OutboundDialCampaign Entity Definition | DEFAULT |
322
- | **OutboundDialCampaignCase** | OutboundDialCampaignCase Entity Definition | DEFAULT |
323
- | **OutboundDialSession** | OutboundDialSession Entity Definition | DEFAULT |
324
- | **Queue** | Queue Entity Definition | DEFAULT |
325
- | **QueueChange** | QueueChange Entity Definition | DEFAULT |
326
- | **SupportTask** | SupportTask Entity Definition | DEFAULT |
327
- | **TwilioActivity** | TwilioActivity Entity Definition | DEFAULT |
328
- | **TwilioTaskQueue** | TwilioTaskQueue Entity Definition | DEFAULT |
329
- | **TwilioWorker** | TwilioWorker Entity Definition | DEFAULT |
330
-
331
333
  ### ProductModule
332
334
 
333
335
  | Entity | Description | Types |
@@ -366,7 +368,7 @@ This SDK includes **178** entities across **12** modules.
366
368
 
367
369
  ## Actions
368
370
 
369
- This SDK includes **848** actions.
371
+ This SDK includes **849** actions.
370
372
 
371
373
  ### Action Types
372
374
 
@@ -837,6 +839,7 @@ This SDK includes **848** actions.
837
839
  |--------|------|-------|
838
840
  | `AddCaseAdditionalNotes` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.AddCaseAdditionalNotes |
839
841
  | `AllowCsatForCase` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.AllowCsatForCase |
842
+ | `AssignAutoResolutionStatus` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus |
840
843
  | `AssignCaseByUser` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.AssignCaseByUser |
841
844
  | `AssignCase` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.AssignCase |
842
845
  | `AssignCaseTransition` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Flow.AssignCaseTransition |
@@ -0,0 +1,73 @@
1
+ /**
2
+ * AssignAutoResolutionStatus Action DTO
3
+ *
4
+ * Writes the auto-resolution bot working state onto a case. Fired from the Case.SubDbRecordUpdated subscriber when isNewBotAssignment() detects OwnerId was just set to the bot user (CORE-991).
5
+ *
6
+ * @module SupportModule
7
+ * @entity Case
8
+ * @actionKey AssignAutoResolutionStatus
9
+ * @event k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus
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 AssignAutoResolutionStatus updated events
16
+ *
17
+ * @event k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus
18
+ */
19
+ export interface AssignAutoResolutionStatusMessage extends OdinRecordUpdatedEvent<AssignAutoResolutionStatusDto, AssignAutoResolutionStatusProperties> {
20
+ }
21
+ /**
22
+ * Properties for AssignAutoResolutionStatus action
23
+ *
24
+ * @property Required fields: 1
25
+ * @property Optional fields: 0
26
+ */
27
+ export interface AssignAutoResolutionStatusProperties {
28
+ /**
29
+ * Auto resolution status
30
+ *
31
+ * State of the auto-resolution bot working this case, set when an agent assigns OwnerId to the bot user (CORE-991).
32
+ * @type {ENUM}
33
+ * @required
34
+ */
35
+ AutoResolutionStatus: string;
36
+ }
37
+ /**
38
+ * Set the auto-resolution bot status
39
+ *
40
+ * Writes the auto-resolution bot working state onto a case. Fired from the Case.SubDbRecordUpdated subscriber when isNewBotAssignment() detects OwnerId was just set to the bot user (CORE-991).
41
+ *
42
+ * @actionType UPDATE - Updates an existing Case record
43
+ * @module SupportModule
44
+ * @entity Case
45
+ * @event k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus
46
+ * @permission schema.action.assignautoresolutionstatus.trigger
47
+ * @benchmark This action is tracked for performance benchmarks
48
+ */
49
+ export declare class AssignAutoResolutionStatusDto extends OdinRecordUpdateDto<AssignAutoResolutionStatusProperties> {
50
+ /** Used by SDK generators to identify action type */
51
+ static readonly ACTION_TYPE = "UPDATE";
52
+ static readonly ACTION_KEY = "AssignAutoResolutionStatus";
53
+ static readonly MODULE_NAME = "SupportModule";
54
+ static readonly ENTITIES: string[];
55
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus";
56
+ static readonly PERMISSION = "schema.action.assignautoresolutionstatus.trigger";
57
+ /** Step metadata - entity this action targets */
58
+ static readonly STEP_ENTITY = "SupportModule:Case";
59
+ static readonly STEP_SCHEMA_ID = "bb540d25-53bf-491b-9d03-f3d42f755b3a";
60
+ static readonly STEP_SCHEMA_ACTION_ID = "7f1af080-97ae-4fb7-ace0-7b49d8d58580";
61
+ static readonly AUTO_LINK_PARENT = false;
62
+ readonly actionName: string;
63
+ readonly schemaActionId: string;
64
+ readonly entity: string;
65
+ constructor(record: OdinRecord<any> | {
66
+ id: string;
67
+ entity: string;
68
+ type?: string;
69
+ }, properties: AssignAutoResolutionStatusProperties, options?: {
70
+ journeyId?: string;
71
+ stageKey?: string;
72
+ });
73
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * AssignAutoResolutionStatus Action DTO
4
+ *
5
+ * Writes the auto-resolution bot working state onto a case. Fired from the Case.SubDbRecordUpdated subscriber when isNewBotAssignment() detects OwnerId was just set to the bot user (CORE-991).
6
+ *
7
+ * @module SupportModule
8
+ * @entity Case
9
+ * @actionKey AssignAutoResolutionStatus
10
+ * @event k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AssignAutoResolutionStatusDto = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * Set the auto-resolution bot status
19
+ *
20
+ * Writes the auto-resolution bot working state onto a case. Fired from the Case.SubDbRecordUpdated subscriber when isNewBotAssignment() detects OwnerId was just set to the bot user (CORE-991).
21
+ *
22
+ * @actionType UPDATE - Updates an existing Case record
23
+ * @module SupportModule
24
+ * @entity Case
25
+ * @event k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus
26
+ * @permission schema.action.assignautoresolutionstatus.trigger
27
+ * @benchmark This action is tracked for performance benchmarks
28
+ */
29
+ class AssignAutoResolutionStatusDto 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 = 'AssignAutoResolutionStatus';
40
+ this.schemaActionId = '7f1af080-97ae-4fb7-ace0-7b49d8d58580';
41
+ this.entity = 'SupportModule:Case';
42
+ }
43
+ }
44
+ exports.AssignAutoResolutionStatusDto = AssignAutoResolutionStatusDto;
45
+ /** Used by SDK generators to identify action type */
46
+ AssignAutoResolutionStatusDto.ACTION_TYPE = 'UPDATE';
47
+ AssignAutoResolutionStatusDto.ACTION_KEY = 'AssignAutoResolutionStatus';
48
+ AssignAutoResolutionStatusDto.MODULE_NAME = 'SupportModule';
49
+ AssignAutoResolutionStatusDto.ENTITIES = ['Case'];
50
+ AssignAutoResolutionStatusDto.EVENT_NAME = 'k1.t-hEOJjsDb.SupportModule.Case.Update.AssignAutoResolutionStatus';
51
+ AssignAutoResolutionStatusDto.PERMISSION = 'schema.action.assignautoresolutionstatus.trigger';
52
+ /** Step metadata - entity this action targets */
53
+ AssignAutoResolutionStatusDto.STEP_ENTITY = 'SupportModule:Case';
54
+ AssignAutoResolutionStatusDto.STEP_SCHEMA_ID = 'bb540d25-53bf-491b-9d03-f3d42f755b3a';
55
+ AssignAutoResolutionStatusDto.STEP_SCHEMA_ACTION_ID = '7f1af080-97ae-4fb7-ace0-7b49d8d58580';
56
+ AssignAutoResolutionStatusDto.AUTO_LINK_PARENT = false;
@@ -0,0 +1,48 @@
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 { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
5
+ import { AgentStatusProperties } from '../entities-v2/AgentStatus';
6
+ /**
7
+ * @deprecated Use OdinApiClient.
8
+ *
9
+ * Migration:
10
+ * - Old: new AgentStatusApi(authParams).get(id)
11
+ * - New: new odin.agentstatus.get(id)
12
+ *
13
+ * The new OdinApiClient returns typed record wrappers with action methods.
14
+ */
15
+ export declare class AgentStatusApi extends ApiProvider {
16
+ protected readonly authToken?: string;
17
+ private readonly moduleName;
18
+ private readonly entityName;
19
+ private sourceRecord;
20
+ private _user?;
21
+ constructor(authParams?: OauthParams, authToken?: string);
22
+ get user(): ApiRecordLinkManager;
23
+ setRecord(sourceRecord: any): void;
24
+ schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
25
+ search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusProperties>>>;
26
+ searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusProperties>>>;
27
+ reIndex(body: {
28
+ id: string;
29
+ schemaId: string;
30
+ }[]): Promise<any>;
31
+ get(agentStatusId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusProperties>>;
32
+ getMany(agentStatusIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusProperties>[]>;
33
+ upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
34
+ upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
35
+ update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
36
+ updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
37
+ delete(agentStatusId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
38
+ deleteMany(agentStatusIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
39
+ restore(agentStatusIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
40
+ applyAction(dto: any): Promise<any[]>;
41
+ bulkApplyActions(dtos: any[]): Promise<any[]>;
42
+ getVersions(): Promise<{
43
+ [key: string]: Record<string, any>;
44
+ }>;
45
+ getRevisionTimeline(): Promise<{
46
+ [key: string]: Record<string, any>[];
47
+ }>;
48
+ }
@@ -0,0 +1,155 @@
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.AgentStatusApi = void 0;
13
+ const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
14
+ const api_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/api.record.link.manager");
15
+ /**
16
+ * @deprecated Use OdinApiClient.
17
+ *
18
+ * Migration:
19
+ * - Old: new AgentStatusApi(authParams).get(id)
20
+ * - New: new odin.agentstatus.get(id)
21
+ *
22
+ * The new OdinApiClient returns typed record wrappers with action methods.
23
+ */
24
+ class AgentStatusApi extends api_provider_1.ApiProvider {
25
+ constructor(authParams, authToken) {
26
+ super(authParams, authToken);
27
+ this.authToken = authToken;
28
+ this.moduleName = 'SupportModule';
29
+ this.entityName = 'AgentStatus';
30
+ // Link managers are lazy-loaded on first access
31
+ }
32
+ // ============================================
33
+ // LAZY-LOADED LINK MANAGERS (Public Getters)
34
+ // ============================================
35
+ // Usage remains identical: api.address.list(recordId)
36
+ get user() {
37
+ if (!this._user) {
38
+ this._user = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:AgentStatus', 'IdentityModule:User', 'AgentStatus__User');
39
+ }
40
+ return this._user;
41
+ }
42
+ // ============================================
43
+ // STANDARD METHODS (Unchanged API)
44
+ // ============================================
45
+ setRecord(sourceRecord) {
46
+ this.sourceRecord = sourceRecord;
47
+ }
48
+ schema() {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ return yield this.getSchema(this.moduleName, this.entityName);
51
+ });
52
+ }
53
+ // Use this function when you want to search and handle all pagination on your own
54
+ search(params) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ return yield this._searchRecords(this.moduleName, this.entityName, params);
57
+ });
58
+ }
59
+ // Use this function when you want paginating through the results to be handled
60
+ searchAndPaginate(params) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
63
+ });
64
+ }
65
+ // Use this function to re-index records in elastic search
66
+ reIndex(body) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return yield this._reIndexRecords(body);
69
+ });
70
+ }
71
+ // Use this function when you want to return a single record
72
+ get(agentStatusId) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, agentStatusId);
75
+ if (res)
76
+ this.setRecord(res);
77
+ return res;
78
+ });
79
+ }
80
+ // Use this function when you want to return many records by primaryKeys
81
+ getMany(agentStatusIds) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, agentStatusIds);
84
+ });
85
+ }
86
+ // Use this function when you want to upsert one record
87
+ upsert(upsertDto) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
90
+ return res[0];
91
+ });
92
+ }
93
+ // Use this function when you want to upsert many records
94
+ upsertMany(upsertDtos) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
97
+ });
98
+ }
99
+ // Use this function when you want to update one record
100
+ update(updateDto) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
103
+ return res[0];
104
+ });
105
+ }
106
+ // Use this function when you want to update many records
107
+ updateMany(updateDtos) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ return yield this._update(this.moduleName, this.entityName, updateDtos);
110
+ });
111
+ }
112
+ // Use this function when you want to delete one record
113
+ delete(agentStatusId) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ return yield this._delete(this.moduleName, this.entityName, [agentStatusId]);
116
+ });
117
+ }
118
+ // Use this function when you want to delete many records
119
+ deleteMany(agentStatusIds) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ return yield this._delete(this.moduleName, this.entityName, agentStatusIds);
122
+ });
123
+ }
124
+ // Use this function when you want to restore one or many records
125
+ restore(agentStatusIds) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ return yield this._restore(this.moduleName, this.entityName, agentStatusIds);
128
+ });
129
+ }
130
+ // Use this function when you want to apply a single action
131
+ applyAction(dto) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ return yield this._applyAction(this.moduleName, this.entityName, dto);
134
+ });
135
+ }
136
+ // Use this function when you want to bulk apply actions
137
+ bulkApplyActions(dtos) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
140
+ });
141
+ }
142
+ // Use this function when you want to return the versions for a single record
143
+ getVersions() {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
146
+ });
147
+ }
148
+ // Use this function when you want to return the change history for a single record
149
+ getRevisionTimeline() {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
152
+ });
153
+ }
154
+ }
155
+ exports.AgentStatusApi = AgentStatusApi;
@@ -0,0 +1,48 @@
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 { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
5
+ import { AgentStatusHistoryProperties } from '../entities-v2/AgentStatusHistory';
6
+ /**
7
+ * @deprecated Use OdinApiClient.
8
+ *
9
+ * Migration:
10
+ * - Old: new AgentStatusHistoryApi(authParams).get(id)
11
+ * - New: new odin.agentstatushistory.get(id)
12
+ *
13
+ * The new OdinApiClient returns typed record wrappers with action methods.
14
+ */
15
+ export declare class AgentStatusHistoryApi extends ApiProvider {
16
+ protected readonly authToken?: string;
17
+ private readonly moduleName;
18
+ private readonly entityName;
19
+ private sourceRecord;
20
+ private _user?;
21
+ constructor(authParams?: OauthParams, authToken?: string);
22
+ get user(): ApiRecordLinkManager;
23
+ setRecord(sourceRecord: any): void;
24
+ schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
25
+ search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusHistoryProperties>>>;
26
+ searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusHistoryProperties>>>;
27
+ reIndex(body: {
28
+ id: string;
29
+ schemaId: string;
30
+ }[]): Promise<any>;
31
+ get(agentStatusHistoryId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusHistoryProperties>>;
32
+ getMany(agentStatusHistoryIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AgentStatusHistoryProperties>[]>;
33
+ upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
34
+ upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
35
+ update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
36
+ updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
37
+ delete(agentStatusHistoryId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
38
+ deleteMany(agentStatusHistoryIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
39
+ restore(agentStatusHistoryIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
40
+ applyAction(dto: any): Promise<any[]>;
41
+ bulkApplyActions(dtos: any[]): Promise<any[]>;
42
+ getVersions(): Promise<{
43
+ [key: string]: Record<string, any>;
44
+ }>;
45
+ getRevisionTimeline(): Promise<{
46
+ [key: string]: Record<string, any>[];
47
+ }>;
48
+ }
@@ -0,0 +1,155 @@
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.AgentStatusHistoryApi = void 0;
13
+ const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
14
+ const api_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/api.record.link.manager");
15
+ /**
16
+ * @deprecated Use OdinApiClient.
17
+ *
18
+ * Migration:
19
+ * - Old: new AgentStatusHistoryApi(authParams).get(id)
20
+ * - New: new odin.agentstatushistory.get(id)
21
+ *
22
+ * The new OdinApiClient returns typed record wrappers with action methods.
23
+ */
24
+ class AgentStatusHistoryApi extends api_provider_1.ApiProvider {
25
+ constructor(authParams, authToken) {
26
+ super(authParams, authToken);
27
+ this.authToken = authToken;
28
+ this.moduleName = 'SupportModule';
29
+ this.entityName = 'AgentStatusHistory';
30
+ // Link managers are lazy-loaded on first access
31
+ }
32
+ // ============================================
33
+ // LAZY-LOADED LINK MANAGERS (Public Getters)
34
+ // ============================================
35
+ // Usage remains identical: api.address.list(recordId)
36
+ get user() {
37
+ if (!this._user) {
38
+ this._user = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:AgentStatusHistory', 'IdentityModule:User', 'AgentStatusHistory__User');
39
+ }
40
+ return this._user;
41
+ }
42
+ // ============================================
43
+ // STANDARD METHODS (Unchanged API)
44
+ // ============================================
45
+ setRecord(sourceRecord) {
46
+ this.sourceRecord = sourceRecord;
47
+ }
48
+ schema() {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ return yield this.getSchema(this.moduleName, this.entityName);
51
+ });
52
+ }
53
+ // Use this function when you want to search and handle all pagination on your own
54
+ search(params) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ return yield this._searchRecords(this.moduleName, this.entityName, params);
57
+ });
58
+ }
59
+ // Use this function when you want paginating through the results to be handled
60
+ searchAndPaginate(params) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
63
+ });
64
+ }
65
+ // Use this function to re-index records in elastic search
66
+ reIndex(body) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return yield this._reIndexRecords(body);
69
+ });
70
+ }
71
+ // Use this function when you want to return a single record
72
+ get(agentStatusHistoryId) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, agentStatusHistoryId);
75
+ if (res)
76
+ this.setRecord(res);
77
+ return res;
78
+ });
79
+ }
80
+ // Use this function when you want to return many records by primaryKeys
81
+ getMany(agentStatusHistoryIds) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, agentStatusHistoryIds);
84
+ });
85
+ }
86
+ // Use this function when you want to upsert one record
87
+ upsert(upsertDto) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
90
+ return res[0];
91
+ });
92
+ }
93
+ // Use this function when you want to upsert many records
94
+ upsertMany(upsertDtos) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
97
+ });
98
+ }
99
+ // Use this function when you want to update one record
100
+ update(updateDto) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
103
+ return res[0];
104
+ });
105
+ }
106
+ // Use this function when you want to update many records
107
+ updateMany(updateDtos) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ return yield this._update(this.moduleName, this.entityName, updateDtos);
110
+ });
111
+ }
112
+ // Use this function when you want to delete one record
113
+ delete(agentStatusHistoryId) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ return yield this._delete(this.moduleName, this.entityName, [agentStatusHistoryId]);
116
+ });
117
+ }
118
+ // Use this function when you want to delete many records
119
+ deleteMany(agentStatusHistoryIds) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ return yield this._delete(this.moduleName, this.entityName, agentStatusHistoryIds);
122
+ });
123
+ }
124
+ // Use this function when you want to restore one or many records
125
+ restore(agentStatusHistoryIds) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ return yield this._restore(this.moduleName, this.entityName, agentStatusHistoryIds);
128
+ });
129
+ }
130
+ // Use this function when you want to apply a single action
131
+ applyAction(dto) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ return yield this._applyAction(this.moduleName, this.entityName, dto);
134
+ });
135
+ }
136
+ // Use this function when you want to bulk apply actions
137
+ bulkApplyActions(dtos) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
140
+ });
141
+ }
142
+ // Use this function when you want to return the versions for a single record
143
+ getVersions() {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
146
+ });
147
+ }
148
+ // Use this function when you want to return the change history for a single record
149
+ getRevisionTimeline() {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
152
+ });
153
+ }
154
+ }
155
+ exports.AgentStatusHistoryApi = AgentStatusHistoryApi;
@@ -46,6 +46,8 @@ export declare class UserApi extends ApiProvider {
46
46
  private _twilioworker?;
47
47
  private _outbounddialcampaign?;
48
48
  private _outbounddialsession?;
49
+ private _agentstatus?;
50
+ private _agentstatushistory?;
49
51
  constructor(authParams?: OauthParams, authToken?: string);
50
52
  get blockagea55(): ApiRecordLinkManager;
51
53
  get timeslot(): ApiRecordLinkManager;
@@ -76,6 +78,8 @@ export declare class UserApi extends ApiProvider {
76
78
  get twilioworker(): ApiRecordLinkManager;
77
79
  get outbounddialcampaign(): ApiRecordLinkManager;
78
80
  get outbounddialsession(): ApiRecordLinkManager;
81
+ get agentstatus(): ApiRecordLinkManager;
82
+ get agentstatushistory(): ApiRecordLinkManager;
79
83
  setRecord(sourceRecord: any): void;
80
84
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
81
85
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<UserProperties>>>;
@@ -207,6 +207,18 @@ class UserApi extends api_provider_1.ApiProvider {
207
207
  }
208
208
  return this._outbounddialsession;
209
209
  }
210
+ get agentstatus() {
211
+ if (!this._agentstatus) {
212
+ this._agentstatus = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'SupportModule:AgentStatus', 'AgentStatus__User');
213
+ }
214
+ return this._agentstatus;
215
+ }
216
+ get agentstatushistory() {
217
+ if (!this._agentstatushistory) {
218
+ this._agentstatushistory = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'IdentityModule:User', 'SupportModule:AgentStatusHistory', 'AgentStatusHistory__User');
219
+ }
220
+ return this._agentstatushistory;
221
+ }
210
222
  // ============================================
211
223
  // STANDARD METHODS (Unchanged API)
212
224
  // ============================================