@d19n/youfibre-odin-sdk 2.0.192 → 2.0.194

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.
@@ -30,7 +30,7 @@ export declare type VMO2OrderAction = 'add' | 'remove' | 'change';
30
30
  export declare type VMO2OrderStatus = 'accepted' | 'rejected' | 'validated' | 'committed' | 'completed' | 'cancelled' | 'delayed';
31
31
  export declare type VMO2RequestType = 'reactiveincident' | 'preserviceispassistance' | 'postserviceispassistance' | 'restrictedpremisesurvey' | 'cableinstallsurvey' | 'equipmentmove';
32
32
  export declare type VMO2RequestStatus = 'rejected' | 'delayed' | 'accepted' | 'inprogress' | 'resolved' | 'closed';
33
- export declare type VMO2VisitType = 'Pre-Work' | 'In-Home' | 'SingleVisitForPreWorkAndInHome' | 'Internal Incident' | 'External Incident' | 'Move Interior Equipment' | 'Move Exterior Equipment' | 'End Customer Support' | 'Pre-Service ISP Assistance' | 'Restricted Premise Survey' | 'Cable Install Survey' | 'Troubleshoot';
33
+ export declare type VMO2VisitType = 'InHome' | 'PreWork' | 'SingleVisitForPreWorkAndInHome' | 'Internal Incident' | 'External Incident' | 'Move Interior Equipment' | 'Move Exterior Equipment' | 'End Customer Support' | 'Pre-Service ISP Assistance' | 'Restricted Premise Survey' | 'Cable Install Survey' | 'Troubleshoot';
34
34
  export declare type VMO2AppointmentStatus = 'reserved' | 'confirmed' | 'cancelled' | 'engineer assigned' | 'visit started' | 'visit complete';
35
35
  export declare type VMO2InstallFieldVisitRequired = 'no' | 'singleInHome' | 'splitPreWorkAndInHome' | 'singlePreWork' | 'singlePreWorkAndInHome';
36
36
  export declare type VMO2SelfInstallAvailable = 'no' | 'customerGatewayOnly';
@@ -112,19 +112,39 @@ export interface VMO2NetworkCapability {
112
112
  deployment: VMO2DeploymentDetail[];
113
113
  products: VMO2TechnicalProduct[];
114
114
  }
115
+ /**
116
+ * Premise record. CORRECTED to the verified wire (2026-06-08, CP staging stub):
117
+ * address fields are FLAT (not nested under `address`), and networks are keyed
118
+ * `networkTypeList` (not `networks`). Previously authored from the docs alone.
119
+ */
115
120
  export interface VMO2PremiseRecord {
116
121
  premiseId: VMO2PremiseId;
117
122
  uprn?: UPRN;
118
- address: VMO2AddressFields;
123
+ subBuildingName?: string;
124
+ buildingName?: string;
125
+ streetNumber?: string;
126
+ streetName?: string;
127
+ postCode: string;
128
+ locality?: string;
129
+ city?: string;
130
+ country: string;
119
131
  activeServiceAtPremise: boolean;
120
- networks: VMO2NetworkCapability[];
132
+ networkTypeList: VMO2NetworkCapability[];
121
133
  }
134
+ /**
135
+ * CORRECTED to the verified wire (2026-06-08): a match is returned as
136
+ * `premiseIdList[]` (an array even for one match), not a singular `premise`.
137
+ * OneAddressFound + NoAddressFound are live-verified; ManyAddressesFound's
138
+ * element shape is still unconfirmed (no multi-match sample yet).
139
+ */
122
140
  export declare type VMO2AddressLookupResult = {
123
141
  status: 'OneAddressFound';
124
- premise: VMO2PremiseRecord;
142
+ premiseIdList: VMO2PremiseRecord[];
125
143
  } | {
126
144
  status: 'ManyAddressesFound';
127
- premises: Array<Pick<VMO2PremiseRecord, 'premiseId' | 'uprn' | 'address'>>;
145
+ premiseIdList: Array<Partial<VMO2PremiseRecord> & {
146
+ premiseId: VMO2PremiseId;
147
+ }>;
128
148
  } | {
129
149
  status: 'TooManyAddressesFound';
130
150
  } | {
@@ -141,36 +161,55 @@ export interface VMO2AppointmentVisitFilter {
141
161
  additionalWorkCode?: VMO2AdditionalWorkCode[];
142
162
  specialRequest?: VMO2SpecialRequestCode[];
143
163
  startDate?: ISODate;
164
+ /** Request-side filter; response slots come back lowercase (`am`/`pm`). */
144
165
  preferredSlotType?: 'AM' | 'PM' | 'ALL DAY';
145
166
  preferredAppointmentClass?: 'Standard' | 'Premium';
146
167
  }
168
+ /**
169
+ * CORRECTED to the verified wire (2026-06-08): identifiers (orderId / requestId
170
+ * / premiseId) are ROOT parameters, NOT nested under a `scope` object. The
171
+ * previous `scope` wrapper made the gateway treat premiseId as missing →
172
+ * "invalid combination".
173
+ */
147
174
  export interface VMO2ListAppointmentRequest {
148
- scope: VMO2AppointmentScope;
175
+ orderId?: VMO2OrderId;
176
+ requestId?: VMO2RequestId;
177
+ premiseId?: VMO2PremiseId;
149
178
  networkType: VMO2NetworkType;
150
179
  journeyType: VMO2JourneyType;
151
180
  deploymentMethod?: VMO2DeploymentMethod;
152
181
  serviceLevel?: VMO2RequestServiceLevel;
153
182
  visit: VMO2AppointmentVisitFilter[];
154
183
  }
184
+ /** Verified response slot — slot/class come back LOWERCASE (`am`/`pm`/`standard`). */
155
185
  export interface VMO2AvailableSlot {
156
186
  appointmentDate: ISODate;
157
- appointmentSlot: 'AM' | 'PM' | 'ALL DAY' | string;
158
- appointmentClass: 'Standard' | 'Premium' | string;
187
+ appointmentSlot: 'am' | 'pm' | string;
188
+ appointmentClass: 'standard' | string;
159
189
  earliestArrivalTime: string;
160
190
  latestArrivalTime: string;
161
191
  }
192
+ /**
193
+ * CORRECTED to the verified wire (2026-06-08): carries a free-text `status`
194
+ * (e.g. "Fully Accepted"), and `estimatedDuration` / `inHomeLeadTime` are
195
+ * NUMBERS (minutes / days), not strings.
196
+ */
162
197
  export interface VMO2ListAppointmentResult {
198
+ status: string;
163
199
  installFieldVisitRequired?: VMO2InstallFieldVisitRequired;
164
200
  visit: Array<{
165
201
  visitType: VMO2VisitType;
166
- estimatedDuration: string;
167
- inHomeLeadTime?: string;
202
+ estimatedDuration: number;
203
+ inHomeLeadTime?: number;
168
204
  availableTimeSlots: VMO2AvailableSlot[];
169
205
  message?: WholesaleRejectionMessage[];
170
206
  }>;
171
207
  }
208
+ /** CORRECTED: identifiers at ROOT (not under `scope`). */
172
209
  export interface VMO2ReserveAppointmentRequest {
173
- scope: VMO2AppointmentScope;
210
+ orderId?: VMO2OrderId;
211
+ requestId?: VMO2RequestId;
212
+ premiseId?: VMO2PremiseId;
174
213
  networkType: VMO2NetworkType;
175
214
  journeyType: VMO2JourneyType;
176
215
  deploymentMethod?: VMO2DeploymentMethod;
@@ -184,16 +223,18 @@ export interface VMO2ReserveAppointmentRequest {
184
223
  appointmentClass: string;
185
224
  }>;
186
225
  }
226
+ /** CORRECTED: `estimatedDuration` is a NUMBER; carries the issued appointmentKey. */
187
227
  export interface VMO2ReservedSlot {
188
228
  visitType: VMO2VisitType;
189
- estimatedDuration: string;
229
+ estimatedDuration: number;
190
230
  appointmentKey: VMO2AppointmentKey;
191
231
  earliestArrivalTime: string;
192
232
  latestArrivalTime: string;
193
233
  message?: WholesaleRejectionMessage[];
194
234
  }
235
+ /** CORRECTED: `status` is free-text (e.g. "fully accepted"). */
195
236
  export interface VMO2ReserveAppointmentResult {
196
- status: 'accepted' | 'partially accepted';
237
+ status: string;
197
238
  appointmentSlots: VMO2ReservedSlot[];
198
239
  }
199
240
  export interface VMO2AppointmentDetails {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.192",
3
+ "version": "2.0.194",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",