@d19n/youfibre-odin-sdk 2.0.103-beta.4 → 2.0.103-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1116,7 +1116,7 @@ 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
- | `UpdateAgentCallLegOnIncomingCallRinding` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinding |
1119
+ | `UpdateAgentCallLegOnIncomingCallRinging` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging |
1120
1120
  | `UpdateCall` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCall |
1121
1121
  | `UpdateCustomerCallLegOnIncomingCallAnswered` | UPDATE | k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnIncomingCallAnswered |
1122
1122
 
@@ -1,30 +1,30 @@
1
1
  /**
2
- * UpdateAgentCallLegOnIncomingCallRinding Action DTO
2
+ * UpdateAgentCallLegOnIncomingCallRinging Action DTO
3
3
  *
4
- * Update agent call leg on incoming call rinding
4
+ * Update agent call leg on incoming call ringing
5
5
  *
6
6
  * @module NotificationModule
7
7
  * @entity CallLeg
8
- * @actionKey UpdateAgentCallLegOnIncomingCallRinding
9
- * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinding
8
+ * @actionKey UpdateAgentCallLegOnIncomingCallRinging
9
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
10
10
  *
11
11
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
12
12
  */
13
13
  import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
14
14
  /**
15
- * RabbitMQ message payload for UpdateAgentCallLegOnIncomingCallRinding updated events
15
+ * RabbitMQ message payload for UpdateAgentCallLegOnIncomingCallRinging updated events
16
16
  *
17
- * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinding
17
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
18
18
  */
19
- export interface UpdateAgentCallLegOnIncomingCallRindingMessage extends OdinRecordUpdatedEvent<UpdateAgentCallLegOnIncomingCallRindingDto, UpdateAgentCallLegOnIncomingCallRindingProperties> {
19
+ export interface UpdateAgentCallLegOnIncomingCallRingingMessage extends OdinRecordUpdatedEvent<UpdateAgentCallLegOnIncomingCallRingingDto, UpdateAgentCallLegOnIncomingCallRingingProperties> {
20
20
  }
21
21
  /**
22
- * Properties for UpdateAgentCallLegOnIncomingCallRinding action
22
+ * Properties for UpdateAgentCallLegOnIncomingCallRinging action
23
23
  *
24
24
  * @property Required fields: 2
25
25
  * @property Optional fields: 0
26
26
  */
27
- export interface UpdateAgentCallLegOnIncomingCallRindingProperties {
27
+ export interface UpdateAgentCallLegOnIncomingCallRingingProperties {
28
28
  /**
29
29
  * RingingAt
30
30
  *
@@ -43,29 +43,29 @@ export interface UpdateAgentCallLegOnIncomingCallRindingProperties {
43
43
  Status: string;
44
44
  }
45
45
  /**
46
- * UpdateAgentCallLegOnIncomingCallRinding
46
+ * UpdateAgentCallLegOnIncomingCallRinging
47
47
  *
48
- * Update agent call leg on incoming call rinding
48
+ * Update agent call leg on incoming call ringing
49
49
  *
50
50
  * @actionType UPDATE - Updates an existing CallLeg record
51
51
  * @module NotificationModule
52
52
  * @entity CallLeg
53
- * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinding
54
- * @permission schema.action.updateagentcalllegonincomingcallrinding.trigger
53
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging
54
+ * @permission schema.action.updateagentcalllegonincomingcallringing.trigger
55
55
  * @benchmark This action is tracked for performance benchmarks
56
56
  */
57
- export declare class UpdateAgentCallLegOnIncomingCallRindingDto extends OdinRecordUpdateDto<UpdateAgentCallLegOnIncomingCallRindingProperties> {
57
+ export declare class UpdateAgentCallLegOnIncomingCallRingingDto extends OdinRecordUpdateDto<UpdateAgentCallLegOnIncomingCallRingingProperties> {
58
58
  /** Used by SDK generators to identify action type */
59
59
  static readonly ACTION_TYPE = "UPDATE";
60
- static readonly ACTION_KEY = "UpdateAgentCallLegOnIncomingCallRinding";
60
+ static readonly ACTION_KEY = "UpdateAgentCallLegOnIncomingCallRinging";
61
61
  static readonly MODULE_NAME = "NotificationModule";
62
62
  static readonly ENTITIES: string[];
63
- static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinding";
64
- static readonly PERMISSION = "schema.action.updateagentcalllegonincomingcallrinding.trigger";
63
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateAgentCallLegOnIncomingCallRinging";
64
+ static readonly PERMISSION = "schema.action.updateagentcalllegonincomingcallringing.trigger";
65
65
  /** Step metadata - entity this action targets */
66
66
  static readonly STEP_ENTITY = "NotificationModule:CallLeg";
67
67
  static readonly STEP_SCHEMA_ID = "75c59745-35fb-44b9-b3f2-7563101fdcec";
68
- static readonly STEP_SCHEMA_ACTION_ID = "a3d8be43-ce38-4841-a836-7f38ceba4761";
68
+ static readonly STEP_SCHEMA_ACTION_ID = "a16ff881-91e5-449d-b5e2-c9556dd2e850";
69
69
  static readonly AUTO_LINK_PARENT = false;
70
70
  readonly actionName: string;
71
71
  readonly schemaActionId: string;
@@ -74,7 +74,7 @@ export declare class UpdateAgentCallLegOnIncomingCallRindingDto extends OdinReco
74
74
  id: string;
75
75
  entity: string;
76
76
  type?: string;
77
- }, properties: UpdateAgentCallLegOnIncomingCallRindingProperties, options?: {
77
+ }, properties: UpdateAgentCallLegOnIncomingCallRingingProperties, options?: {
78
78
  journeyId?: string;
79
79
  stageKey?: string;
80
80
  });
@@ -0,0 +1,56 @@
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;
@@ -28,7 +28,7 @@ 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 { UpdateAgentCallLegOnIncomingCallRindingProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallRindingDto';
31
+ import { UpdateAgentCallLegOnIncomingCallRingingProperties } from '../actions-v2/UpdateAgentCallLegOnIncomingCallRingingDto';
32
32
  import { UpdateCallProperties } from '../actions-v2/UpdateCallDto';
33
33
  import { UpdateCustomerCallLegOnIncomingCallAnsweredProperties } from '../actions-v2/UpdateCustomerCallLegOnIncomingCallAnsweredDto';
34
34
  import { CallRecord } from './CallRecord';
@@ -353,7 +353,7 @@ export declare class CallLegRecord<TProps = CallLegProperties> {
353
353
  stageKey?: string;
354
354
  }): ActionBuilder;
355
355
  /**
356
- * UpdateAgentCallLegOnIncomingCallRinding
356
+ * UpdateAgentCallLegOnIncomingCallRinging
357
357
  *
358
358
  * Updates this CallLeg record with the specified properties.
359
359
  * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
@@ -368,13 +368,13 @@ export declare class CallLegRecord<TProps = CallLegProperties> {
368
368
  * @example
369
369
  * ```typescript
370
370
  * const record = await odinClient.callLegs.get(id);
371
- * await record.updateAgentCallLegOnIncomingCallRinding({ ... }).execute();
371
+ * await record.updateAgentCallLegOnIncomingCallRinging({ ... }).execute();
372
372
  *
373
373
  * // Dry run (for debugging)
374
- * const payload = record.updateAgentCallLegOnIncomingCallRinding({ ... }).dryRun();
374
+ * const payload = record.updateAgentCallLegOnIncomingCallRinging({ ... }).dryRun();
375
375
  * ```
376
376
  */
377
- updateAgentCallLegOnIncomingCallRinding(properties: UpdateAgentCallLegOnIncomingCallRindingProperties, options?: {
377
+ updateAgentCallLegOnIncomingCallRinging(properties: UpdateAgentCallLegOnIncomingCallRingingProperties, options?: {
378
378
  journeyId?: string;
379
379
  stageKey?: string;
380
380
  }): ActionBuilder;
@@ -455,7 +455,7 @@ class CallLegRecord {
455
455
  return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
456
456
  }
457
457
  /**
458
- * UpdateAgentCallLegOnIncomingCallRinding
458
+ * UpdateAgentCallLegOnIncomingCallRinging
459
459
  *
460
460
  * Updates this CallLeg record with the specified properties.
461
461
  * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
@@ -470,17 +470,17 @@ class CallLegRecord {
470
470
  * @example
471
471
  * ```typescript
472
472
  * const record = await odinClient.callLegs.get(id);
473
- * await record.updateAgentCallLegOnIncomingCallRinding({ ... }).execute();
473
+ * await record.updateAgentCallLegOnIncomingCallRinging({ ... }).execute();
474
474
  *
475
475
  * // Dry run (for debugging)
476
- * const payload = record.updateAgentCallLegOnIncomingCallRinding({ ... }).dryRun();
476
+ * const payload = record.updateAgentCallLegOnIncomingCallRinging({ ... }).dryRun();
477
477
  * ```
478
478
  */
479
- updateAgentCallLegOnIncomingCallRinding(properties, options) {
479
+ updateAgentCallLegOnIncomingCallRinging(properties, options) {
480
480
  var _a;
481
481
  if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
482
- throw new Error('updateAgentCallLegOnIncomingCallRinding 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: 'UpdateAgentCallLegOnIncomingCallRinding', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
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
484
  return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
485
485
  }
486
486
  /**
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Wholesale provider — subpath barrel.
3
+ *
4
+ * Consumers import from `@d19n/youfibre-odin-sdk/wholesale-provider`:
5
+ *
6
+ * ```ts
7
+ * import {
8
+ * WholesaleProvider,
9
+ * NetomniaProvider,
10
+ * NetomniaProviderDeps,
11
+ * } from '@d19n/youfibre-odin-sdk/wholesale-provider';
12
+ * ```
13
+ *
14
+ * This subpath exists so the wholesale provider abstraction does not collide
15
+ * with the auto-generated SDK surface (entities-v2 / accessors-v2 / etc.)
16
+ * that gets regenerated by `make regen`. Per `runner.ts:163-181`, the regen
17
+ * does NOT touch this directory.
18
+ *
19
+ * Linked: T-20260508-009
20
+ */
21
+ export type { WholesaleProvider } from './interface';
22
+ export type { WholesaleResult, WholesaleSyncResponse, WholesaleRejectionResponse, WholesaleRejectionMessage, WholesaleBUS, WholesaleSYS, ISO8601DateTime, ISODate, TransactionId, UPRN, UUID, SwitchOrderReference, } from './types/wholesale';
23
+ export type { VMO2OrderId, VMO2RequestId, VMO2AppointmentKey, VMO2PremiseId, VMO2ParentServiceId, VMO2ChildServiceId, VMO2TechnicalProductId, VMO2InvoiceAccountNumber, VMO2NetworkType, VMO2DeploymentMethod, VMO2OrderIntent, VMO2OrderAction, VMO2OrderStatus, VMO2RequestType, VMO2RequestStatus, VMO2VisitType, VMO2AppointmentStatus, VMO2InstallFieldVisitRequired, VMO2SelfInstallAvailable, VMO2OrderServiceLevel, VMO2RequestServiceLevel, VMO2AdditionalWorkCode, VMO2SpecialRequestCode, VMO2CancellationReasonCode, VMO2IncidentReasonCode, VMO2ClosureCode, VMO2DelayCode, VMO2AddressFields, VMO2EndCustomerDetails, VMO2AddressLookupQuery, VMO2AddressLookupRequest, VMO2AddressLookupResult, VMO2DeploymentDetail, VMO2TechnicalProduct, VMO2NetworkCapability, VMO2PremiseRecord, VMO2JourneyType, VMO2AppointmentScope, VMO2AppointmentVisitFilter, VMO2ListAppointmentRequest, VMO2AvailableSlot, VMO2ListAppointmentResult, VMO2ReserveAppointmentRequest, VMO2ReservedSlot, VMO2ReserveAppointmentResult, VMO2AppointmentDetails, VMO2AmendAppointmentPatch, VMO2ConfirmAppointmentRequest, VMO2CreateOrderRequest, VMO2CreateOrderResult, VMO2AmendOrderPatch, VMO2OrderDetails, VMO2CreateIncidentRequest, VMO2CreateIncidentResult, VMO2AmendIncidentPatch, VMO2IncidentDetails, VMO2OrderNotificationType, VMO2SMRNotificationType, VMO2NotificationEnvelope, VMO2OrderNotification, VMO2SMRNotification, VMO2InboundNotification, } from './types/vmo2';
24
+ export type { FibreCafeAddressType, FibreCafeAppointmentPurpose, FibreCafeAvailabilityConstraintCode, FibreCafeInstallationType, FibreCafePortStatus, FibreCafeUnavailabilityReasonCode, FibreCafeTimeslotClassification, FibreCafeServiceCharacteristic, FibreCafeServiceProblemCharacteristic, FibreCafeEngineerTask, FibreCafeProvideOrderType, FibreCafeCeaseOrderType, FibreCafeModifyOrderType, FibreCafeUnsolicitedCeaseOrderType, FibreCafeOrderStatus, FibreCafeUnsolicitedCeaseOrderStatus, FibreCafeUnsolicitedCeaseReason, FibreCafeKciReasonCode, FibreCafeKciProblemCode, FibreCafeResolutionCode, FibreCafeGatewayErrorCode, FibreCafeAddressIdentifier, FibreCafeAddressIdentifierWithAdditional, FibreCafeSubAddress, FibreCafeAddress, FibreCafeAddressAttribute, FibreCafeAddressTenant, FibreCafeContact, FibreCafeTimeslot, FibreCafeReserveTimeslot, FibreCafeServiceCharacteristicObject, FibreCafeServiceProblemCharacteristicObject, FibreCafeServiceCharacteristicAvailability, FibreCafeServiceSpecification, FibreCafeServiceSpecificationAvailability, FibreCafeServiceOrderItem, FibreCafeSupplierNote, FibreCafeResolutionDetails, FibreCafeGatewayError, FibreCafeAvailabilityConstraint, FibreCafeUnavailabilityReason, FibreCafeLineCharacteristic, FibreCafeOntPort, FibreCafeOnt, FibreCafeExistingLine, FibreCafeSiteInformation, FibreCafeServiceAvailabilityQuery, FibreCafeServiceAvailability200, FibreCafeAddressLookupQuery, FibreCafeAddressLookup200, FibreCafeAvailableAppointmentsQuery, FibreCafeAvailableAppointments200, FibreCafeReserveAppointmentDto, FibreCafeReserveAppointment201, FibreCafeServiceWorkOrderAddress, FibreCafeServiceWorkOrderTimeslot, FibreCafeScheduleServiceWorkOrderDto, FibreCafeRescheduleServiceWorkOrderDto, FibreCafeScheduleServiceWorkOrder201, FibreCafeRescheduleServiceWorkOrder200, FibreCafeProvideServiceOrderDto, FibreCafeCeaseServiceOrderDto, FibreCafeModifyServiceOrderDto, FibreCafeOrderCreateDto, FibreCafeOrderCreate202, FibreCafeServiceOrderCancellationDto, FibreCafeProvideServiceOrderAmendmentDto, FibreCafeOrderAmendAccept202, FibreCafeProvideServiceOrder, FibreCafeCeaseServiceOrder, FibreCafeModifyServiceOrder, FibreCafeUnsolicitedCeaseServiceOrder, FibreCafeKciDto, FibreCafeServiceProblemCreateDto, FibreCafeServiceProblemCreate202, FibreCafeServiceProblemAmendmentDto, FibreCafeServiceProblemCancellationDto, FibreCafeServiceProblemDetails, } from './types/fibrecafe';
25
+ export { NetomniaProvider, AggregateNotificationError, NotImplementedError, } from './providers/netomnia-provider';
26
+ export type { NetomniaProviderDeps } from './providers/netomnia-provider';
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * Wholesale provider — subpath barrel.
4
+ *
5
+ * Consumers import from `@d19n/youfibre-odin-sdk/wholesale-provider`:
6
+ *
7
+ * ```ts
8
+ * import {
9
+ * WholesaleProvider,
10
+ * NetomniaProvider,
11
+ * NetomniaProviderDeps,
12
+ * } from '@d19n/youfibre-odin-sdk/wholesale-provider';
13
+ * ```
14
+ *
15
+ * This subpath exists so the wholesale provider abstraction does not collide
16
+ * with the auto-generated SDK surface (entities-v2 / accessors-v2 / etc.)
17
+ * that gets regenerated by `make regen`. Per `runner.ts:163-181`, the regen
18
+ * does NOT touch this directory.
19
+ *
20
+ * Linked: T-20260508-009
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.NotImplementedError = exports.AggregateNotificationError = exports.NetomniaProvider = void 0;
24
+ // Provider implementations
25
+ var netomnia_provider_1 = require("./providers/netomnia-provider");
26
+ Object.defineProperty(exports, "NetomniaProvider", { enumerable: true, get: function () { return netomnia_provider_1.NetomniaProvider; } });
27
+ Object.defineProperty(exports, "AggregateNotificationError", { enumerable: true, get: function () { return netomnia_provider_1.AggregateNotificationError; } });
28
+ Object.defineProperty(exports, "NotImplementedError", { enumerable: true, get: function () { return netomnia_provider_1.NotImplementedError; } });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * WholesaleProvider — the typed contract YouFibre code uses to consume any
3
+ * wholesale gateway (FibreCafe-fronted suppliers like Netomnia / Brsk /
4
+ * Trooli today, VMO2 / Nutmeg from July 2026, others in future).
5
+ *
6
+ * Capability-shaped, not surface-shaped — callers ask "reserve an
7
+ * appointment", not "POST /ge/v1/appointments/reservations". Implementations
8
+ * map capability calls onto the per-supplier wire format.
9
+ *
10
+ * Lifted under T-20260508-009 from
11
+ * agent-os/knowledge/integrations/vmo2-nutmeg/vm-provider-interface.ts
12
+ *
13
+ * Every method returns a `WholesaleResult<T>` discriminated by `status`.
14
+ * Errors (4xx/5xx) materialise as `WholesaleRejectionResponse`. Transport /
15
+ * OAuth / idempotency / retry / rate-limiting are encapsulated by the
16
+ * implementation.
17
+ *
18
+ * Method names are supplier-agnostic. Argument/result types are currently
19
+ * VMO2-shaped (since VMO2 is the first concrete shape modelled). Per-supplier
20
+ * implementations adapt their wire format to/from these shapes — see
21
+ * `comparison-fibrecafe-vs-vmo2.md` for the field-level mapping.
22
+ */
23
+ import type { WholesaleResult } from './types/wholesale';
24
+ import type { VMO2AddressLookupRequest, VMO2AddressLookupResult, VMO2ListAppointmentRequest, VMO2ListAppointmentResult, VMO2ReserveAppointmentRequest, VMO2ReserveAppointmentResult, VMO2ConfirmAppointmentRequest, VMO2AppointmentDetails, VMO2AppointmentKey, VMO2AmendAppointmentPatch, VMO2CreateOrderRequest, VMO2CreateOrderResult, VMO2AmendOrderPatch, VMO2OrderDetails, VMO2OrderId, VMO2CancellationReasonCode, VMO2PremiseId, VMO2CreateIncidentRequest, VMO2CreateIncidentResult, VMO2AmendIncidentPatch, VMO2IncidentDetails, VMO2RequestId, VMO2OrderNotification, VMO2SMRNotification } from './types/vmo2';
25
+ import type { ISODate, SwitchOrderReference } from './types/wholesale';
26
+ export interface WholesaleProvider {
27
+ searchAddress(req: VMO2AddressLookupRequest): Promise<WholesaleResult<VMO2AddressLookupResult>>;
28
+ listAppointments(req: VMO2ListAppointmentRequest): Promise<WholesaleResult<VMO2ListAppointmentResult>>;
29
+ reserveAppointment(req: VMO2ReserveAppointmentRequest): Promise<WholesaleResult<VMO2ReserveAppointmentResult>>;
30
+ confirmAppointment(req: VMO2ConfirmAppointmentRequest): Promise<WholesaleResult<{
31
+ appointmentKey: VMO2AppointmentKey;
32
+ }>>;
33
+ getAppointment(key: VMO2AppointmentKey): Promise<WholesaleResult<VMO2AppointmentDetails>>;
34
+ amendAppointment(key: VMO2AppointmentKey, patch: VMO2AmendAppointmentPatch): Promise<WholesaleResult<{
35
+ appointmentKey: VMO2AppointmentKey;
36
+ }>>;
37
+ cancelAppointment(key: VMO2AppointmentKey): Promise<WholesaleResult<{
38
+ appointmentKey: VMO2AppointmentKey;
39
+ }>>;
40
+ createOrder(req: VMO2CreateOrderRequest): Promise<WholesaleResult<VMO2CreateOrderResult>>;
41
+ amendOrder(orderId: VMO2OrderId, patch: VMO2AmendOrderPatch): Promise<WholesaleResult<{
42
+ orderId: VMO2OrderId;
43
+ }>>;
44
+ cancelOrder(orderId: VMO2OrderId, reason?: VMO2CancellationReasonCode): Promise<WholesaleResult<{
45
+ orderId: VMO2OrderId;
46
+ }>>;
47
+ getOrder(orderId: VMO2OrderId, opts?: {
48
+ displaySummary?: boolean;
49
+ }): Promise<WholesaleResult<VMO2OrderDetails>>;
50
+ unsolicitedCease(req: {
51
+ premiseId: VMO2PremiseId;
52
+ switchOrderReference?: SwitchOrderReference;
53
+ requestedOrderCompletionDate: ISODate;
54
+ }): Promise<WholesaleResult<VMO2CreateOrderResult>>;
55
+ createIncident(req: VMO2CreateIncidentRequest): Promise<WholesaleResult<VMO2CreateIncidentResult>>;
56
+ amendIncident(requestId: VMO2RequestId, patch: VMO2AmendIncidentPatch): Promise<WholesaleResult<{
57
+ requestId: VMO2RequestId;
58
+ }>>;
59
+ cancelIncident(requestId: VMO2RequestId): Promise<WholesaleResult<{
60
+ requestId: VMO2RequestId;
61
+ }>>;
62
+ getIncident(requestId: VMO2RequestId): Promise<WholesaleResult<VMO2IncidentDetails>>;
63
+ onOrderNotification(handler: (n: VMO2OrderNotification) => Promise<void>): void;
64
+ onSMRNotification(handler: (n: VMO2SMRNotification) => Promise<void>): void;
65
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,166 @@
1
+ /**
2
+ * NetomniaProvider — concrete `WholesaleProvider` implementation that
3
+ * routes capability calls to the Netomnia wholesale platform. Netomnia
4
+ * exposes its tenant API via the FibreCafe gateway, so this provider's
5
+ * dependency function-bag is **FibreCafe-shaped** (matches the wire +
6
+ * existing NET module function signatures).
7
+ *
8
+ * **Architecture (T-20260508-009 — confirmed with Frank 2026-05-08):**
9
+ *
10
+ * 1. `WholesaleProvider` interface is **VMO2-shaped**. It's the single
11
+ * abstraction call sites speak — same vocabulary regardless of supplier.
12
+ * 2. `NetomniaProvider` implements that interface. Its **public methods
13
+ * accept VMO2-shaped requests** (per the abstraction contract).
14
+ * 3. `NetomniaProviderDeps` is **FibreCafe-shaped**. Modules wire their
15
+ * existing NestJS-injected NET clients in directly — zero
16
+ * transformation at the dep boundary.
17
+ * 4. **Mapping VMO2 ↔ FibreCafe happens INSIDE each NetomniaProvider
18
+ * method.** VMO2 in → map to FibreCafe → call dep → FibreCafe response
19
+ * → map to VMO2 → return. The single place supplier shape differences
20
+ * are reconciled.
21
+ *
22
+ * Phase 0 scope: mapping bodies are **stubs** (throw NotImplementedError
23
+ * for non-trivial mappings). T-20260508-010 will fill in the real mapping
24
+ * logic alongside the call-site refactor — at that point the call sites
25
+ * actually exercise these methods, so mapping correctness can be
26
+ * validated with live behavior.
27
+ *
28
+ * The same instance handles all three Netomnia-routed `OrderProvider`
29
+ * values (NETOMNIA / NETOMNIA_LEGACY / BRSK) — they share the same NET
30
+ * wholesale platform.
31
+ *
32
+ * Inbound notification handling: provider stores registered handlers
33
+ * in-memory. A future webhook controller (T-20260508-010) invokes
34
+ * `dispatchOrderNotification` / `dispatchSMRNotification` to fan out.
35
+ */
36
+ import type { WholesaleProvider } from '../interface';
37
+ import type { WholesaleResult } from '../types/wholesale';
38
+ import type { ISODate, SwitchOrderReference } from '../types/wholesale';
39
+ import type { VMO2AddressLookupRequest, VMO2AddressLookupResult, VMO2ListAppointmentRequest, VMO2ListAppointmentResult, VMO2ReserveAppointmentRequest, VMO2ReserveAppointmentResult, VMO2ConfirmAppointmentRequest, VMO2AppointmentDetails, VMO2AppointmentKey, VMO2AmendAppointmentPatch, VMO2CreateOrderRequest, VMO2CreateOrderResult, VMO2AmendOrderPatch, VMO2OrderDetails, VMO2OrderId, VMO2CancellationReasonCode, VMO2PremiseId, VMO2CreateIncidentRequest, VMO2CreateIncidentResult, VMO2AmendIncidentPatch, VMO2IncidentDetails, VMO2RequestId, VMO2OrderNotification, VMO2SMRNotification } from '../types/vmo2';
40
+ import type { FibreCafeServiceAvailabilityQuery, FibreCafeServiceAvailability200, FibreCafeAvailableAppointmentsQuery, FibreCafeAvailableAppointments200, FibreCafeReserveAppointmentDto, FibreCafeReserveAppointment201, FibreCafeOrderCreateDto, FibreCafeOrderCreate202, FibreCafeProvideServiceOrderAmendmentDto, FibreCafeOrderAmendAccept202, FibreCafeServiceOrderCancellationDto, FibreCafeServiceProblemCreateDto, FibreCafeServiceProblemCreate202, FibreCafeServiceProblemAmendmentDto, FibreCafeServiceProblemCancellationDto, FibreCafeServiceProblemDetails, FibreCafeProvideServiceOrder } from '../types/fibrecafe';
41
+ /**
42
+ * Function-bag of FibreCafe-shaped dependencies that NetomniaProvider
43
+ * delegates to. Modules wire each property to their existing typed NET
44
+ * client method — typically these come from NestJS-injected services
45
+ * (`netomniaProvider.getServiceAvailability` / `.createProvideOrder` /
46
+ * etc.). The adapter boundary is intentionally narrow so refactoring to
47
+ * use NetomniaProvider doesn't change runtime behavior or PE-log emit
48
+ * semantics — those still live in the wrapped function bodies.
49
+ *
50
+ * Where a FibreCafe endpoint has no current YF caller (e.g. service-problems),
51
+ * the dep is still typed; the wired function may be a NotImplementedError
52
+ * thrower until that endpoint is built out.
53
+ */
54
+ export interface NetomniaProviderDeps {
55
+ getServiceAvailability: (query: FibreCafeServiceAvailabilityQuery) => Promise<WholesaleResult<FibreCafeServiceAvailability200>>;
56
+ getAvailableAppointments: (query: FibreCafeAvailableAppointmentsQuery) => Promise<WholesaleResult<FibreCafeAvailableAppointments200>>;
57
+ reserveAppointment: (dto: FibreCafeReserveAppointmentDto) => Promise<WholesaleResult<FibreCafeReserveAppointment201>>;
58
+ /**
59
+ * FibreCafe doesn't expose a separate confirm endpoint — confirmation is
60
+ * implicit at order placement. NetomniaProvider's confirmAppointment is a
61
+ * no-op pass-through; this dep is provided for symmetry and future use.
62
+ */
63
+ confirmAppointment?: (appointmentId: string) => Promise<WholesaleResult<{
64
+ appointmentId: string;
65
+ }>>;
66
+ /**
67
+ * FibreCafe retrieves appointment via the parent order — this dep wraps
68
+ * the existing module logic that reconstructs appointment state from the
69
+ * locally-cached NET WorkOrder mirror.
70
+ */
71
+ getAppointment?: (appointmentId: string) => Promise<WholesaleResult<FibreCafeReserveAppointment201>>;
72
+ /** Reappoint flow — same endpoint as reserve with rescheduleType discriminator. */
73
+ amendAppointment?: (dto: FibreCafeReserveAppointmentDto) => Promise<WholesaleResult<FibreCafeReserveAppointment201>>;
74
+ /** WO-level cancellation propagating to NET-side appointment. */
75
+ cancelAppointment?: (appointmentId: string, reasonCode?: string) => Promise<WholesaleResult<{
76
+ appointmentId: string;
77
+ }>>;
78
+ createOrder: (dto: FibreCafeOrderCreateDto) => Promise<WholesaleResult<FibreCafeOrderCreate202>>;
79
+ amendOrder: (dto: FibreCafeProvideServiceOrderAmendmentDto) => Promise<WholesaleResult<FibreCafeOrderAmendAccept202>>;
80
+ cancelOrder: (dto: FibreCafeServiceOrderCancellationDto) => Promise<WholesaleResult<{
81
+ cancellationRequestId: string;
82
+ }>>;
83
+ getOrder: (orderId: string) => Promise<WholesaleResult<FibreCafeProvideServiceOrder>>;
84
+ createIncident?: (dto: FibreCafeServiceProblemCreateDto) => Promise<WholesaleResult<FibreCafeServiceProblemCreate202>>;
85
+ amendIncident?: (dto: FibreCafeServiceProblemAmendmentDto) => Promise<WholesaleResult<{
86
+ amendmentId: string;
87
+ }>>;
88
+ cancelIncident?: (dto: FibreCafeServiceProblemCancellationDto) => Promise<WholesaleResult<{
89
+ cancellationId: string;
90
+ }>>;
91
+ getIncident?: (serviceProblemId: string) => Promise<WholesaleResult<FibreCafeServiceProblemDetails>>;
92
+ }
93
+ declare type OrderNotificationHandler = (n: VMO2OrderNotification) => Promise<void>;
94
+ declare type SMRNotificationHandler = (n: VMO2SMRNotification) => Promise<void>;
95
+ /**
96
+ * Sentinel error surfaced by Phase 0 stub mapping bodies. T-20260508-010
97
+ * fills in real bodies; until then any call to these methods at runtime
98
+ * throws this. Tests verify the *delegation* path works for methods whose
99
+ * mapping is trivial enough to ship in Phase 0.
100
+ */
101
+ export declare class NotImplementedError extends Error {
102
+ readonly method: string;
103
+ constructor(method: string);
104
+ }
105
+ export declare class NetomniaProvider implements WholesaleProvider {
106
+ private readonly deps;
107
+ private readonly orderHandlers;
108
+ private readonly smrHandlers;
109
+ constructor(deps: NetomniaProviderDeps);
110
+ searchAddress(_req: VMO2AddressLookupRequest): Promise<WholesaleResult<VMO2AddressLookupResult>>;
111
+ listAppointments(_req: VMO2ListAppointmentRequest): Promise<WholesaleResult<VMO2ListAppointmentResult>>;
112
+ reserveAppointment(_req: VMO2ReserveAppointmentRequest): Promise<WholesaleResult<VMO2ReserveAppointmentResult>>;
113
+ confirmAppointment(_req: VMO2ConfirmAppointmentRequest): Promise<WholesaleResult<{
114
+ appointmentKey: VMO2AppointmentKey;
115
+ }>>;
116
+ getAppointment(_key: VMO2AppointmentKey): Promise<WholesaleResult<VMO2AppointmentDetails>>;
117
+ amendAppointment(_key: VMO2AppointmentKey, _patch: VMO2AmendAppointmentPatch): Promise<WholesaleResult<{
118
+ appointmentKey: VMO2AppointmentKey;
119
+ }>>;
120
+ cancelAppointment(_key: VMO2AppointmentKey): Promise<WholesaleResult<{
121
+ appointmentKey: VMO2AppointmentKey;
122
+ }>>;
123
+ createOrder(_req: VMO2CreateOrderRequest): Promise<WholesaleResult<VMO2CreateOrderResult>>;
124
+ amendOrder(_orderId: VMO2OrderId, _patch: VMO2AmendOrderPatch): Promise<WholesaleResult<{
125
+ orderId: VMO2OrderId;
126
+ }>>;
127
+ cancelOrder(_orderId: VMO2OrderId, _reason?: VMO2CancellationReasonCode): Promise<WholesaleResult<{
128
+ orderId: VMO2OrderId;
129
+ }>>;
130
+ getOrder(_orderId: VMO2OrderId, _opts?: {
131
+ displaySummary?: boolean;
132
+ }): Promise<WholesaleResult<VMO2OrderDetails>>;
133
+ unsolicitedCease(_req: {
134
+ premiseId: VMO2PremiseId;
135
+ switchOrderReference?: SwitchOrderReference;
136
+ requestedOrderCompletionDate: ISODate;
137
+ }): Promise<WholesaleResult<VMO2CreateOrderResult>>;
138
+ createIncident(_req: VMO2CreateIncidentRequest): Promise<WholesaleResult<VMO2CreateIncidentResult>>;
139
+ amendIncident(_requestId: VMO2RequestId, _patch: VMO2AmendIncidentPatch): Promise<WholesaleResult<{
140
+ requestId: VMO2RequestId;
141
+ }>>;
142
+ cancelIncident(_requestId: VMO2RequestId): Promise<WholesaleResult<{
143
+ requestId: VMO2RequestId;
144
+ }>>;
145
+ getIncident(_requestId: VMO2RequestId): Promise<WholesaleResult<VMO2IncidentDetails>>;
146
+ onOrderNotification(handler: OrderNotificationHandler): void;
147
+ onSMRNotification(handler: SMRNotificationHandler): void;
148
+ /**
149
+ * Internal dispatch — invoked by the webhook controller (T-20260508-010)
150
+ * after mapping a FibreCafe KCI to a VMO2OrderNotification envelope. Fans
151
+ * out to every registered handler in registration order. Handler errors
152
+ * are aggregated and re-thrown after all handlers complete.
153
+ */
154
+ dispatchOrderNotification(n: VMO2OrderNotification): Promise<void>;
155
+ dispatchSMRNotification(n: VMO2SMRNotification): Promise<void>;
156
+ }
157
+ /**
158
+ * Aggregates errors thrown by handlers during notification dispatch so the
159
+ * webhook controller can surface every failure rather than masking later
160
+ * handlers with the first throw.
161
+ */
162
+ export declare class AggregateNotificationError extends Error {
163
+ readonly errors: unknown[];
164
+ constructor(errors: unknown[]);
165
+ }
166
+ export {};