@companieshouse/api-sdk-node 2.0.159 → 2.0.161
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/services/account-validator/types.d.ts +4 -4
- package/dist/services/account-validator/types.js +0 -5
- package/dist/services/account-validator/types.js.map +1 -1
- package/dist/services/acsp/service.d.ts +3 -3
- package/dist/services/acsp/service.js.map +1 -1
- package/dist/services/acsp/types.d.ts +42 -15
- package/package.json +1 -1
|
@@ -5,16 +5,16 @@ export interface AccountValidatorRequest {
|
|
|
5
5
|
packageType?: PackageType;
|
|
6
6
|
}
|
|
7
7
|
export interface Data {
|
|
8
|
-
balanceSheetDate
|
|
9
|
-
accountsType
|
|
10
|
-
companieshouseRegisteredNumber
|
|
8
|
+
balanceSheetDate?: string;
|
|
9
|
+
accountsType?: string;
|
|
10
|
+
companieshouseRegisteredNumber?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface ErrorMessage {
|
|
13
13
|
errorMessage: string;
|
|
14
14
|
}
|
|
15
15
|
export interface Result {
|
|
16
16
|
errorMessages: ErrorMessage[];
|
|
17
|
-
data
|
|
17
|
+
data?: Data;
|
|
18
18
|
validationStatus: ValidationStatus;
|
|
19
19
|
}
|
|
20
20
|
export interface AccountValidatorResponse {
|
|
@@ -22,11 +22,6 @@ function isAccountValidatorResponse(object) {
|
|
|
22
22
|
if (!["OK", "FAILED"].includes(validationStatus)) {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
|
-
if (typeof data.balance_sheet_date !== "string" ||
|
|
26
|
-
typeof data.accounts_type !== "string" ||
|
|
27
|
-
typeof data.companieshouse_registered_number !== "string") {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
25
|
for (const errorMessage of errorMessages !== null && errorMessages !== void 0 ? errorMessages : []) {
|
|
31
26
|
if (typeof errorMessage !== "object" || errorMessage === null) {
|
|
32
27
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/account-validator/types.ts"],"names":[],"mappings":";;;AAkCA,SAAgB,0BAA0B,CAAE,MAAW;IACnD,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;QACjC,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;QACjC,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACrC,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;QAC3D,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;QAC7D,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;IAChE,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9D,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,gBAAgB,KAAK,QAAQ,EAAE;QACtC,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QAC9C,OAAO,KAAK,CAAC;KAChB;IAED,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/account-validator/types.ts"],"names":[],"mappings":";;;AAkCA,SAAgB,0BAA0B,CAAE,MAAW;IACnD,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;QACjC,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;QACjC,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACrC,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;QAC3D,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;QAC7D,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;IAChE,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9D,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,gBAAgB,KAAK,QAAQ,EAAE;QACtC,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QAC9C,OAAO,KAAK,CAAC;KAChB;IAED,KAAK,MAAM,YAAY,IAAI,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,EAAE,EAAE;QAC5C,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,KAAK,IAAI,EAAE;YAC3D,OAAO,KAAK,CAAC;SAChB;QACD,IAAI,OAAO,YAAY,CAAC,YAAY,KAAK,QAAQ,EAAE;YAC/C,OAAO,KAAK,CAAC;SAChB;KACJ;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AApCD,gEAoCC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AcspData, AcspResponse } from "./types";
|
|
2
2
|
import { IHttpClient } from "../../http";
|
|
3
3
|
import Resource, { ApiErrorResponse } from "../resource";
|
|
4
4
|
export default class {
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: IHttpClient);
|
|
7
|
-
getAcsp(transactionId: string, id: string): Promise<Resource<
|
|
7
|
+
getAcsp(transactionId: string, id: string): Promise<Resource<AcspData> | ApiErrorResponse>;
|
|
8
8
|
/**
|
|
9
9
|
* Post an ACSP object to update on the API.
|
|
10
10
|
*/
|
|
11
|
-
postACSP(transactionId: string, acsp:
|
|
11
|
+
postACSP(transactionId: string, acsp: AcspData): Promise<Resource<AcspResponse> | ApiErrorResponse>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/acsp/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAQA,oEAA4C;AAE5C;IACI,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,OAAO,CAAE,aAAqB,EAAE,EAAU;;YACnD,MAAM,GAAG,GAAG,iBAAiB,aAAa,SAAS,EAAE,EAAE,CAAC;YACxD,MAAM,IAAI,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE1D,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE;gBACpB,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;aAChE;YAED,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/acsp/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAQA,oEAA4C;AAE5C;IACI,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,OAAO,CAAE,aAAqB,EAAE,EAAU;;YACnD,MAAM,GAAG,GAAG,iBAAiB,aAAa,SAAS,EAAE,EAAE,CAAC;YACxD,MAAM,IAAI,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE1D,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE;gBACpB,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;aAChE;YAED,MAAM,QAAQ,GAAuB;gBACjC,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAe,CAAC;YAElC,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAW,IAAI,CAAC,CAAC;YAC1D,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;IAED;;OAEG;IACU,QAAQ,CAAE,aAAqB,EAAE,IAAc;;YACxD,MAAM,GAAG,GAAG,iBAAiB,aAAa,OAAO,CAAC;YAElD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAElD,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE;gBACpB,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;aAChE;YAED,MAAM,QAAQ,GAA2B;gBACrC,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAuB,CAAC;YAC1C,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAoB,CAAA;YAC7C,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AAxCD,4BAwCC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RegisteredOfficeAddress } from "../company-profile/types";
|
|
1
2
|
export interface AddressResource {
|
|
2
3
|
address_line_1: string;
|
|
3
4
|
address_line_2?: string;
|
|
@@ -20,51 +21,77 @@ export interface DateOfBirth {
|
|
|
20
21
|
year: string;
|
|
21
22
|
}
|
|
22
23
|
export interface Address {
|
|
23
|
-
propertyDetails
|
|
24
|
-
line1
|
|
25
|
-
line2
|
|
26
|
-
town
|
|
27
|
-
county
|
|
28
|
-
country
|
|
29
|
-
postcode
|
|
24
|
+
propertyDetails?: string;
|
|
25
|
+
line1?: string;
|
|
26
|
+
line2?: string;
|
|
27
|
+
town?: string;
|
|
28
|
+
county?: string;
|
|
29
|
+
country?: string;
|
|
30
|
+
postcode?: string;
|
|
30
31
|
}
|
|
31
32
|
export interface nationality {
|
|
32
33
|
firstNationality: string;
|
|
33
34
|
secondNationality?: string;
|
|
34
35
|
thirdNationality?: string;
|
|
35
36
|
}
|
|
37
|
+
export interface Company {
|
|
38
|
+
companyName?: string;
|
|
39
|
+
companyNumber?: string;
|
|
40
|
+
status?: string;
|
|
41
|
+
incorporationDate?: string;
|
|
42
|
+
companyType?: string;
|
|
43
|
+
registeredOfficeAddress?: RegisteredOfficeAddress;
|
|
44
|
+
}
|
|
45
|
+
export interface AmlSupervisoryBody {
|
|
46
|
+
amlSupervisoryBody?: string;
|
|
47
|
+
membershipId?: string;
|
|
48
|
+
}
|
|
36
49
|
export interface AcspDto {
|
|
37
50
|
id: string;
|
|
38
|
-
typeOfBusiness: string;
|
|
39
51
|
firstName?: string;
|
|
52
|
+
middleName?: string;
|
|
40
53
|
lastName?: string;
|
|
41
|
-
|
|
54
|
+
email?: string;
|
|
55
|
+
roleInTheBusiness?: string;
|
|
56
|
+
correspondenceAddress?: Address;
|
|
57
|
+
businessAddress?: Address;
|
|
58
|
+
typeOfBusiness?: string;
|
|
42
59
|
roleType?: string;
|
|
43
60
|
dateOfBirth?: string;
|
|
44
61
|
verified?: boolean;
|
|
45
|
-
nationality?: nationality
|
|
62
|
+
nationality?: nationality;
|
|
46
63
|
countryOfResidence?: string;
|
|
47
64
|
businessName?: string;
|
|
48
65
|
workSector?: string;
|
|
66
|
+
amlSupervisoryBodies?: AmlSupervisoryBody[];
|
|
67
|
+
companyDetails?: Company;
|
|
49
68
|
companyAuthCodeProvided?: boolean;
|
|
69
|
+
howAreYouRegisteredWithAML?: string;
|
|
50
70
|
}
|
|
51
|
-
export interface
|
|
71
|
+
export interface AcspData {
|
|
52
72
|
id: string;
|
|
53
|
-
typeOfBusiness: string;
|
|
54
73
|
firstName?: string;
|
|
74
|
+
middleName?: string;
|
|
55
75
|
lastName?: string;
|
|
56
|
-
|
|
76
|
+
email?: string;
|
|
77
|
+
roleInTheBusiness?: string;
|
|
78
|
+
correspondenceAddress?: Address;
|
|
79
|
+
businessAddress?: Address;
|
|
80
|
+
typeOfBusiness?: string;
|
|
57
81
|
roleType?: string;
|
|
58
82
|
dateOfBirth?: string;
|
|
59
83
|
verified?: boolean;
|
|
60
|
-
nationality?: nationality
|
|
84
|
+
nationality?: nationality;
|
|
61
85
|
countryOfResidence?: string;
|
|
62
86
|
businessName?: string;
|
|
63
87
|
workSector?: string;
|
|
88
|
+
amlSupervisoryBodies?: AmlSupervisoryBody[];
|
|
89
|
+
companyDetails?: Company;
|
|
64
90
|
companyAuthCodeProvided?: boolean;
|
|
91
|
+
howAreYouRegisteredWithAML?: string;
|
|
65
92
|
}
|
|
66
93
|
export interface AcspResponse {
|
|
67
|
-
data:
|
|
94
|
+
data: AcspData;
|
|
68
95
|
}
|
|
69
96
|
export interface AcspResponseDto {
|
|
70
97
|
data: AcspDto;
|