@companieshouse/api-sdk-node 1.0.106 → 1.0.109
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/overseas-entities/mapping.js +30 -1
- package/dist/services/overseas-entities/mapping.js.map +1 -1
- package/dist/services/overseas-entities/types.d.ts +50 -13
- package/dist/services/overseas-entities/types.js +9 -9
- package/dist/services/overseas-entities/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,8 @@ const mapOverseasEntity = (body) => {
|
|
|
19
19
|
beneficial_owners_statement: body.beneficial_owners_statement,
|
|
20
20
|
beneficial_owners_individual: mapBeneficialOwnersIndividual(body.beneficial_owners_individual),
|
|
21
21
|
beneficial_owners_corporate: mapBeneficialOwnersCorporate(body.beneficial_owners_corporate),
|
|
22
|
-
beneficial_owners_government_or_public_authority:
|
|
22
|
+
beneficial_owners_government_or_public_authority: mapBeneficialOwnersGovernment(body.beneficial_owners_government_or_public_authority),
|
|
23
|
+
managing_officers_individual: mapManagingOfficersIndividual(body.managing_officers_individual)
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
exports.mapOverseasEntity = mapOverseasEntity;
|
|
@@ -51,6 +52,34 @@ const mapBeneficialOwnersCorporate = (boCorporates = []) => {
|
|
|
51
52
|
});
|
|
52
53
|
return boCorporateResources;
|
|
53
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Convert the BeneficialOwnerGovernmentOrPublicAuthority array data into the Resource format that the API expects
|
|
57
|
+
* (just converting dates currently)
|
|
58
|
+
* @param boGovernments Array of BeneficialOwnerGovernmentOrPublicAuthority objects
|
|
59
|
+
* @returns Array of BeneficialOwnerGovernmentOrPublicAuthorityResource
|
|
60
|
+
*/
|
|
61
|
+
const mapBeneficialOwnersGovernment = (boGovernments = []) => {
|
|
62
|
+
const boGovernmentResources = [];
|
|
63
|
+
boGovernments.forEach(boGovernment => {
|
|
64
|
+
const { start_date } = boGovernment, rest = __rest(boGovernment, ["start_date"]);
|
|
65
|
+
boGovernmentResources.push(Object.assign(Object.assign({}, rest), { start_date: convertDateToIsoDateString(start_date.day, start_date.month, start_date.year) }));
|
|
66
|
+
});
|
|
67
|
+
return boGovernmentResources;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Convert the ManagingOfficerIndividual array data into the Resource format that the API expects
|
|
71
|
+
* (just converting dates currently)
|
|
72
|
+
* @param moIndividuals Array of ManagingOfficerIndividual objects
|
|
73
|
+
* @returns Array of ManagingOfficerIndividualResource
|
|
74
|
+
*/
|
|
75
|
+
const mapManagingOfficersIndividual = (moIndividuals = []) => {
|
|
76
|
+
const moIndividualResources = [];
|
|
77
|
+
moIndividuals.forEach(moIndividual => {
|
|
78
|
+
const { date_of_birth } = moIndividual, rest = __rest(moIndividual, ["date_of_birth"]);
|
|
79
|
+
moIndividualResources.push(Object.assign(Object.assign({}, rest), { date_of_birth: convertDateToIsoDateString(date_of_birth.day, date_of_birth.month, date_of_birth.year) }));
|
|
80
|
+
});
|
|
81
|
+
return moIndividualResources;
|
|
82
|
+
};
|
|
54
83
|
const convertDateToIsoDateString = (day, month, year) => {
|
|
55
84
|
return `${year}-${zeroPadNumber(month)}-${zeroPadNumber(day)}`;
|
|
56
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/mapping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/mapping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAMO,MAAM,iBAAiB,GAAG,CAAC,IAAoB,EAA0B,EAAE;IAC9E,OAAO;QACH,SAAS,oBAAO,IAAI,CAAC,SAAS,CAAE;QAChC,MAAM,oBAAO,IAAI,CAAC,MAAM,CAAE;QAC1B,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,4BAA4B,EAAE,6BAA6B,CA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C,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,EAAU,EAAE;IACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,GAAG,KAAK,CAAC;KACtB;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAA"}
|
|
@@ -8,6 +8,7 @@ export interface OverseasEntity {
|
|
|
8
8
|
beneficial_owners_individual?: BeneficialOwnerIndividual[];
|
|
9
9
|
beneficial_owners_corporate?: BeneficialOwnerCorporate[];
|
|
10
10
|
beneficial_owners_government_or_public_authority?: BeneficialOwnerGovernmentOrPublicAuthority[];
|
|
11
|
+
managing_officers_individual?: ManagingOfficerIndividual[];
|
|
11
12
|
}
|
|
12
13
|
export interface OverseasEntityResource {
|
|
13
14
|
presenter?: Presenter;
|
|
@@ -15,7 +16,8 @@ export interface OverseasEntityResource {
|
|
|
15
16
|
beneficial_owners_statement?: BeneficialOwnersStatementType;
|
|
16
17
|
beneficial_owners_individual?: BeneficialOwnerIndividualResource[];
|
|
17
18
|
beneficial_owners_corporate?: BeneficialOwnerCorporateResource[];
|
|
18
|
-
beneficial_owners_government_or_public_authority?:
|
|
19
|
+
beneficial_owners_government_or_public_authority?: BeneficialOwnerGovernmentOrPublicAuthorityResource[];
|
|
20
|
+
managing_officers_individual?: ManagingOfficerIndividualResource[];
|
|
19
21
|
}
|
|
20
22
|
export interface OverseasEntityCreated {
|
|
21
23
|
id: string;
|
|
@@ -105,16 +107,51 @@ export interface BeneficialOwnerCorporateResource {
|
|
|
105
107
|
export interface BeneficialOwnerGovernmentOrPublicAuthority {
|
|
106
108
|
name?: string;
|
|
107
109
|
principal_address?: Address;
|
|
110
|
+
is_service_address_same_as_principal_address?: yesNoResponse;
|
|
108
111
|
service_address?: Address;
|
|
112
|
+
legal_form?: string;
|
|
113
|
+
law_governed?: string;
|
|
114
|
+
start_date?: InputDate;
|
|
115
|
+
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
116
|
+
non_legal_firm_members_nature_of_control_types?: NatureOfControlType[];
|
|
117
|
+
}
|
|
118
|
+
export interface BeneficialOwnerGovernmentOrPublicAuthorityResource {
|
|
119
|
+
name?: string;
|
|
120
|
+
principal_address?: Address;
|
|
109
121
|
is_service_address_same_as_principal_address?: yesNoResponse;
|
|
122
|
+
service_address?: Address;
|
|
110
123
|
legal_form?: string;
|
|
111
124
|
law_governed?: string;
|
|
112
|
-
|
|
113
|
-
register_name?: string;
|
|
114
|
-
registration_number?: string;
|
|
125
|
+
start_date?: string;
|
|
115
126
|
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
116
127
|
non_legal_firm_members_nature_of_control_types?: NatureOfControlType[];
|
|
117
128
|
}
|
|
129
|
+
export interface ManagingOfficerIndividual {
|
|
130
|
+
first_name?: string;
|
|
131
|
+
last_name?: string;
|
|
132
|
+
has_former_names?: yesNoResponse;
|
|
133
|
+
former_names?: string;
|
|
134
|
+
date_of_birth?: InputDate;
|
|
135
|
+
nationality?: string;
|
|
136
|
+
usual_residential_address?: Address;
|
|
137
|
+
service_address?: Address;
|
|
138
|
+
is_service_address_same_as_usual_residential_address?: yesNoResponse;
|
|
139
|
+
occupation?: string;
|
|
140
|
+
role_and_responsibilities?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface ManagingOfficerIndividualResource {
|
|
143
|
+
first_name?: string;
|
|
144
|
+
last_name?: string;
|
|
145
|
+
has_former_names?: yesNoResponse;
|
|
146
|
+
former_names?: string;
|
|
147
|
+
date_of_birth?: string;
|
|
148
|
+
nationality?: string;
|
|
149
|
+
usual_residential_address?: Address;
|
|
150
|
+
service_address?: Address;
|
|
151
|
+
is_service_address_same_as_usual_residential_address?: yesNoResponse;
|
|
152
|
+
occupation?: string;
|
|
153
|
+
role_and_responsibilities?: string;
|
|
154
|
+
}
|
|
118
155
|
/**
|
|
119
156
|
* Shared Data Type
|
|
120
157
|
*/
|
|
@@ -144,16 +181,16 @@ declare enum presenterRole {
|
|
|
144
181
|
other = "other"
|
|
145
182
|
}
|
|
146
183
|
export declare enum BeneficialOwnersStatementType {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
184
|
+
ALL_IDENTIFIED_ALL_DETAILS = "ALL_IDENTIFIED_ALL_DETAILS",
|
|
185
|
+
ALL_IDENTIFIED_SOME_DETAILS = "ALL_IDENTIFIED_SOME_DETAILS",
|
|
186
|
+
SOME_IDENTIFIED_ALL_DETAILS = "SOME_IDENTIFIED_ALL_DETAILS",
|
|
187
|
+
SOME_IDENTIFIED_SOME_DETAILS = "SOME_IDENTIFIED_SOME_DETAILS",
|
|
188
|
+
NONE_IDENTIFIED = "NONE_IDENTIFIED"
|
|
152
189
|
}
|
|
153
190
|
export declare enum NatureOfControlType {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
191
|
+
OVER_25_PERCENT_OF_SHARES = "OVER_25_PERCENT_OF_SHARES",
|
|
192
|
+
OVER_25_PERCENT_OF_VOTING_RIGHTS = "OVER_25_PERCENT_OF_VOTING_RIGHTS",
|
|
193
|
+
APPOINT_OR_REMOVE_MAJORITY_BOARD_DIRECTORS = "APPOINT_OR_REMOVE_MAJORITY_BOARD_DIRECTORS",
|
|
194
|
+
SIGNIFICANT_INFLUENCE_OR_CONTROL = "SIGNIFICANT_INFLUENCE_OR_CONTROL"
|
|
158
195
|
}
|
|
159
196
|
export {};
|
|
@@ -19,17 +19,17 @@ var presenterRole;
|
|
|
19
19
|
})(presenterRole || (presenterRole = {}));
|
|
20
20
|
var BeneficialOwnersStatementType;
|
|
21
21
|
(function (BeneficialOwnersStatementType) {
|
|
22
|
-
BeneficialOwnersStatementType["
|
|
23
|
-
BeneficialOwnersStatementType["
|
|
24
|
-
BeneficialOwnersStatementType["
|
|
25
|
-
BeneficialOwnersStatementType["
|
|
26
|
-
BeneficialOwnersStatementType["
|
|
22
|
+
BeneficialOwnersStatementType["ALL_IDENTIFIED_ALL_DETAILS"] = "ALL_IDENTIFIED_ALL_DETAILS";
|
|
23
|
+
BeneficialOwnersStatementType["ALL_IDENTIFIED_SOME_DETAILS"] = "ALL_IDENTIFIED_SOME_DETAILS";
|
|
24
|
+
BeneficialOwnersStatementType["SOME_IDENTIFIED_ALL_DETAILS"] = "SOME_IDENTIFIED_ALL_DETAILS";
|
|
25
|
+
BeneficialOwnersStatementType["SOME_IDENTIFIED_SOME_DETAILS"] = "SOME_IDENTIFIED_SOME_DETAILS";
|
|
26
|
+
BeneficialOwnersStatementType["NONE_IDENTIFIED"] = "NONE_IDENTIFIED";
|
|
27
27
|
})(BeneficialOwnersStatementType = exports.BeneficialOwnersStatementType || (exports.BeneficialOwnersStatementType = {}));
|
|
28
28
|
var NatureOfControlType;
|
|
29
29
|
(function (NatureOfControlType) {
|
|
30
|
-
NatureOfControlType["
|
|
31
|
-
NatureOfControlType["
|
|
32
|
-
NatureOfControlType["
|
|
33
|
-
NatureOfControlType["
|
|
30
|
+
NatureOfControlType["OVER_25_PERCENT_OF_SHARES"] = "OVER_25_PERCENT_OF_SHARES";
|
|
31
|
+
NatureOfControlType["OVER_25_PERCENT_OF_VOTING_RIGHTS"] = "OVER_25_PERCENT_OF_VOTING_RIGHTS";
|
|
32
|
+
NatureOfControlType["APPOINT_OR_REMOVE_MAJORITY_BOARD_DIRECTORS"] = "APPOINT_OR_REMOVE_MAJORITY_BOARD_DIRECTORS";
|
|
33
|
+
NatureOfControlType["SIGNIFICANT_INFLUENCE_OR_CONTROL"] = "SIGNIFICANT_INFLUENCE_OR_CONTROL";
|
|
34
34
|
})(NatureOfControlType = exports.NatureOfControlType || (exports.NatureOfControlType = {}));
|
|
35
35
|
//# sourceMappingURL=types.js.map
|
|
@@ -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;;;AAiLH,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,6CAAM,CAAA;IACN,+CAAO,CAAA;AACX,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAQD,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;AAED,IAAY,6BAMX;AAND,WAAY,6BAA6B;IACrC,0FAAyD,CAAA;IACzD,4FAA2D,CAAA;IAC3D,4FAA2D,CAAA;IAC3D,8FAA6D,CAAA;IAC7D,oEAAmC,CAAA;AACvC,CAAC,EANW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAMxC;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"}
|