@companieshouse/api-sdk-node 2.0.191 → 2.0.192
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.
|
@@ -40,7 +40,8 @@ class default_1 {
|
|
|
40
40
|
postACSP(transactionId, acsp) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const url = `/transactions/${transactionId}/authorised-corporate-service-provider-applications`;
|
|
43
|
-
const
|
|
43
|
+
const acspDto = mapping_1.default.snakeCaseKeys(acsp);
|
|
44
|
+
const resp = yield this.client.httpPost(url, acspDto);
|
|
44
45
|
if (resp.status >= 400) {
|
|
45
46
|
return { httpStatusCode: resp.status, errors: [resp.error] };
|
|
46
47
|
}
|
|
@@ -59,7 +60,8 @@ class default_1 {
|
|
|
59
60
|
putACSP(transactionId, acspApplicationId, acsp) {
|
|
60
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
62
|
const url = `/transactions/${transactionId}/authorised-corporate-service-provider-applications/${acspApplicationId}`;
|
|
62
|
-
const
|
|
63
|
+
const acspDto = mapping_1.default.snakeCaseKeys(acsp);
|
|
64
|
+
const resp = yield this.client.httpPut(url, acspDto);
|
|
63
65
|
if (resp.status >= 400) {
|
|
64
66
|
return { httpStatusCode: resp.status, errors: [resp.error] };
|
|
65
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/acsp/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAOA,oEAA4C;AAE5C;IACI,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,OAAO,CAAE,aAAqB,EAAE,iBAAyB;;YAClE,MAAM,GAAG,GAAG,iBAAiB,aAAa,uDAAuD,iBAAiB,EAAE,CAAC;YACrH,MAAM,IAAI,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE1D,IAAI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AAG,GAAG,kBAAkB,iBAAiB,cAAc,CAAC;YAC9D,MAAM,IAAI,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAC7D,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAhFD,4BAgFC"}
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
export interface AddressResource {
|
|
2
|
-
address_line_1: string;
|
|
3
|
-
address_line_2?: string;
|
|
4
|
-
care_of?: string;
|
|
5
|
-
country: string;
|
|
6
|
-
locality: string;
|
|
7
|
-
po_box?: string;
|
|
8
|
-
postal_code?: string;
|
|
9
|
-
premises?: string;
|
|
10
|
-
region?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface DateOfBirthResource {
|
|
13
|
-
day?: string;
|
|
14
|
-
month: string;
|
|
15
|
-
year: string;
|
|
16
|
-
}
|
|
17
|
-
export interface DateOfBirth {
|
|
18
|
-
day?: string;
|
|
19
|
-
month: string;
|
|
20
|
-
year: string;
|
|
21
|
-
}
|
|
22
1
|
export interface Address {
|
|
23
2
|
premises?: string;
|
|
24
3
|
addressLine1?: string;
|
|
@@ -51,10 +30,8 @@ export interface ApplicantDetails {
|
|
|
51
30
|
correspondenceAddress?: Address;
|
|
52
31
|
correspondenceAddressIsSameAsRegisteredOfficeAddress?: boolean;
|
|
53
32
|
}
|
|
54
|
-
export interface
|
|
33
|
+
export interface AcspData {
|
|
55
34
|
id: string;
|
|
56
|
-
transactionId?: string;
|
|
57
|
-
roleInTheBusiness?: string;
|
|
58
35
|
registeredOfficeAddress?: Address;
|
|
59
36
|
typeOfBusiness?: string;
|
|
60
37
|
roleType?: string;
|
|
@@ -67,25 +44,52 @@ export interface AcspDto {
|
|
|
67
44
|
howAreYouRegisteredWithAml?: string;
|
|
68
45
|
applicantDetails?: ApplicantDetails;
|
|
69
46
|
}
|
|
70
|
-
export interface
|
|
47
|
+
export interface AcspResponse {
|
|
48
|
+
data: AcspDataDto;
|
|
49
|
+
}
|
|
50
|
+
export interface AcspDataDto {
|
|
71
51
|
id: string;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
typeOfBusiness?: string;
|
|
76
|
-
roleType?: string;
|
|
52
|
+
registered_office_address?: AddressDto;
|
|
53
|
+
type_of_business?: string;
|
|
54
|
+
role_type?: string;
|
|
77
55
|
verified?: boolean;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
business_name?: string;
|
|
57
|
+
work_sector?: string;
|
|
58
|
+
aml_supervisory_bodies?: AmlSupervisoryBodyDto[];
|
|
59
|
+
company_details?: CompanyDto;
|
|
60
|
+
company_auth_code_provided?: boolean;
|
|
61
|
+
how_are_you_registered_with_aml?: string;
|
|
62
|
+
applicant_details?: ApplicantDetailsDto;
|
|
85
63
|
}
|
|
86
|
-
export interface
|
|
87
|
-
|
|
64
|
+
export interface ApplicantDetailsDto {
|
|
65
|
+
first_name?: string;
|
|
66
|
+
middle_name?: string;
|
|
67
|
+
last_name?: string;
|
|
68
|
+
date_of_birth?: Date;
|
|
69
|
+
nationality?: NationalityDto;
|
|
70
|
+
country_of_residence?: string;
|
|
71
|
+
correspondence_address?: AddressDto;
|
|
72
|
+
correspondence_address_is_same_as_registered_office_address?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface AddressDto {
|
|
75
|
+
premises?: string;
|
|
76
|
+
address_line_1?: string;
|
|
77
|
+
address_line_2?: string;
|
|
78
|
+
locality?: string;
|
|
79
|
+
region?: string;
|
|
80
|
+
country?: string;
|
|
81
|
+
postal_code?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface CompanyDto {
|
|
84
|
+
company_name?: string;
|
|
85
|
+
company_number?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface AmlSupervisoryBodyDto {
|
|
88
|
+
aml_supervisory_body?: string;
|
|
89
|
+
membership_id?: string;
|
|
88
90
|
}
|
|
89
|
-
export interface
|
|
90
|
-
|
|
91
|
+
export interface NationalityDto {
|
|
92
|
+
first_nationality: string;
|
|
93
|
+
second_nationality?: string;
|
|
94
|
+
third_nationality?: string;
|
|
91
95
|
}
|