@companieshouse/api-sdk-node 2.0.104 → 2.0.106
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 +2 -2
- package/dist/client.js +2 -0
- package/dist/client.js.map +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
|
|
9
|
+
import { BadosService } 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";
|
|
@@ -32,7 +32,7 @@ export default class ApiClient {
|
|
|
32
32
|
readonly accountClient: IHttpClient;
|
|
33
33
|
clientType: ClientType;
|
|
34
34
|
readonly lateFilingPenalties: LateFilingPenaltyService;
|
|
35
|
-
readonly
|
|
35
|
+
readonly badosService: BadosService;
|
|
36
36
|
readonly companyOfficers: CompanyOfficersService;
|
|
37
37
|
readonly companyFilingHistory: CompanyFilingHistoryService;
|
|
38
38
|
readonly companyProfile: CompanyProfileService;
|
package/dist/client.js
CHANGED
|
@@ -10,6 +10,7 @@ const service_4 = __importDefault(require("./services/company-psc/service"));
|
|
|
10
10
|
const lfp_1 = require("./services/lfp");
|
|
11
11
|
const order_1 = require("./services/order/");
|
|
12
12
|
const payment_1 = require("./services/payment/");
|
|
13
|
+
const bankrupt_officer_1 = require("./services/bankrupt-officer");
|
|
13
14
|
const service_5 = __importDefault(require("./services/company-filing-history/service"));
|
|
14
15
|
const refresh_token_1 = require("./services/refresh-token");
|
|
15
16
|
const service_6 = __importDefault(require("./services/search/advanced-search/service"));
|
|
@@ -35,6 +36,7 @@ class ApiClient {
|
|
|
35
36
|
this.accountClient = accountClient;
|
|
36
37
|
// services on the api domain using the apiClient
|
|
37
38
|
this.lateFilingPenalties = new lfp_1.LateFilingPenaltyService(apiClient);
|
|
39
|
+
this.badosService = new bankrupt_officer_1.BadosService(apiClient);
|
|
38
40
|
this.companyOfficers = new service_1.default(apiClient);
|
|
39
41
|
this.companyFilingHistory = new service_5.default(apiClient);
|
|
40
42
|
this.companyProfile = new service_2.default(apiClient);
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;AACA,kFAAyE;AACzE,iFAAuE;AACvE,iFAAuE;AACvE,6EAA+D;AAC/D,wCAA0D;AAC1D,6CAO2B;AAC3B,iDAAqD;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;AACA,kFAAyE;AACzE,iFAAuE;AACvE,iFAAuE;AACvE,6EAA+D;AAC/D,wCAA0D;AAC1D,6CAO2B;AAC3B,iDAAqD;AACrD,kEAA2D;AAC3D,wFAAoF;AACpF,4DAA+D;AAC/D,wFAA8E;AAC9E,4FAAsF;AACtF,yFAAgF;AAChF,mFAAyE;AACzE,2FAAwF;AACxF,8EAAgE;AAChE,yFAAoF;AACpF,8EAAiF;AACjF,oEAAqE;AACrE,8DAAwE;AACxE,mFAAmE;AACnE,sFAAyE;AACzE,iFAAqE;AACrE,2FAAwF;AAGxF;;GAEG;AACH,MAAqB,SAAS;IAgC5B,YAAsB,SAAsB,EAAW,aAA0B;QAA3D,cAAS,GAAT,SAAS,CAAa;QAAW,kBAAa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jD,IAAI,CAAC,aAAa,GAAG,IAAI,kBAAoB,CAAC,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,qBAAqB,GAAG,IAAI,gCAAqB,CAAC,SAAS,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,GAAG,IAAI,kBAAU,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,CAAC,kBAAkB,GAAG,IAAI,iBAAyB,CAAC,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,eAAe,GAAG,IAAI,iBAAsB,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,cAAc,GAAG,IAAI,iBAAqB,CAAC,SAAS,CAAC,CAAC;QAC3D,IAAI,CAAC,cAAc,GAAG,IAAI,yCAAqB,CAAC,SAAS,CAAC,CAAC;QAC3D,iEAAiE;QACjE,4DAA4D;QAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,mCAAmB,CAAC,aAAa,CAAC,CAAC;QAC3D,IAAI,CAAC,gBAAgB,GAAG,IAAI,iBAAqB,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,oBAAoB,GAAG,IAAI,kBAA6B,CAAC,SAAS,CAAC,CAAC;QACzE,IAAI,CAAC,WAAW,GAAG,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACrD,IAAI,CAAC,6BAA6B,GAAG,IAAI,kBAA6B,CAAC,SAAS,CAAC,CAAC;IACtF,CAAC;CACF;AAlED,4BAkEC"}
|
|
@@ -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,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AAQ,CAAC,KAAK,CAAC;iBAC3B,CAAC;aACL;YAED,MAAM,QAAQ,GAA0C;gBACpD,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,EAAE,iBAAO,CAAC,aAAa,CAA8B,QAAQ,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"}
|