@d19n/youfibre-odin-sdk 2.0.1 → 2.0.2
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 +14 -3
- 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/BrskEntityMigrationErrorAccessor.d.ts +111 -0
- package/dist/accessors-v2/BrskEntityMigrationErrorAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +5 -3
- package/dist/actions-v2/AssignCaseDto.d.ts +5 -13
- package/dist/actions-v2/AssignCaseWithNoteFlowDto.d.ts +5 -13
- package/dist/actions-v2/CreateAuddisPgSubmissionAllocationDto.d.ts +8 -1
- package/dist/actions-v2/CreateBacsPgSubmissionAllocationDto.d.ts +11 -4
- package/dist/actions-v2/CreateBrskMigrationErrorDto.d.ts +100 -0
- package/dist/actions-v2/CreateBrskMigrationErrorDto.js +52 -0
- package/dist/actions-v2/CreateCaseFromContactDto.d.ts +5 -13
- package/dist/actions-v2/CreateCashbackRewardForOrderReferralDto.d.ts +208 -0
- package/dist/actions-v2/CreateCashbackRewardForOrderReferralDto.js +179 -0
- package/dist/actions-v2/MoveCollectionWorkOrderToCompleteDto.d.ts +72 -20
- package/dist/actions-v2/MoveCollectionWorkOrderToCompleteDto.js +42 -21
- package/dist/actions-v2/UpdatePgFileAllocationDto.d.ts +91 -0
- package/dist/actions-v2/UpdatePgFileAllocationDto.js +61 -0
- package/dist/actions-v2/UpdateTeamDto.d.ts +15 -1
- package/dist/api-sdk-v2/BrskEntityMigrationErrorApi.d.ts +45 -0
- package/dist/api-sdk-v2/BrskEntityMigrationErrorApi.js +151 -0
- package/dist/api-sdk-v2/ReferralApi.d.ts +2 -0
- package/dist/api-sdk-v2/ReferralApi.js +6 -0
- package/dist/api-sdk-v2/RewardApi.d.ts +2 -0
- package/dist/api-sdk-v2/RewardApi.js +6 -0
- package/dist/db-accessors-v2/BrskEntityMigrationErrorDbAccessor.d.ts +146 -0
- package/dist/db-accessors-v2/BrskEntityMigrationErrorDbAccessor.js +224 -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/BrskEntityMigrationErrorDb.d.ts +117 -0
- package/dist/db-sdk-v2/BrskEntityMigrationErrorDb.js +200 -0
- package/dist/db-sdk-v2/ReferralDb.d.ts +2 -0
- package/dist/db-sdk-v2/ReferralDb.js +6 -0
- package/dist/db-sdk-v2/RewardDb.d.ts +2 -0
- package/dist/db-sdk-v2/RewardDb.js +6 -0
- package/dist/entities-v2/AccountCredit.d.ts +90 -7
- package/dist/entities-v2/AccountCredit.js +86 -3
- package/dist/entities-v2/BrskEntityMigrationError.d.ts +107 -0
- package/dist/entities-v2/BrskEntityMigrationError.js +75 -0
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +4 -4
- package/dist/entities-v2/Referral.d.ts +7 -0
- package/dist/entities-v2/Referral.js +5 -1
- package/dist/entities-v2/Reward.d.ts +3 -12
- package/dist/entities-v2/Reward.js +0 -2
- package/dist/entities-v2/Team.d.ts +21 -0
- package/dist/entities-v2/Team.js +17 -1
- package/dist/records-v2/BrskEntityMigrationErrorRecord.d.ts +184 -0
- package/dist/records-v2/BrskEntityMigrationErrorRecord.js +243 -0
- package/dist/records-v2/ContactRecord.js +2 -0
- package/dist/records-v2/PgFileAllocationRecord.d.ts +28 -0
- package/dist/records-v2/PgFileAllocationRecord.js +37 -0
- package/dist/records-v2/ReferralRecord.d.ts +20 -0
- package/dist/records-v2/ReferralRecord.js +33 -0
- package/dist/records-v2/RewardRecord.d.ts +49 -0
- package/dist/records-v2/RewardRecord.js +60 -0
- package/dist/records-v2/WorkOrderRecord.d.ts +25 -29
- package/dist/records-v2/WorkOrderRecord.js +29 -36
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +7 -4
- package/package.json +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BrskEntityMigrationError DB Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to BrskEntityMigrationError 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
|
+
* // Constructor-level default (applies to all calls)
|
|
20
|
+
* const accessor = new BrskEntityMigrationErrorDbAccessor(principal, dbService, { omitPermissionsCheck: true });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
24
|
+
*/
|
|
25
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
|
|
26
|
+
import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
27
|
+
import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
|
|
28
|
+
import { BrskEntityMigrationErrorProperties } from '../entities-v2/BrskEntityMigrationError';
|
|
29
|
+
import { BrskEntityMigrationErrorRecord } from '../records-v2/BrskEntityMigrationErrorRecord';
|
|
30
|
+
/** Search response with wrapped records */
|
|
31
|
+
export interface BrskEntityMigrationErrorDbSearchResponse {
|
|
32
|
+
records: BrskEntityMigrationErrorRecord[];
|
|
33
|
+
totalRecords: number;
|
|
34
|
+
hasMore: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare class BrskEntityMigrationErrorDbAccessor {
|
|
37
|
+
private readonly _provider;
|
|
38
|
+
private readonly _moduleName;
|
|
39
|
+
private readonly _entityName;
|
|
40
|
+
private readonly _defaultOptions?;
|
|
41
|
+
/**
|
|
42
|
+
* Create a new BrskEntityMigrationErrorDbAccessor
|
|
43
|
+
* @param principal - The authenticated principal
|
|
44
|
+
* @param dbService - The database service instance
|
|
45
|
+
* @param defaultOptions - Default provider options applied to all operations
|
|
46
|
+
*/
|
|
47
|
+
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
48
|
+
get moduleName(): string;
|
|
49
|
+
get entityName(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Create a new empty BrskEntityMigrationError record instance for create operations.
|
|
52
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
53
|
+
*
|
|
54
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
55
|
+
* @returns A new record wrapper with pre-generated ID
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* // Auto-generated ID
|
|
60
|
+
* const note = odinDb.notes.new();
|
|
61
|
+
* console.log(note.id); // UUID available immediately
|
|
62
|
+
*
|
|
63
|
+
* // Custom ID
|
|
64
|
+
* const order = odinDb.orders.new("custom-id-123");
|
|
65
|
+
*
|
|
66
|
+
* // Reference ID before save
|
|
67
|
+
* const account = odinDb.accounts.new();
|
|
68
|
+
* const contact = odinDb.contacts.new();
|
|
69
|
+
* await contact
|
|
70
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
71
|
+
* .createContact({ FirstName: "John" });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
new(id?: string): BrskEntityMigrationErrorRecord;
|
|
75
|
+
/**
|
|
76
|
+
* Get a single BrskEntityMigrationError record by ID
|
|
77
|
+
*
|
|
78
|
+
* @param id - The record ID
|
|
79
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
80
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* // Simple get
|
|
85
|
+
* const record = await accessor.get(id);
|
|
86
|
+
*
|
|
87
|
+
* // With related entities
|
|
88
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
89
|
+
*
|
|
90
|
+
* // With permissions bypass
|
|
91
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
92
|
+
*
|
|
93
|
+
* // Both options
|
|
94
|
+
* const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
get(id: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<BrskEntityMigrationErrorRecord>;
|
|
98
|
+
/**
|
|
99
|
+
* Get multiple BrskEntityMigrationError records by IDs
|
|
100
|
+
*
|
|
101
|
+
* @param ids - Array of record IDs
|
|
102
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
103
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
104
|
+
*/
|
|
105
|
+
getMany(ids: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<BrskEntityMigrationErrorRecord[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Search BrskEntityMigrationError records
|
|
108
|
+
*
|
|
109
|
+
* @param params - Search parameters
|
|
110
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
111
|
+
*/
|
|
112
|
+
search(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<BrskEntityMigrationErrorDbSearchResponse>;
|
|
113
|
+
/**
|
|
114
|
+
* Search all BrskEntityMigrationError records with automatic pagination
|
|
115
|
+
*
|
|
116
|
+
* @param params - Search parameters
|
|
117
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
118
|
+
*/
|
|
119
|
+
searchAll(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<BrskEntityMigrationErrorRecord[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Async generator for paginating through all matching records.
|
|
122
|
+
* Yields batches of wrapped records.
|
|
123
|
+
*
|
|
124
|
+
* @param params - Search parameters
|
|
125
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
126
|
+
*/
|
|
127
|
+
paginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): AsyncGenerator<BrskEntityMigrationErrorRecord[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Create a fluent query builder for BrskEntityMigrationError records
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* const results = await accessor
|
|
134
|
+
* .query()
|
|
135
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
136
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
137
|
+
* .select('id', 'title', 'properties.*')
|
|
138
|
+
* .sortBy('createdAt', 'desc')
|
|
139
|
+
* .limit(100)
|
|
140
|
+
* .execute();
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
query(): QueryBuilder<BrskEntityMigrationErrorProperties, BrskEntityMigrationErrorRecord>;
|
|
144
|
+
/** Access the underlying DbProvider */
|
|
145
|
+
get provider(): DbProvider;
|
|
146
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* BrskEntityMigrationError DB Accessor
|
|
4
|
+
*
|
|
5
|
+
* Provides typed access to BrskEntityMigrationError records via direct database access.
|
|
6
|
+
* For use in backend services with principal + dbService.
|
|
7
|
+
* Returns wrapped records with typed action methods.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Simple get
|
|
12
|
+
* const record = await accessor.get(id);
|
|
13
|
+
*
|
|
14
|
+
* // With related entities
|
|
15
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
16
|
+
*
|
|
17
|
+
* // With permissions bypass (separate options)
|
|
18
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
19
|
+
*
|
|
20
|
+
* // Constructor-level default (applies to all calls)
|
|
21
|
+
* const accessor = new BrskEntityMigrationErrorDbAccessor(principal, dbService, { omitPermissionsCheck: true });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
25
|
+
*/
|
|
26
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
30
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
32
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
36
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
37
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
38
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
39
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
40
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
41
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
42
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
43
|
+
function fulfill(value) { resume("next", value); }
|
|
44
|
+
function reject(value) { resume("throw", value); }
|
|
45
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.BrskEntityMigrationErrorDbAccessor = void 0;
|
|
49
|
+
const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
|
|
50
|
+
const query_builder_1 = require("@d19n/odin-sdk-generator/dist/query-builder");
|
|
51
|
+
const BrskEntityMigrationErrorRecord_1 = require("../records-v2/BrskEntityMigrationErrorRecord");
|
|
52
|
+
class BrskEntityMigrationErrorDbAccessor {
|
|
53
|
+
/**
|
|
54
|
+
* Create a new BrskEntityMigrationErrorDbAccessor
|
|
55
|
+
* @param principal - The authenticated principal
|
|
56
|
+
* @param dbService - The database service instance
|
|
57
|
+
* @param defaultOptions - Default provider options applied to all operations
|
|
58
|
+
*/
|
|
59
|
+
constructor(principal, dbService, defaultOptions) {
|
|
60
|
+
this._moduleName = 'AuditModule';
|
|
61
|
+
this._entityName = 'BrskEntityMigrationError';
|
|
62
|
+
this._provider = new db_provider_1.DbProvider(principal, dbService, defaultOptions);
|
|
63
|
+
this._defaultOptions = defaultOptions;
|
|
64
|
+
}
|
|
65
|
+
get moduleName() { return this._moduleName; }
|
|
66
|
+
get entityName() { return this._entityName; }
|
|
67
|
+
// ============================================
|
|
68
|
+
// RECORD CREATION
|
|
69
|
+
// ============================================
|
|
70
|
+
/**
|
|
71
|
+
* Create a new empty BrskEntityMigrationError record instance for create operations.
|
|
72
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
73
|
+
*
|
|
74
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
75
|
+
* @returns A new record wrapper with pre-generated ID
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* // Auto-generated ID
|
|
80
|
+
* const note = odinDb.notes.new();
|
|
81
|
+
* console.log(note.id); // UUID available immediately
|
|
82
|
+
*
|
|
83
|
+
* // Custom ID
|
|
84
|
+
* const order = odinDb.orders.new("custom-id-123");
|
|
85
|
+
*
|
|
86
|
+
* // Reference ID before save
|
|
87
|
+
* const account = odinDb.accounts.new();
|
|
88
|
+
* const contact = odinDb.contacts.new();
|
|
89
|
+
* await contact
|
|
90
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
91
|
+
* .createContact({ FirstName: "John" });
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
new(id) {
|
|
95
|
+
return new BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord(null, this._provider, id);
|
|
96
|
+
}
|
|
97
|
+
// ============================================
|
|
98
|
+
// RECORD RETRIEVAL
|
|
99
|
+
// ============================================
|
|
100
|
+
/**
|
|
101
|
+
* Get a single BrskEntityMigrationError record by ID
|
|
102
|
+
*
|
|
103
|
+
* @param id - The record ID
|
|
104
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
105
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* // Simple get
|
|
110
|
+
* const record = await accessor.get(id);
|
|
111
|
+
*
|
|
112
|
+
* // With related entities
|
|
113
|
+
* const record = await accessor.get(id, { entities: ["Contact", "Address"] });
|
|
114
|
+
*
|
|
115
|
+
* // With permissions bypass
|
|
116
|
+
* const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
|
|
117
|
+
*
|
|
118
|
+
* // Both options
|
|
119
|
+
* const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
get(id, queryOptions, providerOptions) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const record = yield this._provider._getByPrimaryKey(this._moduleName, this._entityName, id, queryOptions, providerOptions);
|
|
125
|
+
return new BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord(record, this._provider);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get multiple BrskEntityMigrationError records by IDs
|
|
130
|
+
*
|
|
131
|
+
* @param ids - Array of record IDs
|
|
132
|
+
* @param queryOptions - Query options (WHAT to fetch: entities to include)
|
|
133
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
134
|
+
*/
|
|
135
|
+
getMany(ids, queryOptions, providerOptions) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
if (ids.length === 0)
|
|
138
|
+
return [];
|
|
139
|
+
const records = yield this._provider._getManyByPrimaryKey(this._moduleName, this._entityName, ids, queryOptions, providerOptions);
|
|
140
|
+
return records.map((r) => new BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord(r, this._provider));
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
// ============================================
|
|
144
|
+
// SEARCH OPERATIONS
|
|
145
|
+
// ============================================
|
|
146
|
+
/**
|
|
147
|
+
* Search BrskEntityMigrationError records
|
|
148
|
+
*
|
|
149
|
+
* @param params - Search parameters
|
|
150
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
151
|
+
*/
|
|
152
|
+
search(params, providerOptions) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const result = yield this._provider._searchRecords(this._moduleName, this._entityName, params, providerOptions);
|
|
155
|
+
return {
|
|
156
|
+
records: result.records.map((r) => new BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord(r, this._provider)),
|
|
157
|
+
totalRecords: result.totalRecords,
|
|
158
|
+
hasMore: result.hasMore,
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Search all BrskEntityMigrationError records with automatic pagination
|
|
164
|
+
*
|
|
165
|
+
* @param params - Search parameters
|
|
166
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
167
|
+
*/
|
|
168
|
+
searchAll(params, providerOptions) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params, 0, providerOptions);
|
|
171
|
+
return result.records.map((r) => new BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord(r, this._provider));
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Async generator for paginating through all matching records.
|
|
176
|
+
* Yields batches of wrapped records.
|
|
177
|
+
*
|
|
178
|
+
* @param params - Search parameters
|
|
179
|
+
* @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
|
|
180
|
+
*/
|
|
181
|
+
paginate(params, providerOptions) {
|
|
182
|
+
var _a;
|
|
183
|
+
return __asyncGenerator(this, arguments, function* paginate_1() {
|
|
184
|
+
let hasMore = true;
|
|
185
|
+
let searchAfter;
|
|
186
|
+
const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
|
|
187
|
+
while (hasMore) {
|
|
188
|
+
const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) }), providerOptions));
|
|
189
|
+
if (result.records.length > 0) {
|
|
190
|
+
yield yield __await(result.records.map((r) => new BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord(r, this._provider)));
|
|
191
|
+
const lastRecord = result.records[result.records.length - 1];
|
|
192
|
+
searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
|
|
193
|
+
}
|
|
194
|
+
hasMore = result.hasMore && result.records.length >= query.pageSize;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
// ============================================
|
|
199
|
+
// QUERY BUILDER
|
|
200
|
+
// ============================================
|
|
201
|
+
/**
|
|
202
|
+
* Create a fluent query builder for BrskEntityMigrationError records
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const results = await accessor
|
|
207
|
+
* .query()
|
|
208
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
209
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
210
|
+
* .select('id', 'title', 'properties.*')
|
|
211
|
+
* .sortBy('createdAt', 'desc')
|
|
212
|
+
* .limit(100)
|
|
213
|
+
* .execute();
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
query() {
|
|
217
|
+
return (0, query_builder_1.createQueryBuilder)(this);
|
|
218
|
+
}
|
|
219
|
+
/** Access the underlying DbProvider */
|
|
220
|
+
get provider() {
|
|
221
|
+
return this._provider;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
exports.BrskEntityMigrationErrorDbAccessor = BrskEntityMigrationErrorDbAccessor;
|
|
@@ -17,6 +17,7 @@ export { AppointmentDbAccessor, AppointmentDbSearchResponse } from './Appointmen
|
|
|
17
17
|
export { BillingAdjustmentDbAccessor, BillingAdjustmentDbSearchResponse } from './BillingAdjustmentDbAccessor';
|
|
18
18
|
export { BillingRequestDbAccessor, BillingRequestDbSearchResponse } from './BillingRequestDbAccessor';
|
|
19
19
|
export { BlockageA55DbAccessor, BlockageA55DbSearchResponse } from './BlockageA55DbAccessor';
|
|
20
|
+
export { BrskEntityMigrationErrorDbAccessor, BrskEntityMigrationErrorDbSearchResponse } from './BrskEntityMigrationErrorDbAccessor';
|
|
20
21
|
export { CallEventDbAccessor, CallEventDbSearchResponse } from './CallEventDbAccessor';
|
|
21
22
|
export { CallLegDbAccessor, CallLegDbSearchResponse } from './CallLegDbAccessor';
|
|
22
23
|
export { CallDbAccessor, CallDbSearchResponse } from './CallDbAccessor';
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.YfStockAuditDbAccessor = exports.YfFieldServiceVisitDbAccessor = exports.WorkOrderStatusUpdateDbAccessor = exports.WorkOrderDbAccessor = exports.WayleaveAuditDbAccessor = exports.VoiceConfigurationDbAccessor = exports.VisitDbAccessor = exports.UserDbAccessor = exports.UgRetroAuditDbAccessor = exports.UgInstallationAuditDbAccessor = exports.UgInProgressAuditDbAccessor = exports.UgExternalAuditDbAccessor = void 0;
|
|
12
|
+
exports.OhExternalAuditDbAccessor = exports.OhAuditOfInstallationDbAccessor = exports.OfferDbAccessor = exports.NoteDbAccessor = exports.NetworkDeviceDbAccessor = exports.MessageDbAccessor = exports.LeadDbAccessor = exports.KnowledgeArticleDbAccessor = exports.InvoiceDbAccessor = exports.InvoiceItemDbAccessor = exports.InternalInstallAuditDbAccessor = exports.ImpersonationTrackerDbAccessor = exports.FileDbAccessor = exports.FieldServiceProductDbAccessor = exports.FieldServiceDispatchedProductDbAccessor = exports.EmailTemplateDbAccessor = exports.EmailSenderDbAccessor = exports.EmailDbAccessor = exports.DiscountDbAccessor = exports.CustomerPhonePortingDbAccessor = exports.CustomerDeviceRouterDbAccessor = exports.CustomerDeviceOntDbAccessor = exports.CustomerDeviceConfigurationDbAccessor = exports.CustomerDeviceAtaDbAccessor = exports.CrmDatasetDbAccessor = exports.CreditNoteDbAccessor = exports.ConversationDbAccessor = exports.ConversationFeedbackDbAccessor = exports.ContractBuyOutDbAccessor = exports.ContactDbAccessor = exports.ConfigDbAccessor = exports.ChurnRequestDbAccessor = exports.ChangeReasonDbAccessor = exports.CaseDbAccessor = exports.CampaignDbAccessor = exports.CallTransferDbAccessor = exports.CallDbAccessor = exports.CallLegDbAccessor = exports.CallEventDbAccessor = exports.BrskEntityMigrationErrorDbAccessor = exports.BlockageA55DbAccessor = exports.BillingRequestDbAccessor = exports.BillingAdjustmentDbAccessor = exports.AppointmentDbAccessor = exports.AffiliateCodeDbAccessor = exports.AddressDbAccessor = exports.ActivityDbAccessor = exports.ActivityLogDbAccessor = exports.AccountDbAccessor = exports.AccountCreditDbAccessor = void 0;
|
|
13
|
+
exports.TwilioUserUpdateDbAccessor = exports.TransactionDbAccessor = exports.TimeSlotDbAccessor = exports.TestEntityForVisualBuilderDbAccessor = exports.TeamDbAccessor = exports.SweeperMaintenanceAuditDbAccessor = exports.SmsMessageDbAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormDbAccessor = exports.ServiceVisitAuditDbAccessor = exports.ServiceDbAccessor = exports.ServiceAppointmentDbAccessor = exports.ServiceAppointmentConfigDbAccessor = exports.ScheduleSlotDbAccessor = exports.SalesTerritoryDbAccessor = exports.RewardDbAccessor = exports.ReturnsDbAccessor = exports.RemediationRequiredReasonDbAccessor = exports.RemediationOutcomeFormDbAccessor = exports.ReferralDbAccessor = exports.PushNotificationDbAccessor = exports.ProductDbAccessor = exports.PriceBookDbAccessor = exports.PhoneNumberDbAccessor = exports.PgWebhookDbAccessor = exports.PgWebhookAttemptDbAccessor = exports.PgVocalinkDbAccessor = exports.PgTransactionDbAccessor = exports.PgSortCodeSubstitutionDbAccessor = exports.PgPaymentMethodDbAccessor = exports.PgLogDbAccessor = exports.PgFileAllocationDbAccessor = exports.PgDisputeDbAccessor = exports.PgDirectDebitFileDbAccessor = exports.PgContactDbAccessor = exports.PgAccountValidationDbAccessor = exports.PermissionToFailDbAccessor = exports.PaymentDbAccessor = exports.PaymentMethodRefundDbAccessor = exports.PaymentMethodDbAccessor = exports.PICRequestDbAccessor = exports.OverlayRealA55DbAccessor = exports.OutageDbAccessor = exports.OrderDbAccessor = exports.OrderItemDbAccessor = exports.OrderCheckDbAccessor = exports.OntReplacementApprovalDbAccessor = exports.OneTouchSwitchDbAccessor = exports.OhRetroAuditDbAccessor = exports.OhInstallationAuditDbAccessor = exports.OhInProgressAuditDbAccessor = void 0;
|
|
14
|
+
exports.YfStockAuditDbAccessor = exports.YfFieldServiceVisitDbAccessor = exports.WorkOrderStatusUpdateDbAccessor = exports.WorkOrderDbAccessor = exports.WayleaveAuditDbAccessor = exports.VoiceConfigurationDbAccessor = exports.VisitDbAccessor = exports.UserDbAccessor = exports.UgRetroAuditDbAccessor = exports.UgInstallationAuditDbAccessor = exports.UgInProgressAuditDbAccessor = exports.UgExternalAuditDbAccessor = exports.UgAuditOfInstallationDbAccessor = void 0;
|
|
15
15
|
var AccountCreditDbAccessor_1 = require("./AccountCreditDbAccessor");
|
|
16
16
|
Object.defineProperty(exports, "AccountCreditDbAccessor", { enumerable: true, get: function () { return AccountCreditDbAccessor_1.AccountCreditDbAccessor; } });
|
|
17
17
|
var AccountDbAccessor_1 = require("./AccountDbAccessor");
|
|
@@ -32,6 +32,8 @@ var BillingRequestDbAccessor_1 = require("./BillingRequestDbAccessor");
|
|
|
32
32
|
Object.defineProperty(exports, "BillingRequestDbAccessor", { enumerable: true, get: function () { return BillingRequestDbAccessor_1.BillingRequestDbAccessor; } });
|
|
33
33
|
var BlockageA55DbAccessor_1 = require("./BlockageA55DbAccessor");
|
|
34
34
|
Object.defineProperty(exports, "BlockageA55DbAccessor", { enumerable: true, get: function () { return BlockageA55DbAccessor_1.BlockageA55DbAccessor; } });
|
|
35
|
+
var BrskEntityMigrationErrorDbAccessor_1 = require("./BrskEntityMigrationErrorDbAccessor");
|
|
36
|
+
Object.defineProperty(exports, "BrskEntityMigrationErrorDbAccessor", { enumerable: true, get: function () { return BrskEntityMigrationErrorDbAccessor_1.BrskEntityMigrationErrorDbAccessor; } });
|
|
35
37
|
var CallEventDbAccessor_1 = require("./CallEventDbAccessor");
|
|
36
38
|
Object.defineProperty(exports, "CallEventDbAccessor", { enumerable: true, get: function () { return CallEventDbAccessor_1.CallEventDbAccessor; } });
|
|
37
39
|
var CallLegDbAccessor_1 = require("./CallLegDbAccessor");
|
|
@@ -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 { BrskEntityMigrationErrorProperties } from '../entities-v2/BrskEntityMigrationError';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use OdinDbClient.
|
|
6
|
+
*
|
|
7
|
+
* Migration:
|
|
8
|
+
* - Old: new BrskEntityMigrationErrorApi(authParams).get(id)
|
|
9
|
+
* - New: new odin.brskentitymigrationerror.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 BrskEntityMigrationErrorDb(principal, dbService, { omitPermissionsCheck: true })
|
|
15
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
16
|
+
*/
|
|
17
|
+
export declare class BrskEntityMigrationErrorDb 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<BrskEntityMigrationErrorProperties>>>;
|
|
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<BrskEntityMigrationErrorProperties>>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a single record by primary key
|
|
39
|
+
* @param brskEntityMigrationErrorId - 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(brskEntityMigrationErrorId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<BrskEntityMigrationErrorProperties>>;
|
|
57
|
+
/**
|
|
58
|
+
* Get multiple records by primary keys
|
|
59
|
+
* @param brskEntityMigrationErrorIds - Array of record IDs
|
|
60
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
61
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
62
|
+
*/
|
|
63
|
+
getManyByPrimaryKey(brskEntityMigrationErrorIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<BrskEntityMigrationErrorProperties>[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Upsert a single record
|
|
66
|
+
* @param upsertDto - Record to upsert
|
|
67
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
68
|
+
*/
|
|
69
|
+
upsert(upsertDto: OdinRecordCreateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes>;
|
|
70
|
+
/**
|
|
71
|
+
* Upsert multiple records
|
|
72
|
+
* @param upsertDtos - Records to upsert
|
|
73
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
74
|
+
*/
|
|
75
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Update a single record
|
|
78
|
+
* @param updateDto - Record to update
|
|
79
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
80
|
+
*/
|
|
81
|
+
update(updateDto: OdinRecordUpdateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes>;
|
|
82
|
+
/**
|
|
83
|
+
* Update multiple records
|
|
84
|
+
* @param updateDtos - Records to update
|
|
85
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
86
|
+
*/
|
|
87
|
+
updateMany(updateDtos: OdinRecordUpdateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete one or many records
|
|
90
|
+
* @param brskEntityMigrationErrorIds - Record IDs to delete
|
|
91
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
92
|
+
*/
|
|
93
|
+
delete(brskEntityMigrationErrorIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Restore one or many deleted records
|
|
96
|
+
* @param brskEntityMigrationErrorIds - Record IDs to restore
|
|
97
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
98
|
+
*/
|
|
99
|
+
restore(brskEntityMigrationErrorIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordRestored[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Apply an action to a record
|
|
102
|
+
* @param actionName - The action key
|
|
103
|
+
* @param dto - The action DTO
|
|
104
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
105
|
+
*/
|
|
106
|
+
applyAction(actionName: string, dto: any, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").IDbRecordCreateUpdateRes[]>;
|
|
107
|
+
/**
|
|
108
|
+
* Get version history for the current source record
|
|
109
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
110
|
+
*/
|
|
111
|
+
getVersions(providerOptions?: DbProviderOptions): Promise<any>;
|
|
112
|
+
/**
|
|
113
|
+
* Get revision timeline for the current source record
|
|
114
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
115
|
+
*/
|
|
116
|
+
getRevisionTimeline(providerOptions?: DbProviderOptions): Promise<any>;
|
|
117
|
+
}
|