@companieshouse/api-sdk-node 2.0.34 → 2.0.35
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.
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { IHttpClient } from "../../../http";
|
|
2
2
|
import { Order } from "./types";
|
|
3
|
-
import {
|
|
3
|
+
import { Result } from "../../../services/result";
|
|
4
|
+
export declare type OrderErrorResponse = {
|
|
5
|
+
httpStatusCode?: number;
|
|
6
|
+
error?: string;
|
|
7
|
+
};
|
|
4
8
|
export default class OrderService {
|
|
5
9
|
private readonly client;
|
|
6
10
|
private static readonly EXCLUDED_FIELDS;
|
|
7
11
|
constructor(client: IHttpClient);
|
|
8
|
-
getOrder(orderId: string): Promise<
|
|
12
|
+
getOrder(orderId: string): Promise<Result<Order, OrderErrorResponse>>;
|
|
9
13
|
}
|
|
@@ -25,7 +25,7 @@ class OrderService {
|
|
|
25
25
|
if (resp.error) {
|
|
26
26
|
return result_1.failure({
|
|
27
27
|
httpStatusCode: resp.status,
|
|
28
|
-
|
|
28
|
+
error: (_a = resp.error) === null || _a === void 0 ? void 0 : _a.error
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
const body = resp.body;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/order/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/order/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,qDAAoE;AACpE,uEAA+C;AAO/C,MAAqB,YAAY;IAU7B,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,QAAQ,CAAE,OAAe;;;YAClC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC;YAE7D,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,gBAAO,CAAC;oBACX,cAAc,EAAE,IAAI,CAAC,MAAM;oBAC3B,KAAK,QAAE,IAAI,CAAC,KAAK,0CAAE,KAAK;iBAC3B,CAAC,CAAC;aACN;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAqB,CAAC;YAExC,MAAM,MAAM,GAAU,iBAAO,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;YAChF,OAAO,gBAAO,CAAC,MAAM,CAAC,CAAC;;KAC1B;;AA1BL,+BA2BC;AA1B2B,4BAAe,GAAG;IACtC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE;QACP,0BAA0B;QAC1B,sDAAsD;QACtD,+EAA+E,CAAC,mBAAmB;KACtG;CACJ,CAAC"}
|