@companieshouse/api-sdk-node 1.0.95 → 1.0.98
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 -0
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/services/order/certificates/service.d.ts +4 -4
- package/dist/services/order/certificates/service.js +22 -37
- package/dist/services/order/certificates/service.js.map +1 -1
- package/dist/services/overseas-entities/index.d.ts +2 -0
- package/dist/services/overseas-entities/index.js +20 -0
- package/dist/services/overseas-entities/index.js.map +1 -0
- package/dist/services/overseas-entities/mapping.d.ts +2 -0
- package/dist/services/overseas-entities/mapping.js +11 -0
- package/dist/services/overseas-entities/mapping.js.map +1 -0
- package/dist/services/overseas-entities/service.d.ts +8 -0
- package/dist/services/overseas-entities/service.js +36 -0
- package/dist/services/overseas-entities/service.js.map +1 -0
- package/dist/services/overseas-entities/types.d.ts +56 -0
- package/dist/services/overseas-entities/types.js +19 -0
- package/dist/services/overseas-entities/types.js.map +1 -0
- package/dist/services/search/advanced-search/service.d.ts +1 -1
- package/dist/services/search/advanced-search/service.js +5 -1
- package/dist/services/search/advanced-search/service.js.map +1 -1
- package/dist/services/search/advanced-search/types.d.ts +2 -0
- package/dist/services/transaction/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import PSCDiscrepanciesReportService from "./services/psc-discrepancies-report/s
|
|
|
15
15
|
import TransactionService from "./services/transaction/service";
|
|
16
16
|
import CompanyPscStatementsService from "./services/company-psc-statements/service";
|
|
17
17
|
import { ConfirmationStatementService } from "./services/confirmation-statement";
|
|
18
|
+
import { OverseasEntityService } from "./services/overseas-entities";
|
|
18
19
|
/**
|
|
19
20
|
* ApiClient is the class that all service objects hang off.
|
|
20
21
|
*/
|
|
@@ -42,5 +43,6 @@ export default class ApiClient {
|
|
|
42
43
|
readonly pscDiscrepancies: PSCDiscrepancyService;
|
|
43
44
|
readonly pscDiscrepancyReport: PSCDiscrepanciesReportService;
|
|
44
45
|
readonly transaction: TransactionService;
|
|
46
|
+
readonly overseasEntity: OverseasEntityService;
|
|
45
47
|
constructor(apiClient: IHttpClient, accountClient: IHttpClient);
|
|
46
48
|
}
|
package/dist/client.js
CHANGED
|
@@ -19,6 +19,7 @@ const service_9 = __importDefault(require("./services/psc-discrepancies-report/s
|
|
|
19
19
|
const service_10 = __importDefault(require("./services/transaction/service"));
|
|
20
20
|
const service_11 = __importDefault(require("./services/company-psc-statements/service"));
|
|
21
21
|
const confirmation_statement_1 = require("./services/confirmation-statement");
|
|
22
|
+
const overseas_entities_1 = require("./services/overseas-entities");
|
|
22
23
|
/**
|
|
23
24
|
* ApiClient is the class that all service objects hang off.
|
|
24
25
|
*/
|
|
@@ -44,6 +45,7 @@ class ApiClient {
|
|
|
44
45
|
this.alphabeticalSearch = new service_6.default(apiClient);
|
|
45
46
|
this.dissolvedSearch = new service_7.default(apiClient);
|
|
46
47
|
this.advancedSearch = new service_5.default(apiClient);
|
|
48
|
+
this.overseasEntity = new overseas_entities_1.OverseasEntityService(apiClient);
|
|
47
49
|
// service on the account/identity domain using the accountClient
|
|
48
50
|
// e.g. user profile service can be added here when required
|
|
49
51
|
this.refreshToken = new refresh_token_1.RefreshTokenService(accountClient);
|
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,6EAA+D;AAC/D,wCAA0D;AAC1D,6CAAyI;AACzI,iDAAqD;AACrD,wFAAoF;AACpF,4DAA+D;AAC/D,wFAA8E;AAC9E,4FAAsF;AACtF,yFAAgF;AAChF,mFAAyE;AACzE,0FAAwF;AACxF,8EAAgE;AAChE,yFAAoF;AACpF,8EAAiF;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;AAC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AAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAY,CAAC,SAAS,CAAC,CAAC;QACzC,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,iBAA6B,CAAC,SAAS,CAAC,CAAC;QACzE,IAAI,CAAC,WAAW,GAAG,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;CACF;AAnDD,4BAmDC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { IHttpClient } from "../../../http";
|
|
2
2
|
import { CertificateItem, CertificateItemInitialRequest, CertificateItemPatchRequest, CertificateItemPostRequest } from "./types";
|
|
3
|
-
import
|
|
3
|
+
import { ApiResponse, ApiResult } from "../../resource";
|
|
4
4
|
export default class {
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: IHttpClient);
|
|
7
|
-
getCertificate(certificateId: string): Promise<
|
|
7
|
+
getCertificate(certificateId: string): Promise<ApiResult<ApiResponse<CertificateItem>>>;
|
|
8
8
|
postCertificate(certificateItemRequest: CertificateItemPostRequest): Promise<ApiResult<ApiResponse<CertificateItem>>>;
|
|
9
9
|
postInitialCertificate(certificateItemRequest: CertificateItemInitialRequest): Promise<ApiResult<ApiResponse<CertificateItem>>>;
|
|
10
|
-
patchCertificate(certificateItemRequest: CertificateItemPatchRequest, certificateId: string): Promise<
|
|
11
|
-
private
|
|
10
|
+
patchCertificate(certificateItemRequest: CertificateItemPatchRequest, certificateId: string): Promise<ApiResult<ApiResponse<CertificateItem>>>;
|
|
11
|
+
private handleResponse;
|
|
12
12
|
}
|
|
@@ -20,20 +20,15 @@ class default_1 {
|
|
|
20
20
|
}
|
|
21
21
|
getCertificate(certificateId) {
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
httpStatusCode: resp.status
|
|
26
|
-
};
|
|
27
|
-
if (!resp.error) {
|
|
28
|
-
resource.resource = mapping_1.default.camelCaseKeys(resp.body);
|
|
29
|
-
}
|
|
30
|
-
return resource;
|
|
23
|
+
const response = yield this.client.httpGet(`/orderable/certificates/${certificateId}`);
|
|
24
|
+
return this.handleResponse(response);
|
|
31
25
|
});
|
|
32
26
|
}
|
|
33
27
|
// Create a whole certificate item in one invocation
|
|
34
28
|
postCertificate(certificateItemRequest) {
|
|
35
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
|
|
30
|
+
const response = yield this.client.httpPost("/orderable/certificates", mapping_1.default.snakeCaseKeys(certificateItemRequest));
|
|
31
|
+
return this.handleResponse(response);
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
34
|
/*
|
|
@@ -43,7 +38,8 @@ class default_1 {
|
|
|
43
38
|
*/
|
|
44
39
|
postInitialCertificate(certificateItemRequest) {
|
|
45
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
|
|
41
|
+
const response = yield this.client.httpPost("/orderable/certificates/initial", mapping_1.default.snakeCaseKeys(certificateItemRequest));
|
|
42
|
+
return this.handleResponse(response);
|
|
47
43
|
});
|
|
48
44
|
}
|
|
49
45
|
/*
|
|
@@ -53,38 +49,27 @@ class default_1 {
|
|
|
53
49
|
*/
|
|
54
50
|
patchCertificate(certificateItemRequest, certificateId) {
|
|
55
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const patchRequest = mapping_1.default.snakeCaseKeys(certificateItemRequest);
|
|
57
52
|
const additionalHeaders = {
|
|
58
53
|
"Content-Type": "application/merge-patch+json"
|
|
59
54
|
};
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
httpStatusCode: resp.status
|
|
63
|
-
};
|
|
64
|
-
if (!resp.error) {
|
|
65
|
-
resource.resource = mapping_1.default.camelCaseKeys(resp.body);
|
|
66
|
-
}
|
|
67
|
-
return resource;
|
|
55
|
+
const response = yield this.client.httpPatch(`/orderable/certificates/${certificateId}`, mapping_1.default.snakeCaseKeys(certificateItemRequest), additionalHeaders);
|
|
56
|
+
return this.handleResponse(response);
|
|
68
57
|
});
|
|
69
58
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
response.resource = mapping_1.default.camelCaseKeys(serverResponse.body);
|
|
85
|
-
return result_1.success(response);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
59
|
+
handleResponse(serverResponse) {
|
|
60
|
+
const response = {
|
|
61
|
+
httpStatusCode: serverResponse.status
|
|
62
|
+
};
|
|
63
|
+
if (serverResponse.error) {
|
|
64
|
+
return result_1.failure({
|
|
65
|
+
httpStatusCode: serverResponse.status,
|
|
66
|
+
errors: serverResponse.error.errors
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
response.resource = mapping_1.default.camelCaseKeys(serverResponse.body);
|
|
71
|
+
return result_1.success(response);
|
|
72
|
+
}
|
|
88
73
|
}
|
|
89
74
|
}
|
|
90
75
|
exports.default = default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/certificates/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAQA,uEAA+C;AAC/C,yCAAgD;AAEhD;IACI,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IACjD,CAAC;IAEY,cAAc,CAAE,aAAqB;;YAC9C,MAAM,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/certificates/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAQA,uEAA+C;AAC/C,yCAAgD;AAEhD;IACI,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IACjD,CAAC;IAEY,cAAc,CAAE,aAAqB;;YAC9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,2BAA2B,aAAa,EAAE,CAAC,CAAC;YACvF,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;KAAA;IAED,oDAAoD;IACvC,eAAe,CAAE,sBAAkD;;YAC5E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,EAAE,iBAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAA;YACrH,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;KAAA;IAED;;;;OAIG;IACU,sBAAsB,CAAE,sBAAqD;;YACtF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,iCAAiC,EAAE,iBAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAA;YAC7H,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;KAAA;IAED;;;;OAIG;IACU,gBAAgB,CAAE,sBAAmD,EAAE,aAAqB;;YACrG,MAAM,iBAAiB,GAAG;gBACtB,cAAc,EAAE,8BAA8B;aACjD,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,2BAA2B,aAAa,EAAE,EACnF,iBAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,iBAAiB,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;KAAA;IAEO,cAAc,CAAE,cAA4B;QAChD,MAAM,QAAQ,GAAiC;YAC3C,cAAc,EAAE,cAAc,CAAC,MAAM;SACxC,CAAC;QAEF,IAAI,cAAc,CAAC,KAAK,EAAE;YACtB,OAAO,gBAAO,CAAC;gBACX,cAAc,EAAE,cAAc,CAAC,MAAM;gBACrC,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM;aACtC,CAAC,CAAC;SACN;aAAM;YACH,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAkB,cAAc,CAAC,IAAI,CAAC,CAAC;YAChF,OAAO,gBAAO,CAAC,QAAQ,CAAC,CAAC;SAC5B;IACL,CAAC;CACJ;AAtDD,4BAsDC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OverseasEntityService = void 0;
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
var service_1 = require("./service");
|
|
19
|
+
Object.defineProperty(exports, "OverseasEntityService", { enumerable: true, get: function () { return __importDefault(service_1).default; } });
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,qCAA6D;AAApD,iIAAA,OAAO,OAAyB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapOverseasEntity = void 0;
|
|
4
|
+
const mapOverseasEntity = (body) => {
|
|
5
|
+
return {
|
|
6
|
+
presenter: Object.assign({}, body.presenter),
|
|
7
|
+
entity: Object.assign({}, body.entity)
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exports.mapOverseasEntity = mapOverseasEntity;
|
|
11
|
+
//# sourceMappingURL=mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/mapping.ts"],"names":[],"mappings":";;;AAEO,MAAM,iBAAiB,GAAG,CAAC,IAAoB,EAAkB,EAAE;IACtE,OAAO;QACH,SAAS,oBAAO,IAAI,CAAC,SAAS,CAAE;QAChC,MAAM,oBAAO,IAAI,CAAC,MAAM,CAAE;KAC7B,CAAC;AACN,CAAC,CAAC;AALW,QAAA,iBAAiB,qBAK5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IHttpClient } from "../../http";
|
|
2
|
+
import { OverseasEntity, OverseasEntityCreated } from "./types";
|
|
3
|
+
import Resource, { ApiErrorResponse } from "../resource";
|
|
4
|
+
export default class OverseasEntityService {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: IHttpClient);
|
|
7
|
+
postOverseasEntity(transactionId: string, body: OverseasEntity): Promise<Resource<OverseasEntityCreated> | ApiErrorResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const mapping_1 = require("./mapping");
|
|
13
|
+
class OverseasEntityService {
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
postOverseasEntity(transactionId, body) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const URL = `/transactions/${transactionId}/overseas-entity`;
|
|
20
|
+
const response = yield this.client.httpPost(URL, mapping_1.mapOverseasEntity(body));
|
|
21
|
+
if (response.error && response.status !== 400) {
|
|
22
|
+
return {
|
|
23
|
+
httpStatusCode: response.status,
|
|
24
|
+
errors: [response.error]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const resource = {
|
|
28
|
+
httpStatusCode: response.status
|
|
29
|
+
};
|
|
30
|
+
resource.resource = Object.assign({}, response.body);
|
|
31
|
+
return resource;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = OverseasEntityService;
|
|
36
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +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,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;gBAC3C,OAAO;oBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;oBAC/B,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;iBAC3B,CAAC;aACL;YAED,MAAM,QAAQ,GAAoC;gBAC9C,cAAc,EAAE,QAAQ,CAAC,MAAM;aAClC,CAAC;YAEF,QAAQ,CAAC,QAAQ,qBAAQ,QAAQ,CAAC,IAAI,CAAE,CAAC;YACzC,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AArBD,wCAqBC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overseas Entity interface used within this SDK
|
|
3
|
+
*/
|
|
4
|
+
export interface OverseasEntity {
|
|
5
|
+
presenter?: Presenter;
|
|
6
|
+
entity?: Entity;
|
|
7
|
+
}
|
|
8
|
+
export interface OverseasEntityCreated {
|
|
9
|
+
id: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Overseas Entities interface used on OverseasEntity object
|
|
13
|
+
*/
|
|
14
|
+
export interface Presenter {
|
|
15
|
+
full_name?: string;
|
|
16
|
+
phone_number?: string;
|
|
17
|
+
role?: presenterRole;
|
|
18
|
+
role_title?: string;
|
|
19
|
+
anti_money_laundering_registration_number?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Entity {
|
|
22
|
+
name?: string;
|
|
23
|
+
incorporation_country?: string;
|
|
24
|
+
principal_address?: Address;
|
|
25
|
+
is_service_address_same_as_principal_address?: yesNoResponse;
|
|
26
|
+
service_address?: Address;
|
|
27
|
+
email?: string;
|
|
28
|
+
legal_form?: string;
|
|
29
|
+
law_governed?: string;
|
|
30
|
+
public_register_name?: string;
|
|
31
|
+
registration_number?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Shared Data Type
|
|
35
|
+
*/
|
|
36
|
+
export interface Address {
|
|
37
|
+
property_name_number?: string;
|
|
38
|
+
line_1?: string;
|
|
39
|
+
line_2?: string;
|
|
40
|
+
town?: string;
|
|
41
|
+
county?: string;
|
|
42
|
+
country?: string;
|
|
43
|
+
postcode?: string;
|
|
44
|
+
}
|
|
45
|
+
declare enum yesNoResponse {
|
|
46
|
+
No = 0,
|
|
47
|
+
Yes = 1
|
|
48
|
+
}
|
|
49
|
+
declare enum presenterRole {
|
|
50
|
+
administrator = "administrator",
|
|
51
|
+
agent = "agent",
|
|
52
|
+
solicitor = "solicitor",
|
|
53
|
+
beneficial_owner = "beneficial_owner",
|
|
54
|
+
other = "other"
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Overseas Entity interface used within this SDK
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var yesNoResponse;
|
|
7
|
+
(function (yesNoResponse) {
|
|
8
|
+
yesNoResponse[yesNoResponse["No"] = 0] = "No";
|
|
9
|
+
yesNoResponse[yesNoResponse["Yes"] = 1] = "Yes";
|
|
10
|
+
})(yesNoResponse || (yesNoResponse = {}));
|
|
11
|
+
var presenterRole;
|
|
12
|
+
(function (presenterRole) {
|
|
13
|
+
presenterRole["administrator"] = "administrator";
|
|
14
|
+
presenterRole["agent"] = "agent";
|
|
15
|
+
presenterRole["solicitor"] = "solicitor";
|
|
16
|
+
presenterRole["beneficial_owner"] = "beneficial_owner";
|
|
17
|
+
presenterRole["other"] = "other";
|
|
18
|
+
})(presenterRole || (presenterRole = {}));
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA+CH,IAAK,aAGJ;AAHD,WAAK,aAAa;IACd,6CAAM,CAAA;IACN,+CAAO,CAAA;AACX,CAAC,EAHI,aAAa,KAAb,aAAa,QAGjB;AAED,IAAK,aAMJ;AAND,WAAK,aAAa;IACd,gDAA+B,CAAA;IAC/B,gCAAe,CAAA;IACf,wCAAuB,CAAA;IACvB,sDAAqC,CAAA;IACrC,gCAAe,CAAA;AACnB,CAAC,EANI,aAAa,KAAb,aAAa,QAMjB"}
|
|
@@ -5,5 +5,5 @@ import "url-search-params-polyfill";
|
|
|
5
5
|
export default class AdvancedSearchService {
|
|
6
6
|
private readonly client;
|
|
7
7
|
constructor(client: IHttpClient);
|
|
8
|
-
getCompanies(startIndex: number | null, companyNameIncludes: string | null, companyNameExcludes: string | null, location: string | null, incorporatedFrom: string | null, incorporatedTo: string | null, sicCodes: string | null, companyStatus: string | null, companyType: string | null, dissolvedFrom: string | null, dissolvedTo: string | null, size: number | null, requestId: string): Promise<Resource<CompaniesResource>>;
|
|
8
|
+
getCompanies(startIndex: number | null, companyNameIncludes: string | null, companyNameExcludes: string | null, location: string | null, incorporatedFrom: string | null, incorporatedTo: string | null, sicCodes: string | null, companyStatus: string | null, companyType: string | null, companySubtype: string | null, dissolvedFrom: string | null, dissolvedTo: string | null, size: number | null, requestId: string): Promise<Resource<CompaniesResource>>;
|
|
9
9
|
}
|
|
@@ -14,7 +14,7 @@ class AdvancedSearchService {
|
|
|
14
14
|
constructor(client) {
|
|
15
15
|
this.client = client;
|
|
16
16
|
}
|
|
17
|
-
getCompanies(startIndex, companyNameIncludes, companyNameExcludes, location, incorporatedFrom, incorporatedTo, sicCodes, companyStatus, companyType, dissolvedFrom, dissolvedTo, size, requestId) {
|
|
17
|
+
getCompanies(startIndex, companyNameIncludes, companyNameExcludes, location, incorporatedFrom, incorporatedTo, sicCodes, companyStatus, companyType, companySubtype, dissolvedFrom, dissolvedTo, size, requestId) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const START_INDEX_QUERY = "start_index";
|
|
20
20
|
const COMPANY_NAME_INCLUDES_QUERY = "company_name_includes";
|
|
@@ -25,6 +25,7 @@ class AdvancedSearchService {
|
|
|
25
25
|
const SIC_CODES_QUERY = "sic_codes";
|
|
26
26
|
const COMPANY_STATUS_QUERY = "company_status";
|
|
27
27
|
const COMPANY_TYPE_QUERY = "company_type";
|
|
28
|
+
const COMPANY_SUBTYPE_QUERY = "company_subtype";
|
|
28
29
|
const DISSOLVED_FROM_QUERY_PARAMETER = "dissolved_from";
|
|
29
30
|
const DISSOLVED_TO_QUERY_PARAMETER = "dissolved_to";
|
|
30
31
|
const SIZE_QUERY_PARAMETER = "size";
|
|
@@ -60,6 +61,9 @@ class AdvancedSearchService {
|
|
|
60
61
|
if (companyType !== null) {
|
|
61
62
|
buildAdvancedSearchURL.append(COMPANY_TYPE_QUERY, companyType);
|
|
62
63
|
}
|
|
64
|
+
if (companySubtype !== null) {
|
|
65
|
+
buildAdvancedSearchURL.append(COMPANY_SUBTYPE_QUERY, companySubtype);
|
|
66
|
+
}
|
|
63
67
|
if (dissolvedFrom !== null) {
|
|
64
68
|
buildAdvancedSearchURL.append(DISSOLVED_FROM_QUERY_PARAMETER, dissolvedFrom);
|
|
65
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/search/advanced-search/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,sCAAoC;AAEpC,MAAqB,qBAAqB;IACtC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IACzC,YAAY,CAAE,UAAyB,EAAE,mBAAkC,EAAE,mBAAkC,EAAE,QAAuB,EAAE,gBAA+B,EAClL,cAA6B,EAAE,QAAuB,EAAE,aAA4B,EAAE,WAA0B,EAAE,aAA4B,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/search/advanced-search/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,sCAAoC;AAEpC,MAAqB,qBAAqB;IACtC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IACzC,YAAY,CAAE,UAAyB,EAAE,mBAAkC,EAAE,mBAAkC,EAAE,QAAuB,EAAE,gBAA+B,EAClL,cAA6B,EAAE,QAAuB,EAAE,aAA4B,EAAE,WAA0B,EAAE,cAA6B,EAAE,aAA4B,EAC7K,WAA0B,EAAE,IAAmB,EAAE,SAAiB;;YAClE,MAAM,iBAAiB,GAAG,aAAa,CAAC;YACxC,MAAM,2BAA2B,GAAG,uBAAuB,CAAC;YAC5D,MAAM,2BAA2B,GAAG,uBAAuB,CAAA;YAC3D,MAAM,cAAc,GAAG,UAAU,CAAC;YAClC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;YACpD,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;YAChD,MAAM,eAAe,GAAG,WAAW,CAAC;YACpC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;YAC9C,MAAM,kBAAkB,GAAG,cAAc,CAAC;YAC1C,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;YAChD,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;YACxD,MAAM,4BAA4B,GAAG,cA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AAI,EAAE;gBACzB,sBAAsB,CAAC,MAAM,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAA;aACvE;YAED,IAAI,aAAa,KAAK,IAAI,EAAE;gBACxB,sBAAsB,CAAC,MAAM,CAAC,8BAA8B,EAAE,aAAa,CAAC,CAAA;aAC/E;YAED,IAAI,WAAW,KAAK,IAAI,EAAE;gBACtB,sBAAsB,CAAC,MAAM,CAAC,4BAA4B,EAAE,WAAW,CAAC,CAAA;aAC3E;YAED,IAAI,IAAI,KAAK,IAAI,EAAE;gBACf,sBAAsB,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;aACpE;YAED,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,QAAQ,EAAE,CAAC;YAE5D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;YAE7E,MAAM,QAAQ,GAAgC;gBAC1C,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,QAAQ,CAAC;aACnB;YAED,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAyB,CAAC;YAEnD,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AA7FD,wCA6FC"}
|
|
@@ -10,6 +10,7 @@ export interface Items {
|
|
|
10
10
|
company_number: string;
|
|
11
11
|
company_status: string;
|
|
12
12
|
company_type: string;
|
|
13
|
+
company_subtype: string;
|
|
13
14
|
kind: string;
|
|
14
15
|
links: Links;
|
|
15
16
|
date_of_cessation: Date;
|
|
@@ -31,6 +32,7 @@ export interface TopHit {
|
|
|
31
32
|
company_number: string;
|
|
32
33
|
company_status: string;
|
|
33
34
|
company_type: string;
|
|
35
|
+
company_subtype: string;
|
|
34
36
|
kind: string;
|
|
35
37
|
links: Links;
|
|
36
38
|
date_of_cessation: Date;
|