@companieshouse/api-sdk-node 1.0.107 → 1.0.108
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,7 @@ 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
23
|
};
|
|
24
24
|
};
|
|
25
25
|
exports.mapOverseasEntity = mapOverseasEntity;
|
|
@@ -51,6 +51,20 @@ const mapBeneficialOwnersCorporate = (boCorporates = []) => {
|
|
|
51
51
|
});
|
|
52
52
|
return boCorporateResources;
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Convert the BeneficialOwnerGovernmentOrPublicAuthority array data into the Resource format that the API expects
|
|
56
|
+
* (just converting dates currently)
|
|
57
|
+
* @param boGovernments Array of BeneficialOwnerGovernmentOrPublicAuthority objects
|
|
58
|
+
* @returns Array of BeneficialOwnerGovernmentOrPublicAuthorityResource
|
|
59
|
+
*/
|
|
60
|
+
const mapBeneficialOwnersGovernment = (boGovernments = []) => {
|
|
61
|
+
const boGovernmentResources = [];
|
|
62
|
+
boGovernments.forEach(boGovernment => {
|
|
63
|
+
const { start_date } = boGovernment, rest = __rest(boGovernment, ["start_date"]);
|
|
64
|
+
boGovernmentResources.push(Object.assign(Object.assign({}, rest), { start_date: convertDateToIsoDateString(start_date.day, start_date.month, start_date.year) }));
|
|
65
|
+
});
|
|
66
|
+
return boGovernmentResources;
|
|
67
|
+
};
|
|
54
68
|
const convertDateToIsoDateString = (day, month, year) => {
|
|
55
69
|
return `${year}-${zeroPadNumber(month)}-${zeroPadNumber(day)}`;
|
|
56
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/mapping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEO,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,
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/mapping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEO,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;KACzI,CAAC;AACN,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B;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,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,EAAE,UAAU,CAAC,IAAI,CAAC,IAC3F,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"}
|
|
@@ -15,7 +15,7 @@ export interface OverseasEntityResource {
|
|
|
15
15
|
beneficial_owners_statement?: BeneficialOwnersStatementType;
|
|
16
16
|
beneficial_owners_individual?: BeneficialOwnerIndividualResource[];
|
|
17
17
|
beneficial_owners_corporate?: BeneficialOwnerCorporateResource[];
|
|
18
|
-
beneficial_owners_government_or_public_authority?:
|
|
18
|
+
beneficial_owners_government_or_public_authority?: BeneficialOwnerGovernmentOrPublicAuthorityResource[];
|
|
19
19
|
}
|
|
20
20
|
export interface OverseasEntityCreated {
|
|
21
21
|
id: string;
|
|
@@ -105,13 +105,22 @@ export interface BeneficialOwnerCorporateResource {
|
|
|
105
105
|
export interface BeneficialOwnerGovernmentOrPublicAuthority {
|
|
106
106
|
name?: string;
|
|
107
107
|
principal_address?: Address;
|
|
108
|
+
is_service_address_same_as_principal_address?: yesNoResponse;
|
|
108
109
|
service_address?: Address;
|
|
110
|
+
legal_form?: string;
|
|
111
|
+
law_governed?: string;
|
|
112
|
+
start_date?: InputDate;
|
|
113
|
+
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
114
|
+
non_legal_firm_members_nature_of_control_types?: NatureOfControlType[];
|
|
115
|
+
}
|
|
116
|
+
export interface BeneficialOwnerGovernmentOrPublicAuthorityResource {
|
|
117
|
+
name?: string;
|
|
118
|
+
principal_address?: Address;
|
|
109
119
|
is_service_address_same_as_principal_address?: yesNoResponse;
|
|
120
|
+
service_address?: Address;
|
|
110
121
|
legal_form?: string;
|
|
111
122
|
law_governed?: string;
|
|
112
|
-
|
|
113
|
-
register_name?: string;
|
|
114
|
-
registration_number?: string;
|
|
123
|
+
start_date?: string;
|
|
115
124
|
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
116
125
|
non_legal_firm_members_nature_of_control_types?: NatureOfControlType[];
|
|
117
126
|
}
|
|
@@ -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;;;AAmJH,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"}
|