@companieshouse/api-sdk-node 2.0.37 → 2.0.38
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.
|
@@ -5,19 +5,4 @@ export default class OverseasEntityService {
|
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: IHttpClient);
|
|
7
7
|
postOverseasEntity(transactionId: string, body: OverseasEntity): Promise<Resource<OverseasEntityCreated> | ApiErrorResponse>;
|
|
8
|
-
/**
|
|
9
|
-
* Proof of concept for ROE-1271
|
|
10
|
-
* Not to be used for Live code
|
|
11
|
-
* @param transactionId
|
|
12
|
-
* @param body
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
proofOfConceptPutOverseasEntity(transactionId: string, body: OverseasEntity): Promise<Resource<OverseasEntityCreated> | ApiErrorResponse>;
|
|
16
|
-
/**
|
|
17
|
-
* Proof of concept for ROE-1271
|
|
18
|
-
* Not to be used for Live code
|
|
19
|
-
* @param transactionId
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
proofOfConceptPatchOverseasEntity(transactionId: string): Promise<Resource<void> | ApiErrorResponse>;
|
|
23
8
|
}
|
|
@@ -31,53 +31,6 @@ class OverseasEntityService {
|
|
|
31
31
|
return resource;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Proof of concept for ROE-1271
|
|
36
|
-
* Not to be used for Live code
|
|
37
|
-
* @param transactionId
|
|
38
|
-
* @param body
|
|
39
|
-
* @returns
|
|
40
|
-
*/
|
|
41
|
-
proofOfConceptPutOverseasEntity(transactionId, body) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const URL = `/transactions/${transactionId}/overseas-entity`;
|
|
44
|
-
const response = yield this.client.httpPut(URL, mapping_1.mapOverseasEntity(body));
|
|
45
|
-
if (response.error) {
|
|
46
|
-
return {
|
|
47
|
-
httpStatusCode: response.status,
|
|
48
|
-
errors: [response.error]
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
const resource = {
|
|
52
|
-
httpStatusCode: response.status
|
|
53
|
-
};
|
|
54
|
-
resource.resource = Object.assign({}, response.body);
|
|
55
|
-
return resource;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Proof of concept for ROE-1271
|
|
60
|
-
* Not to be used for Live code
|
|
61
|
-
* @param transactionId
|
|
62
|
-
* @returns
|
|
63
|
-
*/
|
|
64
|
-
// no id returned, so this needs changing
|
|
65
|
-
proofOfConceptPatchOverseasEntity(transactionId) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
const URL = `/transactions/${transactionId}/overseas-entity`;
|
|
68
|
-
const response = yield this.client.httpPatch(URL);
|
|
69
|
-
if (response.error) {
|
|
70
|
-
return {
|
|
71
|
-
httpStatusCode: response.status,
|
|
72
|
-
errors: [response.error]
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const resource = {
|
|
76
|
-
httpStatusCode: response.status
|
|
77
|
-
};
|
|
78
|
-
return resource;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
34
|
}
|
|
82
35
|
exports.default = OverseasEntityService;
|
|
83
36
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,uCAA8C;AAE9C,MAAqB,qBAAqB;IACtC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,kBAAkB,CAAE,aAAqB,EAAE,IAAoB;;YACxE,MAAM,GAAG,GAAG,iBAAiB,aAAa,kBAAkB,CAAC;YAC7D,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,2BAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;YAExF,IAAI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