@d19n/youfibre-odin-sdk 2.0.69 → 2.0.70
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/TwilioTaskQueueAccessor.d.ts +111 -0
- package/dist/accessors-v2/TwilioTaskQueueAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +4 -2
- package/dist/actions-v2/CreateTwilioTaskQueueDto.d.ts +56 -0
- package/dist/actions-v2/CreateTwilioTaskQueueDto.js +52 -0
- package/dist/actions-v2/UpdateTwilioTaskQueueDto.d.ts +61 -0
- package/dist/actions-v2/UpdateTwilioTaskQueueDto.js +54 -0
- package/dist/api-sdk-v2/TwilioTaskQueueApi.d.ts +45 -0
- package/dist/api-sdk-v2/TwilioTaskQueueApi.js +151 -0
- package/dist/db-accessors-v2/TwilioTaskQueueDbAccessor.d.ts +149 -0
- package/dist/db-accessors-v2/TwilioTaskQueueDbAccessor.js +227 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +4 -2
- package/dist/db-sdk-v2/TwilioTaskQueueDb.d.ts +117 -0
- package/dist/db-sdk-v2/TwilioTaskQueueDb.js +200 -0
- package/dist/entities-v2/TwilioTaskQueue.d.ts +93 -0
- package/dist/entities-v2/TwilioTaskQueue.js +71 -0
- package/dist/records-v2/TwilioTaskQueueRecord.d.ts +212 -0
- package/dist/records-v2/TwilioTaskQueueRecord.js +283 -0
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +5 -2
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateTwilioTaskQueue Action DTO
|
|
3
|
+
*
|
|
4
|
+
* UpdateTwilioTaskQueue
|
|
5
|
+
*
|
|
6
|
+
* @module ServiceModule
|
|
7
|
+
* @entity TwilioTaskQueue
|
|
8
|
+
* @actionKey UpdateTwilioTaskQueue
|
|
9
|
+
* @event k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue
|
|
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 UpdateTwilioTaskQueue updated events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue
|
|
18
|
+
*/
|
|
19
|
+
export interface UpdateTwilioTaskQueueMessage extends OdinRecordUpdatedEvent<UpdateTwilioTaskQueueDto, UpdateTwilioTaskQueueProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for UpdateTwilioTaskQueue action
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export interface UpdateTwilioTaskQueueProperties {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* UpdateTwilioTaskQueue
|
|
29
|
+
*
|
|
30
|
+
* @actionType UPDATE - Updates an existing TwilioTaskQueue record
|
|
31
|
+
* @module ServiceModule
|
|
32
|
+
* @entity TwilioTaskQueue
|
|
33
|
+
* @event k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue
|
|
34
|
+
* @permission schema.action.updatetwiliotaskqueue.trigger
|
|
35
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
36
|
+
*/
|
|
37
|
+
export declare class UpdateTwilioTaskQueueDto extends OdinRecordUpdateDto<UpdateTwilioTaskQueueProperties> {
|
|
38
|
+
/** Used by SDK generators to identify action type */
|
|
39
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
40
|
+
static readonly ACTION_KEY = "UpdateTwilioTaskQueue";
|
|
41
|
+
static readonly MODULE_NAME = "ServiceModule";
|
|
42
|
+
static readonly ENTITIES: string[];
|
|
43
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue";
|
|
44
|
+
static readonly PERMISSION = "schema.action.updatetwiliotaskqueue.trigger";
|
|
45
|
+
/** Step metadata - entity this action targets */
|
|
46
|
+
static readonly STEP_ENTITY = "ServiceModule:TwilioTaskQueue";
|
|
47
|
+
static readonly STEP_SCHEMA_ID = "8a29f143-e1d1-443f-b38f-8d7c4e5152cc";
|
|
48
|
+
static readonly STEP_SCHEMA_ACTION_ID = "109aa191-426d-41ae-9ed1-1f372cb4bb90";
|
|
49
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
50
|
+
readonly actionName: string;
|
|
51
|
+
readonly schemaActionId: string;
|
|
52
|
+
readonly entity: string;
|
|
53
|
+
constructor(record: OdinRecord<any> | {
|
|
54
|
+
id: string;
|
|
55
|
+
entity: string;
|
|
56
|
+
type?: string;
|
|
57
|
+
}, properties: UpdateTwilioTaskQueueProperties, options?: {
|
|
58
|
+
journeyId?: string;
|
|
59
|
+
stageKey?: string;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateTwilioTaskQueue Action DTO
|
|
4
|
+
*
|
|
5
|
+
* UpdateTwilioTaskQueue
|
|
6
|
+
*
|
|
7
|
+
* @module ServiceModule
|
|
8
|
+
* @entity TwilioTaskQueue
|
|
9
|
+
* @actionKey UpdateTwilioTaskQueue
|
|
10
|
+
* @event k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UpdateTwilioTaskQueueDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* UpdateTwilioTaskQueue
|
|
19
|
+
*
|
|
20
|
+
* @actionType UPDATE - Updates an existing TwilioTaskQueue record
|
|
21
|
+
* @module ServiceModule
|
|
22
|
+
* @entity TwilioTaskQueue
|
|
23
|
+
* @event k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue
|
|
24
|
+
* @permission schema.action.updatetwiliotaskqueue.trigger
|
|
25
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
26
|
+
*/
|
|
27
|
+
class UpdateTwilioTaskQueueDto extends core_1.OdinRecordUpdateDto {
|
|
28
|
+
constructor(record, properties, options) {
|
|
29
|
+
super({
|
|
30
|
+
id: record.id,
|
|
31
|
+
entity: record.entity,
|
|
32
|
+
type: record.type,
|
|
33
|
+
properties,
|
|
34
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
35
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
36
|
+
});
|
|
37
|
+
this.actionName = 'UpdateTwilioTaskQueue';
|
|
38
|
+
this.schemaActionId = '109aa191-426d-41ae-9ed1-1f372cb4bb90';
|
|
39
|
+
this.entity = 'ServiceModule:TwilioTaskQueue';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.UpdateTwilioTaskQueueDto = UpdateTwilioTaskQueueDto;
|
|
43
|
+
/** Used by SDK generators to identify action type */
|
|
44
|
+
UpdateTwilioTaskQueueDto.ACTION_TYPE = 'UPDATE';
|
|
45
|
+
UpdateTwilioTaskQueueDto.ACTION_KEY = 'UpdateTwilioTaskQueue';
|
|
46
|
+
UpdateTwilioTaskQueueDto.MODULE_NAME = 'ServiceModule';
|
|
47
|
+
UpdateTwilioTaskQueueDto.ENTITIES = ['TwilioTaskQueue'];
|
|
48
|
+
UpdateTwilioTaskQueueDto.EVENT_NAME = 'k1.t-hEOJjsDb.ServiceModule.TwilioTaskQueue.Update.UpdateTwilioTaskQueue';
|
|
49
|
+
UpdateTwilioTaskQueueDto.PERMISSION = 'schema.action.updatetwiliotaskqueue.trigger';
|
|
50
|
+
/** Step metadata - entity this action targets */
|
|
51
|
+
UpdateTwilioTaskQueueDto.STEP_ENTITY = 'ServiceModule:TwilioTaskQueue';
|
|
52
|
+
UpdateTwilioTaskQueueDto.STEP_SCHEMA_ID = '8a29f143-e1d1-443f-b38f-8d7c4e5152cc';
|
|
53
|
+
UpdateTwilioTaskQueueDto.STEP_SCHEMA_ACTION_ID = '109aa191-426d-41ae-9ed1-1f372cb4bb90';
|
|
54
|
+
UpdateTwilioTaskQueueDto.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 { TwilioTaskQueueProperties } from '../entities-v2/TwilioTaskQueue';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinApiClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new TwilioTaskQueueApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.twiliotaskqueue.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare class TwilioTaskQueueApi 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<TwilioTaskQueueProperties>>>;
|
|
23
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<TwilioTaskQueueProperties>>>;
|
|
24
|
+
reIndex(body: {
|
|
25
|
+
id: string;
|
|
26
|
+
schemaId: string;
|
|
27
|
+
}[]): Promise<any>;
|
|
28
|
+
get(twilioTaskQueueId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<TwilioTaskQueueProperties>>;
|
|
29
|
+
getMany(twilioTaskQueueIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<TwilioTaskQueueProperties>[]>;
|
|
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(twilioTaskQueueId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
35
|
+
deleteMany(twilioTaskQueueIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
36
|
+
restore(twilioTaskQueueIds: 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.TwilioTaskQueueApi = 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 TwilioTaskQueueApi(authParams).get(id)
|
|
19
|
+
* - New: new odin.twiliotaskqueue.get(id)
|
|
20
|
+
*
|
|
21
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
22
|
+
*/
|
|
23
|
+
class TwilioTaskQueueApi 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 = 'ServiceModule';
|
|
31
|
+
this.entityName = 'TwilioTaskQueue';
|
|
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(twilioTaskQueueId) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, twilioTaskQueueId);
|
|
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(twilioTaskQueueIds) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, twilioTaskQueueIds);
|
|
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(twilioTaskQueueId) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return yield this._delete(this.moduleName, this.entityName, [twilioTaskQueueId]);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Use this function when you want to delete many records
|
|
115
|
+
deleteMany(twilioTaskQueueIds) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return yield this._delete(this.moduleName, this.entityName, twilioTaskQueueIds);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Use this function when you want to restore one or many records
|
|
121
|
+
restore(twilioTaskQueueIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this._restore(this.moduleName, this.entityName, twilioTaskQueueIds);
|
|
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.TwilioTaskQueueApi = TwilioTaskQueueApi;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TwilioTaskQueue DB Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to TwilioTaskQueue records via direct database access.
|
|
5
|
+
* For use in backend services with principal + dbService.
|
|
6
|
+
* Returns wrapped records with typed action methods.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // Simple get
|
|
11
|
+
* const record = await accessor.get(id);
|
|
12
|
+
*
|
|
13
|
+
* // With related entities
|
|
14
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
15
|
+
*
|
|
16
|
+
* // With permissions bypass (separate options)
|
|
17
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
18
|
+
*
|
|
19
|
+
* // Silent write (no RabbitMQ events)
|
|
20
|
+
* const result = await accessor.upsert([dto], { omitWriteEvents: true });
|
|
21
|
+
*
|
|
22
|
+
* // Constructor-level default (applies to all calls)
|
|
23
|
+
* const accessor = new TwilioTaskQueueDbAccessor(principal, dbService, { omitPermissionsCheck: true });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
27
|
+
*/
|
|
28
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
|
|
29
|
+
import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
30
|
+
import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
|
|
31
|
+
import { TwilioTaskQueueProperties } from '../entities-v2/TwilioTaskQueue';
|
|
32
|
+
import { TwilioTaskQueueRecord } from '../records-v2/TwilioTaskQueueRecord';
|
|
33
|
+
/** Search response with wrapped records */
|
|
34
|
+
export interface TwilioTaskQueueDbSearchResponse {
|
|
35
|
+
records: TwilioTaskQueueRecord[];
|
|
36
|
+
totalRecords: number;
|
|
37
|
+
hasMore: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare class TwilioTaskQueueDbAccessor {
|
|
40
|
+
private readonly _provider;
|
|
41
|
+
private readonly _moduleName;
|
|
42
|
+
private readonly _entityName;
|
|
43
|
+
private readonly _defaultOptions?;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new TwilioTaskQueueDbAccessor
|
|
46
|
+
* @param principal - The authenticated principal
|
|
47
|
+
* @param dbService - The database service instance
|
|
48
|
+
* @param defaultOptions - Default provider options applied to all operations
|
|
49
|
+
*/
|
|
50
|
+
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
51
|
+
get moduleName(): string;
|
|
52
|
+
get entityName(): string;
|
|
53
|
+
/**
|
|
54
|
+
* Create a new empty TwilioTaskQueue record instance for create operations.
|
|
55
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
56
|
+
*
|
|
57
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
58
|
+
* @returns A new record wrapper with pre-generated ID
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // Auto-generated ID
|
|
63
|
+
* const note = odinDb.notes.new();
|
|
64
|
+
* console.log(note.id); // UUID available immediately
|
|
65
|
+
*
|
|
66
|
+
* // Custom ID
|
|
67
|
+
* const order = odinDb.orders.new("custom-id-123");
|
|
68
|
+
*
|
|
69
|
+
* // Reference ID before save
|
|
70
|
+
* const account = odinDb.accounts.new();
|
|
71
|
+
* const contact = odinDb.contacts.new();
|
|
72
|
+
* await contact
|
|
73
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
74
|
+
* .createContact({ FirstName: "John" });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
new(id?: string): TwilioTaskQueueRecord;
|
|
78
|
+
/**
|
|
79
|
+
* Get a single TwilioTaskQueue record by ID
|
|
80
|
+
*
|
|
81
|
+
* @param id - The record ID
|
|
82
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
83
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* // Simple get
|
|
88
|
+
* const record = await accessor.get(id);
|
|
89
|
+
*
|
|
90
|
+
* // With related entities
|
|
91
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
92
|
+
*
|
|
93
|
+
* // With permissions bypass
|
|
94
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
95
|
+
*
|
|
96
|
+
* // Both options
|
|
97
|
+
* const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
get(id: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<TwilioTaskQueueRecord>;
|
|
101
|
+
/**
|
|
102
|
+
* Get multiple TwilioTaskQueue records by IDs
|
|
103
|
+
*
|
|
104
|
+
* @param ids - Array of record IDs
|
|
105
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
106
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
107
|
+
*/
|
|
108
|
+
getMany(ids: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<TwilioTaskQueueRecord[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Search TwilioTaskQueue records
|
|
111
|
+
*
|
|
112
|
+
* @param params - Search parameters
|
|
113
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
114
|
+
*/
|
|
115
|
+
search(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<TwilioTaskQueueDbSearchResponse>;
|
|
116
|
+
/**
|
|
117
|
+
* Search all TwilioTaskQueue records with automatic pagination
|
|
118
|
+
*
|
|
119
|
+
* @param params - Search parameters
|
|
120
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
121
|
+
*/
|
|
122
|
+
searchAll(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<TwilioTaskQueueRecord[]>;
|
|
123
|
+
/**
|
|
124
|
+
* Async generator for paginating through all matching records.
|
|
125
|
+
* Yields batches of wrapped records.
|
|
126
|
+
*
|
|
127
|
+
* @param params - Search parameters
|
|
128
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
129
|
+
*/
|
|
130
|
+
paginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): AsyncGenerator<TwilioTaskQueueRecord[]>;
|
|
131
|
+
/**
|
|
132
|
+
* Create a fluent query builder for TwilioTaskQueue records
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* const results = await accessor
|
|
137
|
+
* .query()
|
|
138
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
139
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
140
|
+
* .select('id', 'title', 'properties.*')
|
|
141
|
+
* .sortBy('createdAt', 'desc')
|
|
142
|
+
* .limit(100)
|
|
143
|
+
* .execute();
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
query(): QueryBuilder<TwilioTaskQueueProperties, TwilioTaskQueueRecord>;
|
|
147
|
+
/** Access the underlying DbProvider */
|
|
148
|
+
get provider(): DbProvider;
|
|
149
|
+
}
|