@companieshouse/api-sdk-node 2.0.104 → 2.0.105
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/dist/client.d.ts +1 -1
- package/dist/services/overseas-entities/service.d.ts +7 -1
- package/dist/services/overseas-entities/service.js +22 -0
- package/dist/services/overseas-entities/service.js.map +1 -1
- package/dist/services/overseas-entities/types.d.ts +22 -0
- package/dist/services/overseas-entities/types.js.map +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import CompanyPscService from "./services/company-psc/service";
|
|
|
6
6
|
import { LateFilingPenaltyService } from "./services/lfp";
|
|
7
7
|
import { BasketService, CertificateService, CertifiedCopiesService, CheckoutService, MidService, OrderService } from "./services/order/";
|
|
8
8
|
import { PaymentService } from "./services/payment/";
|
|
9
|
-
import * as BankruptOfficer from "services/bankrupt-officer";
|
|
9
|
+
import * as BankruptOfficer from "./services/bankrupt-officer";
|
|
10
10
|
import CompanyFilingHistoryService from "./services/company-filing-history/service";
|
|
11
11
|
import { RefreshTokenService } from "./services/refresh-token";
|
|
12
12
|
import AdvancedSearchService from "./services/search/advanced-search/service";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IHttpClient } from "../../http";
|
|
2
|
-
import { HttpStatusCode, OverseasEntity, OverseasEntityCreated, OverseasEntityExtraDetails, ManagingOfficersPrivateData } from "./types";
|
|
2
|
+
import { BeneficialOwnersPrivateData, HttpStatusCode, OverseasEntity, OverseasEntityCreated, OverseasEntityExtraDetails, ManagingOfficersPrivateData } from "./types";
|
|
3
3
|
import Resource, { ApiErrorResponse } from "../resource";
|
|
4
4
|
export default class OverseasEntityService {
|
|
5
5
|
private readonly client;
|
|
@@ -8,5 +8,11 @@ export default class OverseasEntityService {
|
|
|
8
8
|
getOverseasEntityDetails(transactionId: string, overseasEntityId: string): Promise<Resource<OverseasEntityExtraDetails> | ApiErrorResponse>;
|
|
9
9
|
postOverseasEntity(transactionId: string, body: OverseasEntity, isSaveAndResumeFeatureActive?: boolean): Promise<Resource<OverseasEntityCreated> | ApiErrorResponse>;
|
|
10
10
|
putOverseasEntity(transactionId: string, overseasEntityId: string, body: OverseasEntity): Promise<Resource<HttpStatusCode> | ApiErrorResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Get private beneficial owner data for an overseas entity
|
|
13
|
+
* @param transactionId of the entity
|
|
14
|
+
* @param overseasEntityId of the entity
|
|
15
|
+
*/
|
|
16
|
+
getBeneficialOwnerPrivateData(transactionId: string, overseasEntityId: string): Promise<Resource<BeneficialOwnersPrivateData> | ApiErrorResponse>;
|
|
11
17
|
getManagingOfficersPrivateData(transactionId: string, overseasEntityId: string): Promise<Resource<ManagingOfficersPrivateData> | ApiErrorResponse>;
|
|
12
18
|
}
|
|
@@ -84,6 +84,28 @@ class OverseasEntityService {
|
|
|
84
84
|
return { httpStatusCode: resp.status };
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Get private beneficial owner data for an overseas entity
|
|
89
|
+
* @param transactionId of the entity
|
|
90
|
+
* @param overseasEntityId of the entity
|
|
91
|
+
*/
|
|
92
|
+
getBeneficialOwnerPrivateData(transactionId, overseasEntityId) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const URL = `private/transactions/${transactionId}/overseas-entity/${overseasEntityId}/beneficial-owners`;
|
|
95
|
+
const response = yield this.client.httpGet(URL);
|
|
96
|
+
if (response.error) {
|
|
97
|
+
return {
|
|
98
|
+
httpStatusCode: response.status,
|
|
99
|
+
errors: [response.error]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const resource = {
|
|
103
|
+
httpStatusCode: response.status,
|
|
104
|
+
resource: mapping_2.default.camelCaseKeys(response.body)
|
|
105
|
+
};
|
|
106
|
+
return resource;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
87
109
|
getManagingOfficersPrivateData(transactionId, overseasEntityId) {
|
|
88
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
111
|
const URL = `private/transactions/${transactionId}/overseas-entity/${overseasEntityId}/managing-officers`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAYA,uCAAwG;AACxG,oEAA4C;AAE5C,MAAqB,qBAAqB;IACtC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,iBAAiB,CAAE,aAAqB,EAAE,gBAAwB;;YAC3E,MAAM,GAAG,GAAG,gBAAgB,aAAa,oBAAoB,gBAAgB,EAAE,CAAA;YAC/E,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE9D,IAAI,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO;oBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;oBAC/B,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;iBAC3B,CAAC;aACL;YAED,MAAM,QAAQ,GAA6B;gBACvC,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,EAAE,mCAAyB,CAAC,QAAQ,CAAC,IAAI,CAAC;aACrD,CAAC;YAEF,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;IAEY,wBAAwB,CAAE,aAAqB,EAAE,gBAAwB;;YAClF,MAAM,GAAG,GAAG,wBAAwB,aAAa,oBAAoB,gBAAgB,UAAU,CAAA;YAC/F,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE9D,IAAI,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO;oBACH,cA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,CAAC,IAA2C,CAAC;aACrH,CAAC;YAEF,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AA3HD,wCA2HC"}
|
|
@@ -200,6 +200,28 @@ export interface BeneficialOwnerGovernmentOrPublicAuthorityResource {
|
|
|
200
200
|
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
201
201
|
non_legal_firm_members_nature_of_control_types?: NatureOfControlType[];
|
|
202
202
|
}
|
|
203
|
+
export interface BeneficialOwnerPrivateDataResource {
|
|
204
|
+
hashed_id?: string;
|
|
205
|
+
date_became_registrable?: string;
|
|
206
|
+
date_of_birth?: string;
|
|
207
|
+
is_service_address_same_as_usual_address?: string;
|
|
208
|
+
usual_residential_address?: PrivateAddressResource;
|
|
209
|
+
principal_address?: PrivateAddressResource;
|
|
210
|
+
}
|
|
211
|
+
export interface BeneficialOwnersPrivateDataResource {
|
|
212
|
+
bo_private_data: BeneficialOwnerPrivateDataResource[];
|
|
213
|
+
}
|
|
214
|
+
export interface BeneficialOwnersPrivateData {
|
|
215
|
+
boPrivateData: BeneficialOwnerPrivateData[];
|
|
216
|
+
}
|
|
217
|
+
export interface BeneficialOwnerPrivateData {
|
|
218
|
+
hashedId?: string;
|
|
219
|
+
dateBecameRegistrable?: string;
|
|
220
|
+
dateOfBirth?: string;
|
|
221
|
+
isServiceAddressSameAsUsualAddress?: string;
|
|
222
|
+
usualResidentialAddress?: PrivateAddress;
|
|
223
|
+
principalAddress?: PrivateAddress;
|
|
224
|
+
}
|
|
203
225
|
export interface ManagingOfficerIndividual {
|
|
204
226
|
ch_reference?: string;
|
|
205
227
|
first_name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkkBH,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,6CAAM,CAAA;IACN,+CAAO,CAAA;AACX,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAQD,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,0FAAyD,CAAA;IACzD,4FAA2D,CAAA;IAC3D,oEAAmC,CAAA;AACvC,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,8EAAuD,CAAA;IACvD,4FAAqE,CAAA;IACrE,gHAAyF,CAAA;IACzF,4FAAqE,CAAA;AACzE,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B"}
|