@d19n/youfibre-odin-sdk 2.0.103-beta.17 → 2.0.103-beta.3
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 +1 -2
- package/dist/records-v2/CallLegRecord.d.ts +0 -27
- package/dist/records-v2/CallLegRecord.js +0 -29
- package/package.json +3 -26
- package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallRingingDto.d.ts +0 -81
- package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallRingingDto.js +0 -56
- package/dist/wholesale-provider/index.d.ts +0 -35
- package/dist/wholesale-provider/index.js +0 -64
- package/dist/wholesale-provider/interface.d.ts +0 -176
- package/dist/wholesale-provider/interface.js +0 -2
- package/dist/wholesale-provider/kci-effect-bridge.d.ts +0 -124
- package/dist/wholesale-provider/kci-effect-bridge.js +0 -493
- package/dist/wholesale-provider/providers/netomnia-provider.d.ts +0 -112
- package/dist/wholesale-provider/providers/netomnia-provider.js +0 -124
- package/dist/wholesale-provider/test/kci-effect-bridge.spec.d.ts +0 -1
- package/dist/wholesale-provider/test/kci-effect-bridge.spec.js +0 -211
- package/dist/wholesale-provider/test/netomnia-provider.spec.d.ts +0 -1
- package/dist/wholesale-provider/test/netomnia-provider.spec.js +0 -428
- package/dist/wholesale-provider/types/fibrecafe.d.ts +0 -519
- package/dist/wholesale-provider/types/fibrecafe.js +0 -21
- package/dist/wholesale-provider/types/vmo2.d.ts +0 -390
- package/dist/wholesale-provider/types/vmo2.js +0 -2
- package/dist/wholesale-provider/types/wholesale.d.ts +0 -51
- package/dist/wholesale-provider/types/wholesale.js +0 -9
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ This SDK includes **164** entities across **12** modules.
|
|
|
352
352
|
|
|
353
353
|
## Actions
|
|
354
354
|
|
|
355
|
-
This SDK includes **
|
|
355
|
+
This SDK includes **629** actions.
|
|
356
356
|
|
|
357
357
|
### Action Types
|
|
358
358
|
|
|
@@ -1116,7 +1116,6 @@ This SDK includes **630** actions.
|
|
|
1116
1116
|
| `UpdateAgentCallLegOnIncomingCallAnswered` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallAnswered |
|
|
1117
1117
|
| `UpdateAgentCallLegOnIncomingCallCanceled` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallCanceled |
|
|
1118
1118
|
| `UpdateAgentCallLegOnIncomingCallCompleted` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallCompleted |
|
|
1119
|
-
| `UpdateAgentCallLegOnIncomingCallRinging` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging |
|
|
1120
1119
|
| `UpdateCall` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCall |
|
|
1121
1120
|
| `UpdateCustomerCallLegOnIncomingCallAnswered` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnIncomingCallAnswered |
|
|
1122
1121
|
|
|
@@ -28,7 +28,6 @@ import { CreateCustomerCallLegProperties } from '../actions-v2/CreateCustomerCal
|
|
|
28
28
|
import { UpdateAgentCallLegOnIncomingCallAnsweredProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallAnsweredDto';
|
|
29
29
|
import { UpdateAgentCallLegOnIncomingCallCanceledProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallCanceledDto';
|
|
30
30
|
import { UpdateAgentCallLegOnIncomingCallCompletedProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallCompletedDto';
|
|
31
|
-
import { UpdateAgentCallLegOnIncomingCallRingingProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallRingingDto';
|
|
32
31
|
import { UpdateCallProperties } from '../actions-v2/UpdateCallDto';
|
|
33
32
|
import { UpdateCustomerCallLegOnIncomingCallAnsweredProperties } from '../actions-v2/UpdateCustomerCallLegOnIncomingCallAnsweredDto';
|
|
34
33
|
import { CallRecord } from './CallRecord';
|
|
@@ -352,32 +351,6 @@ export declare class CallLegRecord<TProps = CallLegProperties> {
|
|
|
352
351
|
journeyId?: string;
|
|
353
352
|
stageKey?: string;
|
|
354
353
|
}): ActionBuilder;
|
|
355
|
-
/**
|
|
356
|
-
* UpdateAgentCallLegOnIncomingCallRinging
|
|
357
|
-
*
|
|
358
|
-
* Updates this CallLeg record with the specified properties.
|
|
359
|
-
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
360
|
-
*
|
|
361
|
-
* @param properties - Required properties for this action
|
|
362
|
-
* @param options - Optional settings
|
|
363
|
-
* @param options.journeyId - Associate with a journey
|
|
364
|
-
* @param options.stageKey - Transition to pipeline stage
|
|
365
|
-
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
366
|
-
* @throws Error if called on a new (unsaved) record
|
|
367
|
-
*
|
|
368
|
-
* @example
|
|
369
|
-
* ```typescript
|
|
370
|
-
* const record = await odinClient.callLegs.get(id);
|
|
371
|
-
* await record.updateAgentCallLegOnIncomingCallRinging({ ... }).execute();
|
|
372
|
-
*
|
|
373
|
-
* // Dry run (for debugging)
|
|
374
|
-
* const payload = record.updateAgentCallLegOnIncomingCallRinging({ ... }).dryRun();
|
|
375
|
-
* ```
|
|
376
|
-
*/
|
|
377
|
-
updateAgentCallLegOnIncomingCallRinging(properties: UpdateAgentCallLegOnIncomingCallRingingProperties, options?: {
|
|
378
|
-
journeyId?: string;
|
|
379
|
-
stageKey?: string;
|
|
380
|
-
}): ActionBuilder;
|
|
381
354
|
/**
|
|
382
355
|
* UpdateCall
|
|
383
356
|
*
|
|
@@ -454,35 +454,6 @@ class CallLegRecord {
|
|
|
454
454
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAgentCallLegOnIncomingCallCompleted', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
455
455
|
return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
|
|
456
456
|
}
|
|
457
|
-
/**
|
|
458
|
-
* UpdateAgentCallLegOnIncomingCallRinging
|
|
459
|
-
*
|
|
460
|
-
* Updates this CallLeg record with the specified properties.
|
|
461
|
-
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
462
|
-
*
|
|
463
|
-
* @param properties - Required properties for this action
|
|
464
|
-
* @param options - Optional settings
|
|
465
|
-
* @param options.journeyId - Associate with a journey
|
|
466
|
-
* @param options.stageKey - Transition to pipeline stage
|
|
467
|
-
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
468
|
-
* @throws Error if called on a new (unsaved) record
|
|
469
|
-
*
|
|
470
|
-
* @example
|
|
471
|
-
* ```typescript
|
|
472
|
-
* const record = await odinClient.callLegs.get(id);
|
|
473
|
-
* await record.updateAgentCallLegOnIncomingCallRinging({ ... }).execute();
|
|
474
|
-
*
|
|
475
|
-
* // Dry run (for debugging)
|
|
476
|
-
* const payload = record.updateAgentCallLegOnIncomingCallRinging({ ... }).dryRun();
|
|
477
|
-
* ```
|
|
478
|
-
*/
|
|
479
|
-
updateAgentCallLegOnIncomingCallRinging(properties, options) {
|
|
480
|
-
var _a;
|
|
481
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
482
|
-
throw new Error('updateAgentCallLegOnIncomingCallRinging requires an existing record. Use accessor.get() first.');
|
|
483
|
-
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAgentCallLegOnIncomingCallRinging', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
484
|
-
return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
|
|
485
|
-
}
|
|
486
457
|
/**
|
|
487
458
|
* UpdateCall
|
|
488
459
|
*
|
package/package.json
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d19n/youfibre-odin-sdk",
|
|
3
|
-
"version": "2.0.103-beta.
|
|
3
|
+
"version": "2.0.103-beta.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "@d19n",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"require": "./dist/index.js",
|
|
12
|
-
"import": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
14
|
-
},
|
|
15
|
-
"./wholesale-provider": {
|
|
16
|
-
"require": "./dist/wholesale-provider/index.js",
|
|
17
|
-
"import": "./dist/wholesale-provider/index.js",
|
|
18
|
-
"types": "./dist/wholesale-provider/index.d.ts"
|
|
19
|
-
},
|
|
20
|
-
"./dist/wholesale-provider": {
|
|
21
|
-
"require": "./dist/wholesale-provider/index.js",
|
|
22
|
-
"import": "./dist/wholesale-provider/index.js",
|
|
23
|
-
"types": "./dist/wholesale-provider/index.d.ts"
|
|
24
|
-
},
|
|
25
|
-
"./dist/*": {
|
|
26
|
-
"require": "./dist/*.js",
|
|
27
|
-
"import": "./dist/*.js",
|
|
28
|
-
"types": "./dist/*.d.ts"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
9
|
"devDependencies": {
|
|
32
10
|
"ts-node": "^10.9.2",
|
|
33
11
|
"typescript": "4.8.4"
|
|
@@ -37,9 +15,8 @@
|
|
|
37
15
|
"@d19n/odin-types": "^3.0.41"
|
|
38
16
|
},
|
|
39
17
|
"scripts": {
|
|
40
|
-
"
|
|
41
|
-
"release:
|
|
42
|
-
"release:prod": "git pull --ff-only && rm -rf dist && tsc && npm version patch && git push && npm publish --tag latest"
|
|
18
|
+
"release:beta": "rm -rf dist && tsc && npm version prerelease --preid=beta && git push && npm publish --tag beta",
|
|
19
|
+
"release:prod": "rm -rf dist && tsc && npm version patch && git push && npm publish --tag latest"
|
|
43
20
|
},
|
|
44
21
|
"files": [
|
|
45
22
|
"dist",
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UpdateAgentCallLegOnIncomingCallRinging Action DTO
|
|
3
|
-
*
|
|
4
|
-
* Update agent call leg on incoming call ringing
|
|
5
|
-
*
|
|
6
|
-
* @module NotificationModule
|
|
7
|
-
* @entity CallLeg
|
|
8
|
-
* @actionKey UpdateAgentCallLegOnIncomingCallRinging
|
|
9
|
-
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
|
|
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 UpdateAgentCallLegOnIncomingCallRinging updated events
|
|
16
|
-
*
|
|
17
|
-
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
|
|
18
|
-
*/
|
|
19
|
-
export interface UpdateAgentCallLegOnIncomingCallRingingMessage extends OdinRecordUpdatedEvent<UpdateAgentCallLegOnIncomingCallRingingDto, UpdateAgentCallLegOnIncomingCallRingingProperties> {
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Properties for UpdateAgentCallLegOnIncomingCallRinging action
|
|
23
|
-
*
|
|
24
|
-
* @property Required fields: 2
|
|
25
|
-
* @property Optional fields: 0
|
|
26
|
-
*/
|
|
27
|
-
export interface UpdateAgentCallLegOnIncomingCallRingingProperties {
|
|
28
|
-
/**
|
|
29
|
-
* RingingAt
|
|
30
|
-
*
|
|
31
|
-
* Data field for CallLeg records. Used by Communications team.
|
|
32
|
-
* @type {DATE_TIME}
|
|
33
|
-
* @required
|
|
34
|
-
*/
|
|
35
|
-
RingingAt: string;
|
|
36
|
-
/**
|
|
37
|
-
* Status
|
|
38
|
-
*
|
|
39
|
-
* Status indicator for CallLeg records. Tracks lifecycle state. Used by Communications team.
|
|
40
|
-
* @type {ENUM}
|
|
41
|
-
* @required
|
|
42
|
-
*/
|
|
43
|
-
Status: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* UpdateAgentCallLegOnIncomingCallRinging
|
|
47
|
-
*
|
|
48
|
-
* Update agent call leg on incoming call ringing
|
|
49
|
-
*
|
|
50
|
-
* @actionType UPDATE - Updates an existing CallLeg record
|
|
51
|
-
* @module NotificationModule
|
|
52
|
-
* @entity CallLeg
|
|
53
|
-
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
|
|
54
|
-
* @permission schema.action.updateagentcalllegonincomingcallringing.trigger
|
|
55
|
-
* @benchmark This action is tracked for performance benchmarks
|
|
56
|
-
*/
|
|
57
|
-
export declare class UpdateAgentCallLegOnIncomingCallRingingDto extends OdinRecordUpdateDto<UpdateAgentCallLegOnIncomingCallRingingProperties> {
|
|
58
|
-
/** Used by SDK generators to identify action type */
|
|
59
|
-
static readonly ACTION_TYPE = "UPDATE";
|
|
60
|
-
static readonly ACTION_KEY = "UpdateAgentCallLegOnIncomingCallRinging";
|
|
61
|
-
static readonly MODULE_NAME = "NotificationModule";
|
|
62
|
-
static readonly ENTITIES: string[];
|
|
63
|
-
static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging";
|
|
64
|
-
static readonly PERMISSION = "schema.action.updateagentcalllegonincomingcallringing.trigger";
|
|
65
|
-
/** Step metadata - entity this action targets */
|
|
66
|
-
static readonly STEP_ENTITY = "NotificationModule:CallLeg";
|
|
67
|
-
static readonly STEP_SCHEMA_ID = "75c59745-35fb-44b9-b3f2-7563101fdcec";
|
|
68
|
-
static readonly STEP_SCHEMA_ACTION_ID = "a16ff881-91e5-449d-b5e2-c9556dd2e850";
|
|
69
|
-
static readonly AUTO_LINK_PARENT = false;
|
|
70
|
-
readonly actionName: string;
|
|
71
|
-
readonly schemaActionId: string;
|
|
72
|
-
readonly entity: string;
|
|
73
|
-
constructor(record: OdinRecord<any> | {
|
|
74
|
-
id: string;
|
|
75
|
-
entity: string;
|
|
76
|
-
type?: string;
|
|
77
|
-
}, properties: UpdateAgentCallLegOnIncomingCallRingingProperties, options?: {
|
|
78
|
-
journeyId?: string;
|
|
79
|
-
stageKey?: string;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* UpdateAgentCallLegOnIncomingCallRinging Action DTO
|
|
4
|
-
*
|
|
5
|
-
* Update agent call leg on incoming call ringing
|
|
6
|
-
*
|
|
7
|
-
* @module NotificationModule
|
|
8
|
-
* @entity CallLeg
|
|
9
|
-
* @actionKey UpdateAgentCallLegOnIncomingCallRinging
|
|
10
|
-
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
|
|
11
|
-
*
|
|
12
|
-
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.UpdateAgentCallLegOnIncomingCallRingingDto = void 0;
|
|
16
|
-
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
-
/**
|
|
18
|
-
* UpdateAgentCallLegOnIncomingCallRinging
|
|
19
|
-
*
|
|
20
|
-
* Update agent call leg on incoming call ringing
|
|
21
|
-
*
|
|
22
|
-
* @actionType UPDATE - Updates an existing CallLeg record
|
|
23
|
-
* @module NotificationModule
|
|
24
|
-
* @entity CallLeg
|
|
25
|
-
* @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
|
|
26
|
-
* @permission schema.action.updateagentcalllegonincomingcallringing.trigger
|
|
27
|
-
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
-
*/
|
|
29
|
-
class UpdateAgentCallLegOnIncomingCallRingingDto extends core_1.OdinRecordUpdateDto {
|
|
30
|
-
constructor(record, properties, options) {
|
|
31
|
-
super({
|
|
32
|
-
id: record.id,
|
|
33
|
-
entity: record.entity,
|
|
34
|
-
type: record.type,
|
|
35
|
-
properties,
|
|
36
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
37
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
|
-
});
|
|
39
|
-
this.actionName = 'UpdateAgentCallLegOnIncomingCallRinging';
|
|
40
|
-
this.schemaActionId = 'a16ff881-91e5-449d-b5e2-c9556dd2e850';
|
|
41
|
-
this.entity = 'NotificationModule:CallLeg';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.UpdateAgentCallLegOnIncomingCallRingingDto = UpdateAgentCallLegOnIncomingCallRingingDto;
|
|
45
|
-
/** Used by SDK generators to identify action type */
|
|
46
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.ACTION_KEY = 'UpdateAgentCallLegOnIncomingCallRinging';
|
|
48
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.MODULE_NAME = 'NotificationModule';
|
|
49
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.ENTITIES = ['CallLeg'];
|
|
50
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging';
|
|
51
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.PERMISSION = 'schema.action.updateagentcalllegonincomingcallringing.trigger';
|
|
52
|
-
/** Step metadata - entity this action targets */
|
|
53
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.STEP_ENTITY = 'NotificationModule:CallLeg';
|
|
54
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.STEP_SCHEMA_ID = '75c59745-35fb-44b9-b3f2-7563101fdcec';
|
|
55
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.STEP_SCHEMA_ACTION_ID = 'a16ff881-91e5-449d-b5e2-c9556dd2e850';
|
|
56
|
-
UpdateAgentCallLegOnIncomingCallRingingDto.AUTO_LINK_PARENT = false;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wholesale provider — subpath barrel.
|
|
3
|
-
*
|
|
4
|
-
* Consumers import from `@d19n/youfibre-odin-sdk/dist/wholesale-provider`:
|
|
5
|
-
*
|
|
6
|
-
* ```ts
|
|
7
|
-
* import {
|
|
8
|
-
* WholesaleProvider,
|
|
9
|
-
* NetomniaProvider,
|
|
10
|
-
* NetomniaProviderDeps,
|
|
11
|
-
* } from '@d19n/youfibre-odin-sdk/dist/wholesale-provider';
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* **Architecture (Path B / pass-through delegation):**
|
|
15
|
-
* - `WholesaleProvider` is a strategy-dispatchable interface. Method names
|
|
16
|
-
* align with VMO2 spec where it makes sense; args match existing NET
|
|
17
|
-
* module method signatures.
|
|
18
|
-
* - `NetomniaProvider implements WholesaleProvider` — pass-through to deps
|
|
19
|
-
* wired by modules to their existing NestJS-injected NET methods. Zero
|
|
20
|
-
* transformation at the boundary.
|
|
21
|
-
* - VMO2-shaped types (`./types/vmo2`) and FibreCafe-shaped types
|
|
22
|
-
* (`./types/fibrecafe`) are exported as **reference types** for future
|
|
23
|
-
* use (Vmo2Provider implementation, module DTO consolidation). They are
|
|
24
|
-
* NOT on the WholesaleProvider public surface in Phase 0.
|
|
25
|
-
*
|
|
26
|
-
* Linked: T-20260508-009 / T-20260508-010
|
|
27
|
-
*/
|
|
28
|
-
export type { WholesaleProvider, CreateOrderOptions, CancellationReasonCode, ReserveAppointmentArgs, ListAppointmentsArgs, ScheduleServiceWorkOrderArgs, RescheduleServiceWorkOrderArgs, AmendAppointmentArgs, SyncWorkOrderToSupplierArgs, UpdateOrderExternalRefArgs, } from './interface';
|
|
29
|
-
export type { WholesaleResult, WholesaleSyncResponse, WholesaleRejectionResponse, WholesaleRejectionMessage, WholesaleBUS, WholesaleSYS, ISO8601DateTime, ISODate, TransactionId, UPRN, UUID, SwitchOrderReference, } from './types/wholesale';
|
|
30
|
-
export { NetomniaProvider, AggregateNotificationError } from './providers/netomnia-provider';
|
|
31
|
-
export type { NetomniaProviderDeps } from './providers/netomnia-provider';
|
|
32
|
-
export { KCI_EFFECT_ROWS, decideKciDispatch, detectKciKind, } from './kci-effect-bridge';
|
|
33
|
-
export type { KciServiceOrderKind, YfWoComposedActionKey, YfKciEffectKind, YfKciTargetEntity, YfKciEffect, KciEffectRow, KciDispatchDecision, } from './kci-effect-bridge';
|
|
34
|
-
export type { VMO2OrderId, VMO2RequestId, VMO2AppointmentKey, VMO2PremiseId, VMO2OrderNotificationType, VMO2SMRNotificationType, VMO2NotificationEnvelope, VMO2OrderNotification, VMO2SMRNotification, VMO2InboundNotification, } from './types/vmo2';
|
|
35
|
-
export * from './types/fibrecafe';
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Wholesale provider — subpath barrel.
|
|
4
|
-
*
|
|
5
|
-
* Consumers import from `@d19n/youfibre-odin-sdk/dist/wholesale-provider`:
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* import {
|
|
9
|
-
* WholesaleProvider,
|
|
10
|
-
* NetomniaProvider,
|
|
11
|
-
* NetomniaProviderDeps,
|
|
12
|
-
* } from '@d19n/youfibre-odin-sdk/dist/wholesale-provider';
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* **Architecture (Path B / pass-through delegation):**
|
|
16
|
-
* - `WholesaleProvider` is a strategy-dispatchable interface. Method names
|
|
17
|
-
* align with VMO2 spec where it makes sense; args match existing NET
|
|
18
|
-
* module method signatures.
|
|
19
|
-
* - `NetomniaProvider implements WholesaleProvider` — pass-through to deps
|
|
20
|
-
* wired by modules to their existing NestJS-injected NET methods. Zero
|
|
21
|
-
* transformation at the boundary.
|
|
22
|
-
* - VMO2-shaped types (`./types/vmo2`) and FibreCafe-shaped types
|
|
23
|
-
* (`./types/fibrecafe`) are exported as **reference types** for future
|
|
24
|
-
* use (Vmo2Provider implementation, module DTO consolidation). They are
|
|
25
|
-
* NOT on the WholesaleProvider public surface in Phase 0.
|
|
26
|
-
*
|
|
27
|
-
* Linked: T-20260508-009 / T-20260508-010
|
|
28
|
-
*/
|
|
29
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
30
|
-
if (k2 === undefined) k2 = k;
|
|
31
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
32
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
33
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
34
|
-
}
|
|
35
|
-
Object.defineProperty(o, k2, desc);
|
|
36
|
-
}) : (function(o, m, k, k2) {
|
|
37
|
-
if (k2 === undefined) k2 = k;
|
|
38
|
-
o[k2] = m[k];
|
|
39
|
-
}));
|
|
40
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
41
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
42
|
-
};
|
|
43
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.detectKciKind = exports.decideKciDispatch = exports.KCI_EFFECT_ROWS = exports.AggregateNotificationError = exports.NetomniaProvider = void 0;
|
|
45
|
-
// ── Provider implementation ───────────────────────────────────────────
|
|
46
|
-
var netomnia_provider_1 = require("./providers/netomnia-provider");
|
|
47
|
-
Object.defineProperty(exports, "NetomniaProvider", { enumerable: true, get: function () { return netomnia_provider_1.NetomniaProvider; } });
|
|
48
|
-
Object.defineProperty(exports, "AggregateNotificationError", { enumerable: true, get: function () { return netomnia_provider_1.AggregateNotificationError; } });
|
|
49
|
-
// ── KCI effect bridge (canonical typed catalog + walker) ──────────────
|
|
50
|
-
var kci_effect_bridge_1 = require("./kci-effect-bridge");
|
|
51
|
-
Object.defineProperty(exports, "KCI_EFFECT_ROWS", { enumerable: true, get: function () { return kci_effect_bridge_1.KCI_EFFECT_ROWS; } });
|
|
52
|
-
Object.defineProperty(exports, "decideKciDispatch", { enumerable: true, get: function () { return kci_effect_bridge_1.decideKciDispatch; } });
|
|
53
|
-
Object.defineProperty(exports, "detectKciKind", { enumerable: true, get: function () { return kci_effect_bridge_1.detectKciKind; } });
|
|
54
|
-
// ── Reference types (re-exported — not on WholesaleProvider surface) ──
|
|
55
|
-
//
|
|
56
|
-
// FibreCafe wire-format types — useful for module-level DTO consolidation
|
|
57
|
-
// or building the VMO2 wire request inside a future Vmo2Provider. These
|
|
58
|
-
// are NOT used by NetomniaProviderDeps in Path B; the deps shape is YF-
|
|
59
|
-
// context-shaped.
|
|
60
|
-
//
|
|
61
|
-
// Re-exported with `export *` because TS 4.8 doesn't support `export type *`.
|
|
62
|
-
// All declarations in fibrecafe.ts are types/interfaces with no runtime
|
|
63
|
-
// exports, so `export *` re-exports them as types only (no JS code emit).
|
|
64
|
-
__exportStar(require("./types/fibrecafe"), exports);
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WholesaleProvider — strategy-dispatchable interface for wholesale supplier
|
|
3
|
-
* integrations (Netomnia today, VMO2 from July 2026).
|
|
4
|
-
*
|
|
5
|
-
* **Architecture (T-20260508-009/010 — confirmed with Frank 2026-05-09 as
|
|
6
|
-
* "Path B / first step"):**
|
|
7
|
-
*
|
|
8
|
-
* Methods take YF-context arguments (orderId, principal, etc.) — matching
|
|
9
|
-
* the existing NET module method signatures. Each provider implementation
|
|
10
|
-
* builds the supplier-specific wire request internally from this YF context.
|
|
11
|
-
*
|
|
12
|
-
* Rationale:
|
|
13
|
-
* - Existing NET module methods take YF context, not wire DTOs. The SDK
|
|
14
|
-
* provider abstracts the supplier dispatch layer, not the DTO-building.
|
|
15
|
-
* - Method names align with VMO2 spec where it makes sense (`createOrder`,
|
|
16
|
-
* `cancelOrder`, etc.) so call-site vocabulary doesn't change when the
|
|
17
|
-
* provider switches.
|
|
18
|
-
* - When VMO2 ships, Vmo2Provider implements the same method names with
|
|
19
|
-
* args that may differ slightly. Frank's framing: "we adjust function
|
|
20
|
-
* arguments, nothing beyond that — we map X to Y and get the same result."
|
|
21
|
-
*
|
|
22
|
-
* **Trade-off accepted:** the interface is shaped after NET reality, not
|
|
23
|
-
* VMO2. That keeps Phase 0 a strict drop-in replacement. We can standardize
|
|
24
|
-
* args further once VMO2 ships if a tighter cross-provider abstraction
|
|
25
|
-
* proves valuable.
|
|
26
|
-
*
|
|
27
|
-
* **Type pragmatics:** principal/options/return values use `unknown` /
|
|
28
|
-
* `Record<string, unknown>` so the SDK doesn't need to depend on
|
|
29
|
-
* NestJS-decorated entity types. Modules cast at the wiring boundary (where
|
|
30
|
-
* full types are available).
|
|
31
|
-
*/
|
|
32
|
-
import type { VMO2OrderNotification, VMO2SMRNotification } from './types/vmo2';
|
|
33
|
-
import type { FibreCafeServiceAvailability200, FibreCafeAvailableAppointments200, FibreCafeReserveAppointment201, FibreCafeScheduleServiceWorkOrder201, FibreCafeRescheduleServiceWorkOrder200, FibreCafeOrderCreate202, FibreCafeOrderAmendAccept202, FibreCafeKciDto } from './types/fibrecafe';
|
|
34
|
-
import type { OrderRecord } from '../records-v2/OrderRecord';
|
|
35
|
-
/**
|
|
36
|
-
* Reasons a cancellation request can be made (NET wire-level enum value
|
|
37
|
-
* passed through to the FibreCafe gateway).
|
|
38
|
-
*/
|
|
39
|
-
export declare type CancellationReasonCode = string;
|
|
40
|
-
export interface CreateOrderOptions {
|
|
41
|
-
doNotCreateServiceAppointment?: boolean;
|
|
42
|
-
externalRefBrskFno?: string;
|
|
43
|
-
externalRefBrskIsp?: string;
|
|
44
|
-
/** Provider-specific extras — populated as needed per provider. */
|
|
45
|
-
[extra: string]: unknown;
|
|
46
|
-
}
|
|
47
|
-
export interface ReserveAppointmentArgs {
|
|
48
|
-
yfAppointmentId: string;
|
|
49
|
-
uprn: number;
|
|
50
|
-
startDateTime: string;
|
|
51
|
-
endDateTime: string;
|
|
52
|
-
/** 'PROVIDE' / 'REPAIR' / 'MODIFY' or supplier-specific. */
|
|
53
|
-
purpose: string;
|
|
54
|
-
yfOrderId: string;
|
|
55
|
-
woProperties: {
|
|
56
|
-
ServiceCallReason?: string;
|
|
57
|
-
WorkOrderExternalReference?: string;
|
|
58
|
-
};
|
|
59
|
-
flow: 'FIRST_TIME_BOOKING' | 'RESCHEDULE';
|
|
60
|
-
}
|
|
61
|
-
export interface ListAppointmentsArgs {
|
|
62
|
-
uprn: number;
|
|
63
|
-
/** ISO date the appointment search starts from. */
|
|
64
|
-
start: string;
|
|
65
|
-
appointmentPurpose: 'PROVIDE' | 'REPAIR';
|
|
66
|
-
}
|
|
67
|
-
export interface ScheduleServiceWorkOrderArgs {
|
|
68
|
-
yfWorkOrderId: string;
|
|
69
|
-
uprn: number;
|
|
70
|
-
startDateTime: string;
|
|
71
|
-
endDateTime: string;
|
|
72
|
-
yfOrderId: string;
|
|
73
|
-
properties: {
|
|
74
|
-
ServiceCallReason?: string;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export interface RescheduleServiceWorkOrderArgs {
|
|
78
|
-
yfWorkOrderId: string;
|
|
79
|
-
uprn: number;
|
|
80
|
-
startDateTime: string;
|
|
81
|
-
endDateTime: string;
|
|
82
|
-
yfOrderId: string;
|
|
83
|
-
}
|
|
84
|
-
export interface AmendAppointmentArgs {
|
|
85
|
-
yfOrderId: string;
|
|
86
|
-
yfWorkOrderId: string;
|
|
87
|
-
supplierAppointmentReference: string;
|
|
88
|
-
}
|
|
89
|
-
export interface SyncWorkOrderToSupplierArgs<TPrincipal = unknown> {
|
|
90
|
-
principal: TPrincipal;
|
|
91
|
-
yfOrderId: string;
|
|
92
|
-
yfWorkOrderId: string;
|
|
93
|
-
yfChangeReason: {
|
|
94
|
-
id?: string;
|
|
95
|
-
externalId: string;
|
|
96
|
-
entity: string;
|
|
97
|
-
type: unknown;
|
|
98
|
-
properties: unknown;
|
|
99
|
-
};
|
|
100
|
-
yfServiceAppointment: {
|
|
101
|
-
id?: string;
|
|
102
|
-
entity: string;
|
|
103
|
-
type: unknown;
|
|
104
|
-
properties: unknown;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
export interface UpdateOrderExternalRefArgs {
|
|
108
|
-
oldYfId: string;
|
|
109
|
-
newYfId: string;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Capability-shaped interface to a wholesale supplier. Method NAMES align
|
|
113
|
-
* with VMO2 spec where it makes sense; ARGS match existing NET module
|
|
114
|
-
* method signatures. Each provider implementation translates these args
|
|
115
|
-
* into its supplier wire format internally.
|
|
116
|
-
*
|
|
117
|
-
* Returns are typed loosely — modules know the return shape via the dep
|
|
118
|
-
* function they wire in.
|
|
119
|
-
*/
|
|
120
|
-
/**
|
|
121
|
-
* Generic in `TPrincipal` so call sites get full typing on the user/org
|
|
122
|
-
* principal that NestJS injects via the `@Principal()` decorator. Modules
|
|
123
|
-
* specialize at the wiring boundary:
|
|
124
|
-
*
|
|
125
|
-
* ```ts
|
|
126
|
-
* class WholesaleProviderFactory {
|
|
127
|
-
* constructor(@Inject(...) private netomnia: WholesaleProvider<OrganizationUserEntity>) {}
|
|
128
|
-
* get(...): WholesaleProvider<OrganizationUserEntity> { ... }
|
|
129
|
-
* }
|
|
130
|
-
* ```
|
|
131
|
-
*
|
|
132
|
-
* `FibreCafeKciDto` is fixed as the inbound KCI envelope — that's the
|
|
133
|
-
* canonical wire shape Netomnia sends (per the FibreCafe Tenant Updates
|
|
134
|
-
* spec). Modules consuming the SDK should consolidate any local KCI type
|
|
135
|
-
* to alias `FibreCafeKciDto` rather than maintain a duplicate.
|
|
136
|
-
*
|
|
137
|
-
* Default `TPrincipal = unknown` lets the SDK compile standalone without
|
|
138
|
-
* tenant-specific type imports.
|
|
139
|
-
*/
|
|
140
|
-
export interface WholesaleProvider<TPrincipal = unknown> {
|
|
141
|
-
searchAddress(uprn: number): Promise<FibreCafeServiceAvailability200>;
|
|
142
|
-
listAppointments(args: ListAppointmentsArgs): Promise<FibreCafeAvailableAppointments200>;
|
|
143
|
-
reserveAppointment(args: ReserveAppointmentArgs): Promise<FibreCafeReserveAppointment201>;
|
|
144
|
-
scheduleServiceWorkOrder(args: ScheduleServiceWorkOrderArgs): Promise<FibreCafeScheduleServiceWorkOrder201>;
|
|
145
|
-
rescheduleServiceWorkOrder(args: RescheduleServiceWorkOrderArgs): Promise<FibreCafeRescheduleServiceWorkOrder200>;
|
|
146
|
-
amendAppointment(args: AmendAppointmentArgs): Promise<FibreCafeOrderAmendAccept202>;
|
|
147
|
-
/**
|
|
148
|
-
* Sold→Supply dispatch. Existing NET impl returns void after async dispatch
|
|
149
|
-
* (the actual order acknowledgement arrives later as an inbound KCI).
|
|
150
|
-
*/
|
|
151
|
-
createOrder(principal: TPrincipal, orderId: string, options?: CreateOrderOptions): Promise<void>;
|
|
152
|
-
/** Tier-change CoS — wraps `createModifyOrderForYfOrder` style args. Returns null when already at target SKU. */
|
|
153
|
-
amendOrder(principal: TPrincipal, yfOrderId: string): Promise<FibreCafeOrderCreate202 | null>;
|
|
154
|
-
/** Pre-install cancel of an in-flight provide order. */
|
|
155
|
-
cancelOrder(yfOrderId: string, reasonCode: CancellationReasonCode): Promise<FibreCafeOrderCreate202>;
|
|
156
|
-
/** Active-customer cease (post-Active churn / OTS-losing). */
|
|
157
|
-
ceaseOrder(yfOrderId: string, serviceId: string): Promise<FibreCafeOrderCreate202>;
|
|
158
|
-
/** Inbound supplier KCI / notification handler. */
|
|
159
|
-
receiveKci(principal: TPrincipal, dto: FibreCafeKciDto): Promise<void>;
|
|
160
|
-
/** Outbound YF→supplier WO sync (cancel propagation, etc.). */
|
|
161
|
-
syncWorkOrderToSupplier(args: SyncWorkOrderToSupplierArgs<TPrincipal>): Promise<void>;
|
|
162
|
-
/** Inbound supplier→YF WO change application (post-receiveKci). */
|
|
163
|
-
syncWorkOrderFromSupplier(order: OrderRecord, dto: FibreCafeKciDto): Promise<void>;
|
|
164
|
-
retrieveServiceIdByUprn(uprn: number): Promise<string | null>;
|
|
165
|
-
updateOrderExternalRef(args: UpdateOrderExternalRefArgs): Promise<void>;
|
|
166
|
-
/**
|
|
167
|
-
* Register a typed handler for fanout of supplier order notifications.
|
|
168
|
-
* The webhook controller invokes `dispatchOrderNotification` on the
|
|
169
|
-
* provider after envelope-mapping; registered handlers are called in
|
|
170
|
-
* order with the normalized `VMO2OrderNotification` envelope (the
|
|
171
|
-
* SDK uses VMO2 envelope types as the cross-supplier normalization
|
|
172
|
-
* shape — easier to reason about + matches the upcoming VMO2 wire).
|
|
173
|
-
*/
|
|
174
|
-
onOrderNotification(handler: (n: VMO2OrderNotification) => Promise<void>): void;
|
|
175
|
-
onSMRNotification(handler: (n: VMO2SMRNotification) => Promise<void>): void;
|
|
176
|
-
}
|