@companieshouse/api-sdk-node 2.0.248 → 2.0.249
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.
|
@@ -8,10 +8,10 @@ export default class PscService {
|
|
|
8
8
|
private readonly client;
|
|
9
9
|
constructor(client: IHttpClient);
|
|
10
10
|
/**
|
|
11
|
-
* Get the PSC details
|
|
11
|
+
* Get the PSC individual details including their optional verification state.
|
|
12
12
|
*
|
|
13
|
-
* @param companyNumber the
|
|
14
|
-
* @param
|
|
13
|
+
* @param companyNumber the Company Number to look up
|
|
14
|
+
* @param pscNotificationId the PSC Notification ID to retrieve
|
|
15
15
|
*/
|
|
16
|
-
getPscIndividual(companyNumber: string,
|
|
16
|
+
getPscIndividual(companyNumber: string, pscNotificationId: string): Promise<Resource<PersonWithSignificantControl> | ApiErrorResponse>;
|
|
17
17
|
}
|
|
@@ -21,26 +21,27 @@ class PscService {
|
|
|
21
21
|
this.client = client;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Get the PSC details
|
|
24
|
+
* Get the PSC individual details including their optional verification state.
|
|
25
25
|
*
|
|
26
|
-
* @param companyNumber the
|
|
27
|
-
* @param
|
|
26
|
+
* @param companyNumber the Company Number to look up
|
|
27
|
+
* @param pscNotificationId the PSC Notification ID to retrieve
|
|
28
28
|
*/
|
|
29
|
-
getPscIndividual(companyNumber,
|
|
29
|
+
getPscIndividual(companyNumber, pscNotificationId) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
httpStatusCode: response.status
|
|
34
|
-
};
|
|
31
|
+
const resourceUri = `/company/${companyNumber}/persons-with-significant-control/individual/${pscNotificationId}/verification-state`;
|
|
32
|
+
const response = yield this.client.httpGet(resourceUri);
|
|
35
33
|
if (response.error) {
|
|
36
34
|
return {
|
|
37
35
|
httpStatusCode: response.status,
|
|
38
36
|
errors: [response.error]
|
|
39
37
|
};
|
|
40
38
|
}
|
|
39
|
+
const frontEndResource = {
|
|
40
|
+
httpStatusCode: response.status
|
|
41
|
+
};
|
|
41
42
|
const body = response.body;
|
|
42
|
-
|
|
43
|
-
return
|
|
43
|
+
frontEndResource.resource = mapping_1.default.camelCaseKeys(body);
|
|
44
|
+
return frontEndResource;
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,oEAA4C;AAI5C;;GAEG;AACH,MAAqB,UAAU;IAC3B,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;KAKC;IACY,gBAAgB,CAAE,aAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,oEAA4C;AAI5C;;GAEG;AACH,MAAqB,UAAU;IAC3B,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;KAKC;IACY,gBAAgB,CAAE,aAAqB,EAAE,iBAAyB;;YAC3E,MAAM,WAAW,GAAG,YAAY,aAAa,gDAAgD,iBAAiB,qBAAqB,CAAC;YACpI,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAExD,IAAI,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO;oBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;oBAC/B,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;iBAC3B,CAAA;aACJ;YAED,MAAM,gBAAgB,GAA2C;gBAC7D,cAAc,EAAE,QAAQ,CAAC,MAAM;aAClC,CAAC;YAEF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAA4C,CAAC;YACnE,gBAAgB,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAC;YAEtF,OAAO,gBAAgB,CAAC;QAC5B,CAAC;KAAA;CACJ;AA7BD,6BA6BC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PersonWithSignificantControlResource is what is returned from the
|
|
2
|
+
* PersonWithSignificantControlResource is what is returned from the PSC data API, and will apply to individual PSC types only.
|
|
3
3
|
*/
|
|
4
4
|
export interface PersonWithSignificantControlResource {
|
|
5
5
|
address: AddressResource;
|
|
@@ -14,13 +14,14 @@ export interface PersonWithSignificantControlResource {
|
|
|
14
14
|
natures_of_control: string[];
|
|
15
15
|
notified_on: string;
|
|
16
16
|
is_sanctioned?: boolean;
|
|
17
|
-
kind?:
|
|
18
|
-
|
|
17
|
+
kind?: KindEnum;
|
|
18
|
+
verification_state?: VerificationStateResource;
|
|
19
19
|
}
|
|
20
20
|
export interface AddressResource {
|
|
21
21
|
address_line_1: string;
|
|
22
22
|
address_line_2?: string;
|
|
23
23
|
careOf?: string;
|
|
24
|
+
country?: string;
|
|
24
25
|
locality: string;
|
|
25
26
|
poBox?: string;
|
|
26
27
|
postal_code?: string;
|
|
@@ -39,14 +40,6 @@ export interface NameElementsResource {
|
|
|
39
40
|
middle_name?: string;
|
|
40
41
|
surname: string;
|
|
41
42
|
}
|
|
42
|
-
export interface IdentificationResource {
|
|
43
|
-
identification_type?: string;
|
|
44
|
-
legal_authority?: string;
|
|
45
|
-
legal_form?: string;
|
|
46
|
-
place_registered?: string;
|
|
47
|
-
registration_number?: string;
|
|
48
|
-
country_registered?: string;
|
|
49
|
-
}
|
|
50
43
|
export interface ResultsLinksResource {
|
|
51
44
|
self: string;
|
|
52
45
|
persons_with_significant_control_statements_list?: string;
|
|
@@ -55,6 +48,19 @@ export interface ItemLinksResource {
|
|
|
55
48
|
self: string;
|
|
56
49
|
statement?: string;
|
|
57
50
|
}
|
|
51
|
+
export interface VerificationStateResource {
|
|
52
|
+
verification_status?: VerificationStatusEnum;
|
|
53
|
+
verification_start_date?: Date;
|
|
54
|
+
verification_statement_due_date?: Date;
|
|
55
|
+
}
|
|
56
|
+
export declare enum VerificationStatusEnum {
|
|
57
|
+
UNVERIFIED = "UNVERIFIED",
|
|
58
|
+
VERIFIED = "VERIFIED",
|
|
59
|
+
PENDING = "PENDING"
|
|
60
|
+
}
|
|
61
|
+
export declare enum KindEnum {
|
|
62
|
+
INDIVIDUAL_PERSON_WITH_SIGNIFICANT_CONTROL = "individual-person-with-significant-control"
|
|
63
|
+
}
|
|
58
64
|
export interface PersonWithSignificantControl {
|
|
59
65
|
address: any;
|
|
60
66
|
countryOfResidence: string;
|
|
@@ -68,13 +74,14 @@ export interface PersonWithSignificantControl {
|
|
|
68
74
|
naturesOfControl: string[];
|
|
69
75
|
notifiedOn: string;
|
|
70
76
|
isSanctioned?: boolean;
|
|
71
|
-
kind?:
|
|
72
|
-
|
|
77
|
+
kind?: KindEnum;
|
|
78
|
+
verificationState?: VerificationState;
|
|
73
79
|
}
|
|
74
80
|
export interface Address {
|
|
75
81
|
addressLine1: string;
|
|
76
82
|
addressLine2?: string;
|
|
77
83
|
careOf?: string;
|
|
84
|
+
country?: string;
|
|
78
85
|
locality: string;
|
|
79
86
|
poBox?: string;
|
|
80
87
|
postalCode?: string;
|
|
@@ -93,14 +100,6 @@ export interface NameElements {
|
|
|
93
100
|
middleName?: string;
|
|
94
101
|
surname: string;
|
|
95
102
|
}
|
|
96
|
-
export interface Identification {
|
|
97
|
-
identificationType?: string;
|
|
98
|
-
legalAuthority?: string;
|
|
99
|
-
legalForm?: string;
|
|
100
|
-
placeRegistered?: string;
|
|
101
|
-
registrationNumber?: string;
|
|
102
|
-
countryRegistered?: string;
|
|
103
|
-
}
|
|
104
103
|
export interface ResultsLinks {
|
|
105
104
|
self: string;
|
|
106
105
|
personsWithSignificantControlStatementsList?: string;
|
|
@@ -109,3 +108,8 @@ export interface ItemLinks {
|
|
|
109
108
|
self: string;
|
|
110
109
|
statement?: string;
|
|
111
110
|
}
|
|
111
|
+
export interface VerificationState {
|
|
112
|
+
verificationStatus?: VerificationStatusEnum;
|
|
113
|
+
verificationStartDate?: Date;
|
|
114
|
+
verificationStatementDueDate?: Date;
|
|
115
|
+
}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* PersonWithSignificantControlResource is what is returned from the
|
|
3
|
+
* PersonWithSignificantControlResource is what is returned from the PSC data API, and will apply to individual PSC types only.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.KindEnum = exports.VerificationStatusEnum = void 0;
|
|
6
7
|
;
|
|
7
8
|
;
|
|
8
9
|
;
|
|
9
10
|
;
|
|
10
11
|
;
|
|
11
12
|
;
|
|
12
|
-
;
|
|
13
|
-
|
|
13
|
+
var VerificationStatusEnum;
|
|
14
|
+
(function (VerificationStatusEnum) {
|
|
15
|
+
VerificationStatusEnum["UNVERIFIED"] = "UNVERIFIED";
|
|
16
|
+
VerificationStatusEnum["VERIFIED"] = "VERIFIED";
|
|
17
|
+
VerificationStatusEnum["PENDING"] = "PENDING";
|
|
18
|
+
})(VerificationStatusEnum = exports.VerificationStatusEnum || (exports.VerificationStatusEnum = {}));
|
|
19
|
+
var KindEnum;
|
|
20
|
+
(function (KindEnum) {
|
|
21
|
+
KindEnum["INDIVIDUAL_PERSON_WITH_SIGNIFICANT_CONTROL"] = "individual-person-with-significant-control";
|
|
22
|
+
})(KindEnum = exports.KindEnum || (exports.KindEnum = {}));
|
|
14
23
|
;
|
|
15
24
|
;
|
|
16
25
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/psc/types.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/psc/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiBF,CAAC;AAYD,CAAC;AAMD,CAAC;AAQD,CAAC;AAKD,CAAC;AAKD,CAAC;AAQF,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;AACrB,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC;AAED,IAAY,QAEX;AAFD,WAAY,QAAQ;IAClB,qGAAyF,CAAA;AAC3F,CAAC,EAFW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAEnB;AAiBA,CAAC;AAYD,CAAC;AAMD,CAAC;AAQD,CAAC;AAKD,CAAC;AAKD,CAAC"}
|