@companieshouse/api-sdk-node 1.0.108 → 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.
|
@@ -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: mapBeneficialOwnersGovernment(body.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;
|
|
@@ -65,6 +66,20 @@ const mapBeneficialOwnersGovernment = (boGovernments = []) => {
|
|
|
65
66
|
});
|
|
66
67
|
return boGovernmentResources;
|
|
67
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
|
+
};
|
|
68
83
|
const convertDateToIsoDateString = (day, month, year) => {
|
|
69
84
|
return `${year}-${zeroPadNumber(month)}-${zeroPadNumber(day)}`;
|
|
70
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,CAAC,IAAI,CAAC,4BAA4B,CAAC;QAC9F,2BAA2B,EAAE,4BAA4B,CAAC,IAAI,CAAC,2BAA2B,CAAC;QAC3F,gDAAgD,EAAE,6BAA6B,CAAC,IAAI,CAAC,gDAAgD,CAAC;QACtI,4BAA4B,EAAE,6BAA6B,CAAC,IAAI,CAAC,4BAA4B,CAAC;KACjG,CAAC;AACN,CAAC,CAAC;AAVW,QAAA,iBAAiB,qBAU5B;AAEF;;;;;GAKG;AACH,MAAM,6BAA6B,GAAG,CAAC,gBAA6C,EAAE,EAAuC,EAAE;IAC3H,MAAM,qBAAqB,GAAwC,EAAE,CAAC;IACtE,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QACjC,MAAM,EAAE,aAAa,EAAE,UAAU,KAAc,YAAY,EAArB,IAAI,UAAK,YAAY,EAArD,+BAAsC,CAAe,CAAC;QAC5D,qBAAqB,CAAC,IAAI,iCACnB,IAAI,KACP,aAAa,EAAE,0BAA0B,CAAC,aAAa,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,EAAE,aAAa,C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M,qBAAqB,GAAwC,EAAE,CAAC;IACtE,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QACjC,MAAM,EAAE,aAAa,KAAc,YAAY,EAArB,IAAI,UAAK,YAAY,EAAzC,iBAA0B,CAAe,CAAC;QAChD,qBAAqB,CAAC,IAAI,iCACnB,IAAI,KACP,aAAa,EAAE,0BAA0B,CAAC,aAAa,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,IACvG,CAAA;IACN,CAAC,CAAC,CAAC;IACH,OAAO,qBAAqB,CAAC;AACjC,CAAC,CAAA;AAED,MAAM,0BAA0B,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY,EAAU,EAAE;IACpF,OAAO,GAAG,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;AACnE,CAAC,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;
|
|
@@ -16,6 +17,7 @@ export interface OverseasEntityResource {
|
|
|
16
17
|
beneficial_owners_individual?: BeneficialOwnerIndividualResource[];
|
|
17
18
|
beneficial_owners_corporate?: BeneficialOwnerCorporateResource[];
|
|
18
19
|
beneficial_owners_government_or_public_authority?: BeneficialOwnerGovernmentOrPublicAuthorityResource[];
|
|
20
|
+
managing_officers_individual?: ManagingOfficerIndividualResource[];
|
|
19
21
|
}
|
|
20
22
|
export interface OverseasEntityCreated {
|
|
21
23
|
id: string;
|
|
@@ -124,6 +126,32 @@ export interface BeneficialOwnerGovernmentOrPublicAuthorityResource {
|
|
|
124
126
|
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
125
127
|
non_legal_firm_members_nature_of_control_types?: NatureOfControlType[];
|
|
126
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
|
+
}
|
|
127
155
|
/**
|
|
128
156
|
* Shared Data Type
|
|
129
157
|
*/
|
|
@@ -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"}
|