@d19n/youfibre-odin-sdk 2.0.2-beta.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 +13 -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/CreateBrskMigrationErrorDto.d.ts +100 -0
- package/dist/actions-v2/CreateBrskMigrationErrorDto.js +52 -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/api-sdk-v2/BrskEntityMigrationErrorApi.d.ts +45 -0
- package/dist/api-sdk-v2/BrskEntityMigrationErrorApi.js +151 -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/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/records-v2/BrskEntityMigrationErrorRecord.d.ts +184 -0
- package/dist/records-v2/BrskEntityMigrationErrorRecord.js +243 -0
- package/dist/records-v2/PgFileAllocationRecord.d.ts +28 -0
- package/dist/records-v2/PgFileAllocationRecord.js +37 -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,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* BrskEntityMigrationError Record Wrapper
|
|
4
|
+
*
|
|
5
|
+
* Provides typed action methods and link management.
|
|
6
|
+
* Works with both ApiProvider and DbProvider.
|
|
7
|
+
*
|
|
8
|
+
* All action methods return an ActionBuilder or FlowBuilder.
|
|
9
|
+
* Call .execute() to run or .dryRun() to get the payload for debugging.
|
|
10
|
+
*
|
|
11
|
+
* Can be instantiated with null record for create operations:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const record = odinClient.brskEntityMigrationErrors.new();
|
|
14
|
+
* await record.createBrskEntityMigrationError({ ... }).execute();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Entity Types: DEFAULT
|
|
18
|
+
*
|
|
19
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
20
|
+
*/
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.isBrskEntityMigrationErrorRecord = exports.BrskEntityMigrationErrorRecord = void 0;
|
|
32
|
+
const uuid_1 = require("uuid");
|
|
33
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
|
+
/**
|
|
35
|
+
* Builder for action execution with dryRun support
|
|
36
|
+
*
|
|
37
|
+
* Provides a consistent API across all action types:
|
|
38
|
+
* - `.execute()` - Execute the action and return results
|
|
39
|
+
* - `.dryRun()` - Return the payload without executing (for debugging)
|
|
40
|
+
*/
|
|
41
|
+
class ActionBuilder {
|
|
42
|
+
constructor(provider, moduleName, entityName, payload, clearPendingLinks) {
|
|
43
|
+
this._provider = provider;
|
|
44
|
+
this._moduleName = moduleName;
|
|
45
|
+
this._entityName = entityName;
|
|
46
|
+
this._payload = payload;
|
|
47
|
+
this._clearPendingLinks = clearPendingLinks;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Set an external system identifier for this record.
|
|
51
|
+
* Links the record to a corresponding entry in an external application.
|
|
52
|
+
*
|
|
53
|
+
* @param externalId - The ID in the external system
|
|
54
|
+
* @param externalAppId - The external application identifier
|
|
55
|
+
* @returns this (for chaining)
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* await record.createOrder({ ... }).withExternalId('SF-123', 'salesforce').execute();
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
withExternalId(externalId, externalAppId) {
|
|
63
|
+
this._payload.externalId = externalId;
|
|
64
|
+
this._payload.externalAppId = externalAppId;
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Set security/access groups for this record.
|
|
69
|
+
* Controls which user groups can access the record.
|
|
70
|
+
*
|
|
71
|
+
* @param groups - Array of group names
|
|
72
|
+
* @returns this (for chaining)
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* await record.createOrder({ ... }).withGroups(['TenantA', 'BillingTeam']).execute();
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
withGroups(groups) {
|
|
80
|
+
this._payload.groups = groups;
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Execute the action
|
|
85
|
+
* @returns The result from the API
|
|
86
|
+
*/
|
|
87
|
+
execute() {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const result = yield this._provider._applyAction(this._moduleName, this._entityName, this._payload);
|
|
90
|
+
this._clearPendingLinks();
|
|
91
|
+
return result;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Returns the request payload without executing (for debugging)
|
|
96
|
+
* @returns The request payload that would be sent to the API
|
|
97
|
+
*/
|
|
98
|
+
dryRun() {
|
|
99
|
+
return this._payload;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Prevents accidental `await actionBuilder` without .execute()
|
|
103
|
+
* Forces developers to explicitly call .execute()
|
|
104
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
105
|
+
*/
|
|
106
|
+
then() {
|
|
107
|
+
throw new Error('ActionBuilder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
class BrskEntityMigrationErrorRecord {
|
|
111
|
+
/**
|
|
112
|
+
* Create a record wrapper.
|
|
113
|
+
* @param record - The underlying record, or null for create operations
|
|
114
|
+
* @param provider - The API or DB provider
|
|
115
|
+
* @param preGeneratedId - Optional pre-generated ID for new records (auto-generated if not provided)
|
|
116
|
+
*/
|
|
117
|
+
constructor(record, provider, preGeneratedId) {
|
|
118
|
+
this._pendingLinks = [];
|
|
119
|
+
this._record = record;
|
|
120
|
+
this._provider = provider;
|
|
121
|
+
this._preGeneratedId = preGeneratedId !== null && preGeneratedId !== void 0 ? preGeneratedId : (0, uuid_1.v4)();
|
|
122
|
+
}
|
|
123
|
+
// ============================================
|
|
124
|
+
// CORE PROPERTIES
|
|
125
|
+
// ============================================
|
|
126
|
+
/** Returns true if this is a new (unsaved) record */
|
|
127
|
+
get isNew() { var _a; return !((_a = this._record) === null || _a === void 0 ? void 0 : _a.id); }
|
|
128
|
+
/** Record ID - always available (pre-generated for new records) */
|
|
129
|
+
get id() { var _a, _b; return (_b = (_a = this._record) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this._preGeneratedId; }
|
|
130
|
+
get entity() { var _a, _b; return (_b = (_a = this._record) === null || _a === void 0 ? void 0 : _a.entity) !== null && _b !== void 0 ? _b : 'AuditModule:BrskEntityMigrationError'; }
|
|
131
|
+
get type() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.type; }
|
|
132
|
+
/** Record properties - empty object for new (unsaved) records */
|
|
133
|
+
get properties() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.properties) || {}; }
|
|
134
|
+
get title() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.title; }
|
|
135
|
+
get recordNumber() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.recordNumber; }
|
|
136
|
+
get stage() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.stage; }
|
|
137
|
+
get createdAt() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.createdAt; }
|
|
138
|
+
get updatedAt() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.updatedAt; }
|
|
139
|
+
get externalId() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.externalId; }
|
|
140
|
+
get externalAppId() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.externalAppId; }
|
|
141
|
+
get groups() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.groups) || []; }
|
|
142
|
+
/** Access the underlying OdinRecord (null for new records) */
|
|
143
|
+
get record() { return this._record; }
|
|
144
|
+
// ============================================
|
|
145
|
+
// TYPE GUARDS (with TypeScript type predicates)
|
|
146
|
+
// ============================================
|
|
147
|
+
/**
|
|
148
|
+
* Type guard: check if this record is of type DEFAULT
|
|
149
|
+
*
|
|
150
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
151
|
+
* giving you access to DEFAULT-specific properties.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```typescript
|
|
155
|
+
* if (record.isDefault()) {
|
|
156
|
+
* // TypeScript knows record.properties is BrskEntityMigrationErrorProperties
|
|
157
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
* @remarks This is the default record type
|
|
161
|
+
*/
|
|
162
|
+
isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
|
|
163
|
+
// ============================================
|
|
164
|
+
// LINK MANAGEMENT
|
|
165
|
+
// ============================================
|
|
166
|
+
/**
|
|
167
|
+
* Queue a link to be created with the next action.
|
|
168
|
+
* Works for both create and update actions.
|
|
169
|
+
* @returns this (for chaining)
|
|
170
|
+
*/
|
|
171
|
+
link(target) {
|
|
172
|
+
this._pendingLinks.push(new core_1.OdinRecordLinkDto({ id: target.id, entity: target.entity }));
|
|
173
|
+
return this;
|
|
174
|
+
}
|
|
175
|
+
/** Get the currently queued links */
|
|
176
|
+
get pendingLinks() {
|
|
177
|
+
return [...this._pendingLinks];
|
|
178
|
+
}
|
|
179
|
+
/** Clear pending links without executing an action */
|
|
180
|
+
clearPendingLinks() {
|
|
181
|
+
this._pendingLinks = [];
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Immediately unlink a record (API call).
|
|
186
|
+
* Unlike link(), this executes immediately.
|
|
187
|
+
* @throws Error if called on a new (unsaved) record
|
|
188
|
+
*/
|
|
189
|
+
unlink(target) {
|
|
190
|
+
var _a;
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
193
|
+
throw new Error('Cannot unlink from a new (unsaved) record');
|
|
194
|
+
const targetId = typeof target === 'string' ? target : target.id;
|
|
195
|
+
yield this._provider._deleteLinks('AuditModule', 'BrskEntityMigrationError', this._record.id, targetId);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
// ============================================
|
|
199
|
+
// CREATE ACTIONS (no existing record required)
|
|
200
|
+
// ============================================
|
|
201
|
+
/**
|
|
202
|
+
* CreateBrskMigrationError
|
|
203
|
+
*
|
|
204
|
+
* Creates a new BrskEntityMigrationError record with the specified properties.
|
|
205
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
206
|
+
*
|
|
207
|
+
* @param properties - The properties for the new record
|
|
208
|
+
* @param options - Optional settings
|
|
209
|
+
* @param options.type - Override the record type
|
|
210
|
+
* @param options.journeyId - Associate with a journey
|
|
211
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
212
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* // Create with properties
|
|
217
|
+
* const record = odinClient.brskEntityMigrationErrors.new();
|
|
218
|
+
* await record.createBrskMigrationError({ ... }).execute();
|
|
219
|
+
*
|
|
220
|
+
* // Dry run (for debugging)
|
|
221
|
+
* const payload = record.createBrskMigrationError({ ... }).dryRun();
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
createBrskMigrationError(properties, options) {
|
|
225
|
+
var _a, _b;
|
|
226
|
+
const payload = {
|
|
227
|
+
entity: 'AuditModule:BrskEntityMigrationError',
|
|
228
|
+
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
|
|
229
|
+
actionName: 'CreateBrskMigrationError',
|
|
230
|
+
properties: properties || {},
|
|
231
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
232
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
233
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
234
|
+
};
|
|
235
|
+
return new ActionBuilder(this._provider, 'AuditModule', 'BrskEntityMigrationError', payload, () => { this._pendingLinks = []; });
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
exports.BrskEntityMigrationErrorRecord = BrskEntityMigrationErrorRecord;
|
|
239
|
+
/** Type guard to check if an object is a BrskEntityMigrationErrorRecord */
|
|
240
|
+
function isBrskEntityMigrationErrorRecord(obj) {
|
|
241
|
+
return obj instanceof BrskEntityMigrationErrorRecord;
|
|
242
|
+
}
|
|
243
|
+
exports.isBrskEntityMigrationErrorRecord = isBrskEntityMigrationErrorRecord;
|
|
@@ -28,6 +28,7 @@ import { CreateBacsPgSubmissionAllocationProperties } from '../actions-v2/Create
|
|
|
28
28
|
import { UpdatePgAllocationWithAcknowledgementOneProperties } from '../actions-v2/UpdatePgAllocationWithAcknowledgementOneDto';
|
|
29
29
|
import { UpdatePgAllocationWithAcknowledgementTwoProperties } from '../actions-v2/UpdatePgAllocationWithAcknowledgementTwoDto';
|
|
30
30
|
import { UpdatePgAllocationWithBacsReportProperties } from '../actions-v2/UpdatePgAllocationWithBacsReportDto';
|
|
31
|
+
import { UpdatePgFileAllocationProperties } from '../actions-v2/UpdatePgFileAllocationDto';
|
|
31
32
|
import { PgDirectDebitFileRecord } from './PgDirectDebitFileRecord';
|
|
32
33
|
import { PgPaymentMethodRecord } from './PgPaymentMethodRecord';
|
|
33
34
|
import { PgTransactionRecord } from './PgTransactionRecord';
|
|
@@ -381,6 +382,33 @@ export declare class PgFileAllocationRecord<TProps = PgFileAllocationProperties>
|
|
|
381
382
|
journeyId?: string;
|
|
382
383
|
stageKey?: string;
|
|
383
384
|
}): ActionBuilder;
|
|
385
|
+
/**
|
|
386
|
+
* UpdatePgFileAllocation
|
|
387
|
+
*
|
|
388
|
+
* Updates this PgFileAllocation record.
|
|
389
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
390
|
+
*
|
|
391
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
392
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
393
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
394
|
+
* @throws Error if called on a new (unsaved) record
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* ```typescript
|
|
398
|
+
* const record = await odinClient.pgFileAllocations.get(id);
|
|
399
|
+
* await record.updatePgFileAllocation({ ... }).execute();
|
|
400
|
+
*
|
|
401
|
+
* // Dry run (for debugging)
|
|
402
|
+
* const payload = record.updatePgFileAllocation({ ... }).dryRun();
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
updatePgFileAllocation(propertiesOrOptions?: UpdatePgFileAllocationProperties | {
|
|
406
|
+
journeyId?: string;
|
|
407
|
+
stageKey?: string;
|
|
408
|
+
}, options?: {
|
|
409
|
+
journeyId?: string;
|
|
410
|
+
stageKey?: string;
|
|
411
|
+
}): ActionBuilder;
|
|
384
412
|
}
|
|
385
413
|
/** Type guard to check if an object is a PgFileAllocationRecord */
|
|
386
414
|
export declare function isPgFileAllocationRecord(obj: any): obj is PgFileAllocationRecord;
|
|
@@ -486,6 +486,43 @@ class PgFileAllocationRecord {
|
|
|
486
486
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdatePgAllocationWithBacsReport', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
487
487
|
return new ActionBuilder(this._provider, 'BillingModule', 'PgFileAllocation', payload, () => { this._pendingLinks = []; });
|
|
488
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* UpdatePgFileAllocation
|
|
491
|
+
*
|
|
492
|
+
* Updates this PgFileAllocation record.
|
|
493
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
494
|
+
*
|
|
495
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
496
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
497
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
498
|
+
* @throws Error if called on a new (unsaved) record
|
|
499
|
+
*
|
|
500
|
+
* @example
|
|
501
|
+
* ```typescript
|
|
502
|
+
* const record = await odinClient.pgFileAllocations.get(id);
|
|
503
|
+
* await record.updatePgFileAllocation({ ... }).execute();
|
|
504
|
+
*
|
|
505
|
+
* // Dry run (for debugging)
|
|
506
|
+
* const payload = record.updatePgFileAllocation({ ... }).dryRun();
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
509
|
+
updatePgFileAllocation(propertiesOrOptions, options) {
|
|
510
|
+
var _a;
|
|
511
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
512
|
+
throw new Error('updatePgFileAllocation requires an existing record. Use accessor.get() first.');
|
|
513
|
+
let properties = {};
|
|
514
|
+
let opts = options;
|
|
515
|
+
if (propertiesOrOptions) {
|
|
516
|
+
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
517
|
+
opts = propertiesOrOptions;
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
properties = propertiesOrOptions;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdatePgFileAllocation', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
524
|
+
return new ActionBuilder(this._provider, 'BillingModule', 'PgFileAllocation', payload, () => { this._pendingLinks = []; });
|
|
525
|
+
}
|
|
489
526
|
}
|
|
490
527
|
exports.PgFileAllocationRecord = PgFileAllocationRecord;
|
|
491
528
|
// ============================================
|
|
@@ -82,7 +82,6 @@ import { InProgressWorkOrderConfirmationProperties } from '../actions-v2/InProgr
|
|
|
82
82
|
import { ManageSlaProperties } from '../actions-v2/ManageSlaDto';
|
|
83
83
|
import { CreatePermissionToFailProperties } from '../actions-v2/MoveBusinessInstallToRemediationDto';
|
|
84
84
|
import { RemediationRequiredReasonCreateProperties } from '../actions-v2/MoveBusinessInstallToRemediationDto';
|
|
85
|
-
import { MoveCollectionWorkOrderToCompleteProperties } from '../actions-v2/MoveCollectionWorkOrderToCompleteDto';
|
|
86
85
|
import { CreateSsraProperties } from '../actions-v2/MoveInspectionWorkOrderToInProgressSubstantialDto';
|
|
87
86
|
import { CreateInstallRescheduledChangeReasonSupplierProperties } from '../actions-v2/RescheduleBusinessInstallWorkOrderSupplierDto';
|
|
88
87
|
import { CreateInstallRescheduledChangeReasonTenantProperties } from '../actions-v2/RescheduleBusinessInstallWorkOrderTenantDto';
|
|
@@ -4616,34 +4615,6 @@ export declare class WorkOrderRecord<TProps = WorkOrderProperties> {
|
|
|
4616
4615
|
journeyId?: string;
|
|
4617
4616
|
stageKey?: string;
|
|
4618
4617
|
}): ActionBuilder;
|
|
4619
|
-
/**
|
|
4620
|
-
* MoveCollectionWorkOrderToComplete
|
|
4621
|
-
*
|
|
4622
|
-
* Creates a new WorkOrder record with the specified properties.
|
|
4623
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
4624
|
-
*
|
|
4625
|
-
* @remarks Record type: COLLECTION
|
|
4626
|
-
*
|
|
4627
|
-
* @param properties - The properties for the new record
|
|
4628
|
-
* @param options - Optional settings
|
|
4629
|
-
* @param options.journeyId - Associate with a journey
|
|
4630
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
4631
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
4632
|
-
*
|
|
4633
|
-
* @example
|
|
4634
|
-
* ```typescript
|
|
4635
|
-
* // Create with properties
|
|
4636
|
-
* const record = odinClient.workOrders.new();
|
|
4637
|
-
* await record.moveCollectionWorkOrderToComplete({ ... }).execute();
|
|
4638
|
-
*
|
|
4639
|
-
* // Dry run (for debugging)
|
|
4640
|
-
* const payload = record.moveCollectionWorkOrderToComplete({ ... }).dryRun();
|
|
4641
|
-
* ```
|
|
4642
|
-
*/
|
|
4643
|
-
moveCollectionWorkOrderToComplete(properties?: MoveCollectionWorkOrderToCompleteProperties, options?: {
|
|
4644
|
-
journeyId?: string;
|
|
4645
|
-
stageKey?: string;
|
|
4646
|
-
}): ActionBuilder;
|
|
4647
4618
|
/**
|
|
4648
4619
|
* TestAction123321
|
|
4649
4620
|
*
|
|
@@ -5957,6 +5928,31 @@ export declare class WorkOrderRecord<TProps = WorkOrderProperties> {
|
|
|
5957
5928
|
moveCollectionWorkOrderToCancelled(options?: {
|
|
5958
5929
|
journeyId?: string;
|
|
5959
5930
|
}): ActionBuilder;
|
|
5931
|
+
/**
|
|
5932
|
+
* MoveCollectionWorkOrderToComplete
|
|
5933
|
+
*
|
|
5934
|
+
* Transitions this WorkOrder record to a new pipeline stage.
|
|
5935
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
5936
|
+
*
|
|
5937
|
+
* @remarks Transitions to stage: CollectionPipelineStageComplete
|
|
5938
|
+
*
|
|
5939
|
+
* @param options - Optional settings
|
|
5940
|
+
* @param options.journeyId - Associate with a journey
|
|
5941
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
5942
|
+
* @throws Error if called on a new (unsaved) record
|
|
5943
|
+
*
|
|
5944
|
+
* @example
|
|
5945
|
+
* ```typescript
|
|
5946
|
+
* const record = await odinClient.workOrders.get(id);
|
|
5947
|
+
* await record.moveCollectionWorkOrderToComplete().execute();
|
|
5948
|
+
*
|
|
5949
|
+
* // Dry run (for debugging)
|
|
5950
|
+
* const payload = record.moveCollectionWorkOrderToComplete().dryRun();
|
|
5951
|
+
* ```
|
|
5952
|
+
*/
|
|
5953
|
+
moveCollectionWorkOrderToComplete(options?: {
|
|
5954
|
+
journeyId?: string;
|
|
5955
|
+
}): ActionBuilder;
|
|
5960
5956
|
/**
|
|
5961
5957
|
* MoveDispatchAmcoToCancelled
|
|
5962
5958
|
*
|
|
@@ -7696,42 +7696,6 @@ class WorkOrderRecord {
|
|
|
7696
7696
|
};
|
|
7697
7697
|
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
7698
7698
|
}
|
|
7699
|
-
/**
|
|
7700
|
-
* MoveCollectionWorkOrderToComplete
|
|
7701
|
-
*
|
|
7702
|
-
* Creates a new WorkOrder record with the specified properties.
|
|
7703
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
7704
|
-
*
|
|
7705
|
-
* @remarks Record type: COLLECTION
|
|
7706
|
-
*
|
|
7707
|
-
* @param properties - The properties for the new record
|
|
7708
|
-
* @param options - Optional settings
|
|
7709
|
-
* @param options.journeyId - Associate with a journey
|
|
7710
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
7711
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
7712
|
-
*
|
|
7713
|
-
* @example
|
|
7714
|
-
* ```typescript
|
|
7715
|
-
* // Create with properties
|
|
7716
|
-
* const record = odinClient.workOrders.new();
|
|
7717
|
-
* await record.moveCollectionWorkOrderToComplete({ ... }).execute();
|
|
7718
|
-
*
|
|
7719
|
-
* // Dry run (for debugging)
|
|
7720
|
-
* const payload = record.moveCollectionWorkOrderToComplete({ ... }).dryRun();
|
|
7721
|
-
* ```
|
|
7722
|
-
*/
|
|
7723
|
-
moveCollectionWorkOrderToComplete(properties, options) {
|
|
7724
|
-
const payload = {
|
|
7725
|
-
entity: 'FieldServiceModule:WorkOrder',
|
|
7726
|
-
type: 'COLLECTION',
|
|
7727
|
-
actionName: 'MoveCollectionWorkOrderToComplete',
|
|
7728
|
-
properties: properties || {},
|
|
7729
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
7730
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
7731
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
7732
|
-
};
|
|
7733
|
-
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
7734
|
-
}
|
|
7735
7699
|
/**
|
|
7736
7700
|
* TestAction123321
|
|
7737
7701
|
*
|
|
@@ -9298,6 +9262,35 @@ class WorkOrderRecord {
|
|
|
9298
9262
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCollectionWorkOrderToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CollectionPipelineStageCancelled' }, options);
|
|
9299
9263
|
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
9300
9264
|
}
|
|
9265
|
+
/**
|
|
9266
|
+
* MoveCollectionWorkOrderToComplete
|
|
9267
|
+
*
|
|
9268
|
+
* Transitions this WorkOrder record to a new pipeline stage.
|
|
9269
|
+
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
9270
|
+
*
|
|
9271
|
+
* @remarks Transitions to stage: CollectionPipelineStageComplete
|
|
9272
|
+
*
|
|
9273
|
+
* @param options - Optional settings
|
|
9274
|
+
* @param options.journeyId - Associate with a journey
|
|
9275
|
+
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
9276
|
+
* @throws Error if called on a new (unsaved) record
|
|
9277
|
+
*
|
|
9278
|
+
* @example
|
|
9279
|
+
* ```typescript
|
|
9280
|
+
* const record = await odinClient.workOrders.get(id);
|
|
9281
|
+
* await record.moveCollectionWorkOrderToComplete().execute();
|
|
9282
|
+
*
|
|
9283
|
+
* // Dry run (for debugging)
|
|
9284
|
+
* const payload = record.moveCollectionWorkOrderToComplete().dryRun();
|
|
9285
|
+
* ```
|
|
9286
|
+
*/
|
|
9287
|
+
moveCollectionWorkOrderToComplete(options) {
|
|
9288
|
+
var _a;
|
|
9289
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
9290
|
+
throw new Error('moveCollectionWorkOrderToComplete requires an existing record. Use accessor.get() first.');
|
|
9291
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveCollectionWorkOrderToComplete', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'CollectionPipelineStageComplete' }, options);
|
|
9292
|
+
return new ActionBuilder(this._provider, 'FieldServiceModule', 'WorkOrder', payload, () => { this._pendingLinks = []; });
|
|
9293
|
+
}
|
|
9301
9294
|
/**
|
|
9302
9295
|
* MoveDispatchAmcoToCancelled
|
|
9303
9296
|
*
|
|
@@ -50,6 +50,7 @@ export { ActivityLogRecord, isActivityLogRecord } from './ActivityLogRecord';
|
|
|
50
50
|
export { AffiliateCodeRecord, isAffiliateCodeRecord } from './AffiliateCodeRecord';
|
|
51
51
|
export { AppointmentRecord, isAppointmentRecord } from './AppointmentRecord';
|
|
52
52
|
export { PgFileAllocationRecord, isPgFileAllocationRecord } from './PgFileAllocationRecord';
|
|
53
|
+
export { BrskEntityMigrationErrorRecord, isBrskEntityMigrationErrorRecord } from './BrskEntityMigrationErrorRecord';
|
|
53
54
|
export { ProductRecord, isProductRecord } from './ProductRecord';
|
|
54
55
|
export { CallEventRecord, isCallEventRecord } from './CallEventRecord';
|
|
55
56
|
export { CallTransferRecord, isCallTransferRecord } from './CallTransferRecord';
|
package/dist/records-v2/index.js
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.isOhInProgressAuditRecord = exports.OhInProgressAuditRecord = exports.isOhAuditOfInstallationRecord = exports.OhAuditOfInstallationRecord = exports.isUgRetroAuditRecord = exports.UgRetroAuditRecord = exports.isUgInProgressAuditRecord = exports.UgInProgressAuditRecord = exports.isUgInstallationAuditRecord = exports.UgInstallationAuditRecord = exports.isUgAuditOfInstallationRecord = exports.UgAuditOfInstallationRecord = exports.isConversationRecord = exports.ConversationRecord = exports.isOntReplacementApprovalRecord = exports.OntReplacementApprovalRecord = exports.isAccountRecord = exports.AccountRecord = exports.isPermissionToFailRecord = exports.PermissionToFailRecord = exports.isTransactionRecord = exports.TransactionRecord = exports.isPaymentRecord = exports.PaymentRecord = exports.isPICRequestRecord = exports.PICRequestRecord = exports.isChangeReasonRecord = exports.ChangeReasonRecord = exports.isChurnRequestRecord = exports.ChurnRequestRecord = exports.isBillingRequestRecord = exports.BillingRequestRecord = exports.isBillingAdjustmentRecord = exports.BillingAdjustmentRecord = exports.isServiceAppointmentConfigRecord = exports.ServiceAppointmentConfigRecord = exports.isCrmDatasetRecord = exports.CrmDatasetRecord = exports.isNoteRecord = exports.NoteRecord = exports.isContractBuyOutRecord = exports.ContractBuyOutRecord = exports.isCaseRecord = exports.CaseRecord = exports.isAddressRecord = exports.AddressRecord = exports.isWorkOrderRecord = exports.WorkOrderRecord = exports.isOrderRecord = exports.OrderRecord = void 0;
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.isCustomerPhonePortingRecord = exports.CustomerPhonePortingRecord = exports.isVisitRecord = exports.VisitRecord = exports.isUserRecord = exports.UserRecord = exports.isServiceRecord = exports.ServiceRecord = exports.isCallRecord = exports.CallRecord = exports.isCallLegRecord = exports.CallLegRecord = exports.isScheduleSlotRecord = exports.ScheduleSlotRecord = exports.isPriceBookRecord = exports.PriceBookRecord = exports.isOverlayRealA55Record = exports.OverlayRealA55Record = exports.isOfferRecord = exports.OfferRecord = exports.isServiceAppointmentRecord = exports.ServiceAppointmentRecord = exports.isOutageRecord = exports.OutageRecord = void 0;
|
|
15
|
+
exports.isCustomerDeviceConfigurationRecord = exports.CustomerDeviceConfigurationRecord = exports.isConversationFeedbackRecord = exports.ConversationFeedbackRecord = exports.isConfigRecord = exports.ConfigRecord = exports.isRewardRecord = exports.RewardRecord = exports.isContactRecord = exports.ContactRecord = exports.isCallTransferRecord = exports.CallTransferRecord = exports.isCallEventRecord = exports.CallEventRecord = exports.isProductRecord = exports.ProductRecord = exports.isBrskEntityMigrationErrorRecord = exports.BrskEntityMigrationErrorRecord = exports.isPgFileAllocationRecord = exports.PgFileAllocationRecord = exports.isAppointmentRecord = exports.AppointmentRecord = exports.isAffiliateCodeRecord = exports.AffiliateCodeRecord = exports.isActivityLogRecord = exports.ActivityLogRecord = exports.isAccountCreditRecord = exports.AccountCreditRecord = exports.isServiceVisitAuditRecord = exports.ServiceVisitAuditRecord = exports.isYfFieldServiceVisitRecord = exports.YfFieldServiceVisitRecord = exports.isRemediationOutcomeFormRecord = exports.RemediationOutcomeFormRecord = exports.isOhExternalAuditRecord = exports.OhExternalAuditRecord = exports.isUgExternalAuditRecord = exports.UgExternalAuditRecord = exports.isPaymentMethodRefundRecord = exports.PaymentMethodRefundRecord = exports.isInternalInstallAuditRecord = exports.InternalInstallAuditRecord = exports.isSweeperMaintenanceAuditRecord = exports.SweeperMaintenanceAuditRecord = exports.isBlockageA55Record = exports.BlockageA55Record = exports.isOhRetroAuditRecord = exports.OhRetroAuditRecord = exports.isOhInstallationAuditRecord = exports.OhInstallationAuditRecord = void 0;
|
|
16
|
+
exports.isPgDirectDebitFileRecord = exports.PgDirectDebitFileRecord = exports.isPgPaymentMethodRecord = exports.PgPaymentMethodRecord = exports.isPgLogRecord = exports.PgLogRecord = exports.isPgDisputeRecord = exports.PgDisputeRecord = exports.isPgContactRecord = exports.PgContactRecord = exports.isPaymentMethodRecord = exports.PaymentMethodRecord = exports.isSmsMessageRecord = exports.SmsMessageRecord = exports.isReferralRecord = exports.ReferralRecord = exports.isOrderCheckRecord = exports.OrderCheckRecord = exports.isCampaignRecord = exports.CampaignRecord = exports.isOneTouchSwitchRecord = exports.OneTouchSwitchRecord = exports.isReturnsRecord = exports.ReturnsRecord = exports.isNetworkDeviceRecord = exports.NetworkDeviceRecord = exports.isMessageRecord = exports.MessageRecord = exports.isLeadRecord = exports.LeadRecord = exports.isInvoiceItemRecord = exports.InvoiceItemRecord = exports.isImpersonationTrackerRecord = exports.ImpersonationTrackerRecord = exports.isActivityRecord = exports.ActivityRecord = exports.isFileRecord = exports.FileRecord = exports.isFieldServiceProductRecord = exports.FieldServiceProductRecord = exports.isFieldServiceDispatchedProductRecord = exports.FieldServiceDispatchedProductRecord = exports.isEmailTemplateRecord = exports.EmailTemplateRecord = exports.isEmailSenderRecord = exports.EmailSenderRecord = exports.isCustomerDeviceRouterRecord = exports.CustomerDeviceRouterRecord = exports.isCustomerDeviceOntRecord = exports.CustomerDeviceOntRecord = void 0;
|
|
17
|
+
exports.isRemediationRequiredReasonRecord = exports.RemediationRequiredReasonRecord = exports.isKnowledgeArticleRecord = exports.KnowledgeArticleRecord = exports.isInvoiceRecord = exports.InvoiceRecord = exports.isDiscountRecord = exports.DiscountRecord = exports.isCustomerDeviceAtaRecord = exports.CustomerDeviceAtaRecord = exports.isCreditNoteRecord = exports.CreditNoteRecord = exports.isTwilioUserUpdateRecord = exports.TwilioUserUpdateRecord = exports.isYfStockAuditRecord = exports.YfStockAuditRecord = exports.isWorkOrderStatusUpdateRecord = exports.WorkOrderStatusUpdateRecord = exports.isWayleaveAuditRecord = exports.WayleaveAuditRecord = exports.isEmailRecord = exports.EmailRecord = exports.isTimeSlotRecord = exports.TimeSlotRecord = exports.isTestEntityForVisualBuilderRecord = exports.TestEntityForVisualBuilderRecord = exports.isTeamRecord = exports.TeamRecord = exports.isSalesTerritoryRecord = exports.SalesTerritoryRecord = exports.isVoiceConfigurationRecord = exports.VoiceConfigurationRecord = exports.isOrderItemRecord = exports.OrderItemRecord = exports.isPushNotificationRecord = exports.PushNotificationRecord = exports.isPhoneNumberRecord = exports.PhoneNumberRecord = exports.isPgWebhookRecord = exports.PgWebhookRecord = exports.isPgWebhookAttemptRecord = exports.PgWebhookAttemptRecord = exports.isPgAccountValidationRecord = exports.PgAccountValidationRecord = exports.isPgTransactionRecord = exports.PgTransactionRecord = exports.isPgSortCodeSubstitutionRecord = exports.PgSortCodeSubstitutionRecord = exports.isPgVocalinkRecord = exports.PgVocalinkRecord = void 0;
|
|
18
|
+
exports.isCustomerPhonePortingRecord = exports.CustomerPhonePortingRecord = exports.isVisitRecord = exports.VisitRecord = exports.isUserRecord = exports.UserRecord = exports.isServiceRecord = exports.ServiceRecord = exports.isCallRecord = exports.CallRecord = exports.isCallLegRecord = exports.CallLegRecord = exports.isScheduleSlotRecord = exports.ScheduleSlotRecord = exports.isPriceBookRecord = exports.PriceBookRecord = exports.isOverlayRealA55Record = exports.OverlayRealA55Record = exports.isOfferRecord = exports.OfferRecord = exports.isServiceAppointmentRecord = exports.ServiceAppointmentRecord = exports.isOutageRecord = exports.OutageRecord = exports.isSiteSpecificRiskAssessmentOutcomeFormRecord = exports.SiteSpecificRiskAssessmentOutcomeFormRecord = void 0;
|
|
19
19
|
var OrderRecord_1 = require("./OrderRecord");
|
|
20
20
|
Object.defineProperty(exports, "OrderRecord", { enumerable: true, get: function () { return OrderRecord_1.OrderRecord; } });
|
|
21
21
|
Object.defineProperty(exports, "isOrderRecord", { enumerable: true, get: function () { return OrderRecord_1.isOrderRecord; } });
|
|
@@ -139,6 +139,9 @@ Object.defineProperty(exports, "isAppointmentRecord", { enumerable: true, get: f
|
|
|
139
139
|
var PgFileAllocationRecord_1 = require("./PgFileAllocationRecord");
|
|
140
140
|
Object.defineProperty(exports, "PgFileAllocationRecord", { enumerable: true, get: function () { return PgFileAllocationRecord_1.PgFileAllocationRecord; } });
|
|
141
141
|
Object.defineProperty(exports, "isPgFileAllocationRecord", { enumerable: true, get: function () { return PgFileAllocationRecord_1.isPgFileAllocationRecord; } });
|
|
142
|
+
var BrskEntityMigrationErrorRecord_1 = require("./BrskEntityMigrationErrorRecord");
|
|
143
|
+
Object.defineProperty(exports, "BrskEntityMigrationErrorRecord", { enumerable: true, get: function () { return BrskEntityMigrationErrorRecord_1.BrskEntityMigrationErrorRecord; } });
|
|
144
|
+
Object.defineProperty(exports, "isBrskEntityMigrationErrorRecord", { enumerable: true, get: function () { return BrskEntityMigrationErrorRecord_1.isBrskEntityMigrationErrorRecord; } });
|
|
142
145
|
var ProductRecord_1 = require("./ProductRecord");
|
|
143
146
|
Object.defineProperty(exports, "ProductRecord", { enumerable: true, get: function () { return ProductRecord_1.ProductRecord; } });
|
|
144
147
|
Object.defineProperty(exports, "isProductRecord", { enumerable: true, get: function () { return ProductRecord_1.isProductRecord; } });
|