@companieshouse/api-sdk-node 2.0.13 → 2.0.16

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.
@@ -23,7 +23,8 @@ const mapOverseasEntity = (body) => {
23
23
  beneficial_owners_corporate: mapBeneficialOwnersCorporate(body.beneficial_owners_corporate),
24
24
  beneficial_owners_government_or_public_authority: mapBeneficialOwnersGovernment(body.beneficial_owners_government_or_public_authority),
25
25
  managing_officers_individual: mapManagingOfficersIndividual(body.managing_officers_individual),
26
- managing_officers_corporate: body.managing_officers_corporate
26
+ managing_officers_corporate: body.managing_officers_corporate,
27
+ trusts: mapTrusts(body.trusts)
27
28
  };
28
29
  };
29
30
  exports.mapOverseasEntity = mapOverseasEntity;
@@ -105,12 +106,61 @@ const mapDueDiligence = (dueDiligence) => {
105
106
  */
106
107
  const mapOverseasEntityDueDiligence = (oeDueDiligence) => {
107
108
  if (oeDueDiligence && Object.keys(oeDueDiligence).length) {
108
- const identityDate = oeDueDiligence.identity_date || {};
109
- const identity_date = convertOptionalDateToIsoDateString(identityDate.day, identityDate.month, identityDate.year);
110
- return Object.assign(Object.assign({}, oeDueDiligence), { identity_date });
109
+ const { identity_date } = oeDueDiligence, rest = __rest(oeDueDiligence, ["identity_date"]);
110
+ const identityDateResource = convertOptionalDateToIsoDateString(identity_date === null || identity_date === void 0 ? void 0 : identity_date.day, identity_date === null || identity_date === void 0 ? void 0 : identity_date.month, identity_date === null || identity_date === void 0 ? void 0 : identity_date.year);
111
+ return (identityDateResource)
112
+ ? Object.assign(Object.assign({}, rest), { identity_date: identityDateResource }) : Object.assign({}, rest);
111
113
  }
112
114
  return {};
113
115
  };
116
+ /**
117
+ * Convert the Trust Data into the Resource format which the API expects
118
+ * (just converting dates currently)
119
+ * @param trusts Array of Trust objects
120
+ * @returns Array of TrustResource
121
+ */
122
+ const mapTrusts = (trusts = []) => {
123
+ return trusts.map(trust => {
124
+ const { creation_date_day, creation_date_month, creation_date_year, INDIVIDUALS, HISTORICAL_BO, CORPORATES, unable_to_obtain_all_trust_info } = trust, rest = __rest(trust, ["creation_date_day", "creation_date_month", "creation_date_year", "INDIVIDUALS", "HISTORICAL_BO", "CORPORATES", "unable_to_obtain_all_trust_info"]);
125
+ return Object.assign(Object.assign({}, rest), { creation_date: convertOptionalDateToIsoDateString(creation_date_day, creation_date_month, creation_date_year), INDIVIDUAL: mapTrustIndividuals(INDIVIDUALS), HISTORICAL_BO: mapTrustHistoricalBeneficialOwners(HISTORICAL_BO), CORPORATE: mapTrustCorporates(CORPORATES), unable_to_obtain_all_trust_info: (unable_to_obtain_all_trust_info === "Yes") });
126
+ });
127
+ };
128
+ /**
129
+ * Convert the Trust Individuals Data into the Resource format which the API expects
130
+ * (just converting dates currently)
131
+ * @param trustIndividuals Array of TrustIndividuals objects
132
+ * @returns Array of TrustIndividualResource
133
+ */
134
+ const mapTrustIndividuals = (trustIndividuals = []) => {
135
+ return trustIndividuals.map(trustIndividual => {
136
+ const { dob_day, dob_month, dob_year, date_became_interested_person_day, date_became_interested_person_month, date_became_interested_person_year } = trustIndividual, rest = __rest(trustIndividual, ["dob_day", "dob_month", "dob_year", "date_became_interested_person_day", "date_became_interested_person_month", "date_became_interested_person_year"]);
137
+ return Object.assign(Object.assign({}, rest), { date_of_birth: convertOptionalDateToIsoDateString(dob_day, dob_month, dob_year), date_became_interested_person: convertOptionalDateToIsoDateString(date_became_interested_person_day, date_became_interested_person_month, date_became_interested_person_year) });
138
+ });
139
+ };
140
+ /**
141
+ * Convert the Trust Historical BO Data into the Resource format which the API expects
142
+ * (just converting dates currently)
143
+ * @param trustHistoricalBos Array of TrustHistoricalBeneficialOwner objects
144
+ * @returns Array of TrustHistoricalBeneficialOwnerResource
145
+ */
146
+ const mapTrustHistoricalBeneficialOwners = (trustHistoricalBos = []) => {
147
+ return trustHistoricalBos.map(trustHistoricalBo => {
148
+ const { notified_date_day, notified_date_month, notified_date_year, ceased_date_day, ceased_date_month, ceased_date_year } = trustHistoricalBo, rest = __rest(trustHistoricalBo, ["notified_date_day", "notified_date_month", "notified_date_year", "ceased_date_day", "ceased_date_month", "ceased_date_year"]);
149
+ return Object.assign({ notified_date: convertOptionalDateToIsoDateString(notified_date_day, notified_date_month, notified_date_year), ceased_date: convertOptionalDateToIsoDateString(ceased_date_day, ceased_date_month, ceased_date_year) }, rest);
150
+ });
151
+ };
152
+ /**
153
+ * Convert the Trust Corporates Data into the Resource format which the API expects
154
+ * (just converting dates currently)
155
+ * @param trustCorporates Array of TrustCorporate objects
156
+ * @returns Array of TrustCorporateResource
157
+ */
158
+ const mapTrustCorporates = (trustCorporates = []) => {
159
+ return trustCorporates.map(trustCorporate => {
160
+ const { date_became_interested_person_day, date_became_interested_person_month, date_became_interested_person_year } = trustCorporate, rest = __rest(trustCorporate, ["date_became_interested_person_day", "date_became_interested_person_month", "date_became_interested_person_year"]);
161
+ return Object.assign(Object.assign({}, rest), { date_became_interested_person: convertOptionalDateToIsoDateString(date_became_interested_person_day, date_became_interested_person_month, date_became_interested_person_year) });
162
+ });
163
+ };
114
164
  const convertOptionalDateToIsoDateString = (day = "", month = "", year = "") => {
115
165
  return (day && month && year) ? convertDateToIsoDateString(day, month, year) : "";
116
166
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/mapping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBO,MAAM,iBAAiB,GAAG,CAAC,IAAoB,EAA0B,EAAE;IAC9E,OAAO;QACH,SAAS,oBAAO,IAAI,CAAC,SAAS,CAAE;QAChC,MAAM,oBAAO,IAAI,CAAC,MAAM,CAAE;QAC1B,aAAa,EAAE,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC;QAClD,6BAA6B,EAAE,6BAA6B,CAAC,IAAI,CAAC,6BAA6B,CAAC;QAChG,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;QAC7D,4BAA4B,EAAE,6BAA6B,CAAC,IAAI,CAAC,4BA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OwnerGovernmentOrPublicAuthority[];
13
13
  managing_officers_individual?: ManagingOfficerIndividual[];
14
14
  managing_officers_corporate?: ManagingOfficerCorporate[];
15
+ trusts?: Trust[];
15
16
  }
16
17
  export interface OverseasEntityResource {
17
18
  presenter?: Presenter;
@@ -24,6 +25,7 @@ export interface OverseasEntityResource {
24
25
  beneficial_owners_government_or_public_authority?: BeneficialOwnerGovernmentOrPublicAuthorityResource[];
25
26
  managing_officers_individual?: ManagingOfficerIndividualResource[];
26
27
  managing_officers_corporate?: ManagingOfficerCorporateResource[];
28
+ trusts?: TrustResource[];
27
29
  }
28
30
  export interface OverseasEntityCreated {
29
31
  id: string;
@@ -210,6 +212,160 @@ export interface ManagingOfficerCorporate {
210
212
  }
211
213
  export interface ManagingOfficerCorporateResource extends ManagingOfficerCorporate {
212
214
  }
215
+ export interface Trust {
216
+ trust_id: string;
217
+ trust_name: string;
218
+ creation_date_day: string;
219
+ creation_date_month: string;
220
+ creation_date_year: string;
221
+ unable_to_obtain_all_trust_info: string;
222
+ INDIVIDUALS?: TrustIndividual[];
223
+ HISTORICAL_BO?: TrustHistoricalBeneficialOwner[];
224
+ CORPORATES?: TrustCorporate[];
225
+ }
226
+ export interface TrustResource {
227
+ trust_id: string;
228
+ trust_name: string;
229
+ creation_date: string;
230
+ unable_to_obtain_all_trust_info: boolean;
231
+ INDIVIDUAL?: TrustIndividualResource[];
232
+ HISTORICAL_BO?: TrustHistoricalBeneficialOwnerResource[];
233
+ CORPORATE?: TrustCorporateResource[];
234
+ }
235
+ export interface TrustIndividual {
236
+ type?: string;
237
+ forename?: string;
238
+ other_forenames?: string;
239
+ surname?: string;
240
+ dob_day?: string;
241
+ dob_month?: string;
242
+ dob_year?: string;
243
+ nationality?: string;
244
+ sa_address_line1?: string;
245
+ sa_address_line2?: string;
246
+ sa_address_care_of?: string;
247
+ sa_address_country?: string;
248
+ sa_address_locality?: string;
249
+ sa_address_po_box?: string;
250
+ sa_address_postal_code?: string;
251
+ sa_address_premises?: string;
252
+ sa_address_region?: string;
253
+ ura_address_line1?: string;
254
+ ura_address_line2?: string;
255
+ ura_address_care_of?: string;
256
+ ura_address_country?: string;
257
+ ura_address_locality?: string;
258
+ ura_address_po_box?: string;
259
+ ura_address_postal_code?: string;
260
+ ura_address_premises?: string;
261
+ ura_address_region?: string;
262
+ date_became_interested_person_day?: string;
263
+ date_became_interested_person_month?: string;
264
+ date_became_interested_person_year?: string;
265
+ }
266
+ export interface TrustIndividualResource {
267
+ type?: string;
268
+ forename?: string;
269
+ other_forenames?: string;
270
+ surname?: string;
271
+ date_of_birth?: string;
272
+ nationality?: string;
273
+ sa_address_line1?: string;
274
+ sa_address_line2?: string;
275
+ sa_address_care_of?: string;
276
+ sa_address_country?: string;
277
+ sa_address_locality?: string;
278
+ sa_address_po_box?: string;
279
+ sa_address_postal_code?: string;
280
+ sa_address_premises?: string;
281
+ sa_address_region?: string;
282
+ ura_address_line1?: string;
283
+ ura_address_line2?: string;
284
+ ura_address_care_of?: string;
285
+ ura_address_country?: string;
286
+ ura_address_locality?: string;
287
+ ura_address_po_box?: string;
288
+ ura_address_postal_code?: string;
289
+ ura_address_premises?: string;
290
+ ura_address_region?: string;
291
+ date_became_interested_person?: string;
292
+ }
293
+ export interface TrustHistoricalBeneficialOwner {
294
+ forename?: string;
295
+ other_forenames?: string;
296
+ surname?: string;
297
+ notified_date_day?: string;
298
+ notified_date_month?: string;
299
+ notified_date_year?: string;
300
+ ceased_date_day?: string;
301
+ ceased_date_month?: string;
302
+ ceased_date_year?: string;
303
+ }
304
+ export interface TrustHistoricalBeneficialOwnerResource {
305
+ forename?: string;
306
+ other_forenames?: string;
307
+ surname?: string;
308
+ notified_date?: string;
309
+ ceased_date?: string;
310
+ }
311
+ export interface TrustCorporate {
312
+ type?: string;
313
+ name?: string;
314
+ date_became_interested_person_day?: string;
315
+ date_became_interested_person_month?: string;
316
+ date_became_interested_person_year?: string;
317
+ ro_address_line1?: string;
318
+ ro_address_line2?: string;
319
+ ro_address_care_of?: string;
320
+ ro_address_country?: string;
321
+ ro_address_locality?: string;
322
+ ro_address_po_box?: string;
323
+ ro_address_postal_code?: string;
324
+ ro_address_premises?: string;
325
+ ro_address_region?: string;
326
+ sa_address_line1?: string;
327
+ sa_address_line2?: string;
328
+ sa_address_care_of?: string;
329
+ sa_address_country?: string;
330
+ sa_address_locality?: string;
331
+ sa_address_po_box?: string;
332
+ sa_address_postal_code?: string;
333
+ sa_address_premises?: string;
334
+ sa_address_region?: string;
335
+ identification_country_registration?: string;
336
+ identification_legal_authority?: string;
337
+ identification_legal_form?: string;
338
+ identification_place_registered?: string;
339
+ identification_registration_number?: string;
340
+ }
341
+ export interface TrustCorporateResource {
342
+ type?: string;
343
+ name?: string;
344
+ date_became_interested_person?: string;
345
+ ro_address_line1?: string;
346
+ ro_address_line2?: string;
347
+ ro_address_care_of?: string;
348
+ ro_address_country?: string;
349
+ ro_address_locality?: string;
350
+ ro_address_po_box?: string;
351
+ ro_address_postal_code?: string;
352
+ ro_address_premises?: string;
353
+ ro_address_region?: string;
354
+ sa_address_line1?: string;
355
+ sa_address_line2?: string;
356
+ sa_address_care_of?: string;
357
+ sa_address_country?: string;
358
+ sa_address_locality?: string;
359
+ sa_address_po_box?: string;
360
+ sa_address_postal_code?: string;
361
+ sa_address_premises?: string;
362
+ sa_address_region?: string;
363
+ identification_country_registration?: string;
364
+ identification_legal_authority?: string;
365
+ identification_legal_form?: string;
366
+ identification_place_registered?: string;
367
+ identification_registration_number?: string;
368
+ }
213
369
  /**
214
370
  * Shared Data Type
215
371
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgPH,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,6CAAM,CAAA;IACN,+CAAO,CAAA;AACX,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAQD,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,0FAAyD,CAAA;IACzD,4FAA2D,CAAA;IAC3D,oEAAmC,CAAA;AACvC,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;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"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/overseas-entities/types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoZH,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,6CAAM,CAAA;IACN,+CAAO,CAAA;AACX,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAQD,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,0FAAyD,CAAA;IACzD,4FAA2D,CAAA;IAC3D,oEAAmC,CAAA;AACvC,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companieshouse/api-sdk-node",
3
- "version": "2.0.13",
3
+ "version": "2.0.16",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [