@companieshouse/api-sdk-node 1.0.109 → 2.0.2
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/order/checkout/service.d.ts +2 -2
- package/dist/services/order/checkout/service.js +16 -10
- package/dist/services/order/checkout/service.js.map +1 -1
- package/dist/services/order/checkout/types.d.ts +10 -10
- package/dist/services/overseas-entities/types.d.ts +3 -2
- package/dist/services/overseas-entities/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/services/order/checkout/mapping.d.ts +0 -15
- package/dist/services/order/checkout/mapping.js +0 -174
- package/dist/services/order/checkout/mapping.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IHttpClient } from "../../../http";
|
|
2
2
|
import { Checkout } from "./types";
|
|
3
|
-
import
|
|
3
|
+
import { ApiResponse, ApiResult } from "../../resource";
|
|
4
4
|
export default class CheckoutService {
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: IHttpClient);
|
|
7
|
-
getCheckout(checkoutId: string): Promise<
|
|
7
|
+
getCheckout(checkoutId: string): Promise<ApiResult<ApiResponse<Checkout>>>;
|
|
8
8
|
}
|
|
@@ -12,23 +12,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const
|
|
15
|
+
const result_1 = require("../../result");
|
|
16
|
+
const mapping_1 = __importDefault(require("../../../mapping/mapping"));
|
|
16
17
|
class CheckoutService {
|
|
17
18
|
constructor(client) {
|
|
18
19
|
this.client = client;
|
|
19
20
|
}
|
|
20
21
|
getCheckout(checkoutId) {
|
|
21
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const serverResponse = yield this.client.httpGet("/checkouts/" + checkoutId);
|
|
24
|
+
if (serverResponse.error) {
|
|
25
|
+
return result_1.failure({
|
|
26
|
+
httpStatusCode: serverResponse.status,
|
|
27
|
+
errors: [{
|
|
28
|
+
error: serverResponse.error
|
|
29
|
+
}]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return result_1.success({
|
|
34
|
+
httpStatusCode: serverResponse.status,
|
|
35
|
+
resource: mapping_1.default.camelCaseKeys(serverResponse.body)
|
|
36
|
+
});
|
|
28
37
|
}
|
|
29
|
-
const body = resp.body;
|
|
30
|
-
resource.resource = mapping_1.default.mapCheckoutResourceToCheckout(body);
|
|
31
|
-
return resource;
|
|
32
38
|
});
|
|
33
39
|
}
|
|
34
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/checkout/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/checkout/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,yCAAgD;AAChD,uEAA+C;AAE/C,MAAqB,eAAe;IAChC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,WAAW,CAAE,UAAkB;;YACxC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,UAAU,CAAC,CAAC;YAE7E,IAAI,cAAc,CAAC,KAAK,EAAE;gBACtB,OAAO,gBAAO,CAAC;oBACX,cAAc,EAAE,cAAc,CAAC,MAAM;oBACrC,MAAM,EAAE,CAAC;4BACL,KAAK,EAAE,cAAc,CAAC,KAAK;yBAC9B,CAAC;iBACL,CAAC,CAAC;aACN;iBAAM;gBACH,OAAO,gBAAO,CAAC;oBACX,cAAc,EAAE,cAAc,CAAC,MAAM;oBACrC,QAAQ,EAAE,iBAAO,CAAC,aAAa,CAAW,cAAc,CAAC,IAAI,CAAC;iBACjE,CAAC,CAAC;aACN;QACL,CAAC;KAAA;CACJ;AApBD,kCAoBC"}
|
|
@@ -63,7 +63,7 @@ export interface CertificateItemOptions {
|
|
|
63
63
|
certificateType: string;
|
|
64
64
|
companyType: string;
|
|
65
65
|
deliveryTimescale: string;
|
|
66
|
-
designatedMemberDetails
|
|
66
|
+
designatedMemberDetails?: {
|
|
67
67
|
includeAddress?: boolean;
|
|
68
68
|
includeAppointmentDate?: boolean;
|
|
69
69
|
includeBasicInformation?: boolean;
|
|
@@ -71,29 +71,29 @@ export interface CertificateItemOptions {
|
|
|
71
71
|
includeDobType?: string;
|
|
72
72
|
};
|
|
73
73
|
deliveryMethod: string;
|
|
74
|
-
generalPartnerDetails
|
|
74
|
+
generalPartnerDetails?: {
|
|
75
75
|
includeBasicInformation?: boolean;
|
|
76
76
|
};
|
|
77
77
|
includeGeneralNatureOfBusinessInformation?: boolean;
|
|
78
78
|
includeGoodStandingInformation?: boolean;
|
|
79
79
|
includeCompanyObjectsInformation?: boolean;
|
|
80
|
-
limitedPartnerDetails
|
|
80
|
+
limitedPartnerDetails?: {
|
|
81
81
|
includeBasicInformation?: boolean;
|
|
82
82
|
};
|
|
83
|
-
memberDetails
|
|
83
|
+
memberDetails?: {
|
|
84
84
|
includeAddress?: boolean;
|
|
85
85
|
includeAppointmentDate?: boolean;
|
|
86
86
|
includeBasicInformation?: boolean;
|
|
87
87
|
includeCountryOfResidence?: boolean;
|
|
88
88
|
includeDobType?: string;
|
|
89
89
|
};
|
|
90
|
-
principalPlaceOfBusinessDetails
|
|
90
|
+
principalPlaceOfBusinessDetails?: {
|
|
91
91
|
includeAddressRecordsType?: string;
|
|
92
92
|
};
|
|
93
|
-
registeredOfficeAddressDetails
|
|
93
|
+
registeredOfficeAddressDetails?: {
|
|
94
94
|
includeAddressRecordsType?: string;
|
|
95
95
|
};
|
|
96
|
-
secretaryDetails
|
|
96
|
+
secretaryDetails?: {
|
|
97
97
|
includeBasicInformation?: boolean;
|
|
98
98
|
includeAddress?: boolean;
|
|
99
99
|
includeAppointmentDate?: boolean;
|
|
@@ -102,7 +102,7 @@ export interface CertificateItemOptions {
|
|
|
102
102
|
includeOccupation?: boolean;
|
|
103
103
|
includeDobType?: string;
|
|
104
104
|
};
|
|
105
|
-
directorDetails
|
|
105
|
+
directorDetails?: {
|
|
106
106
|
includeBasicInformation?: boolean;
|
|
107
107
|
includeAddress?: boolean;
|
|
108
108
|
includeAppointmentDate?: boolean;
|
|
@@ -113,11 +113,11 @@ export interface CertificateItemOptions {
|
|
|
113
113
|
};
|
|
114
114
|
forename: string;
|
|
115
115
|
surname: string;
|
|
116
|
-
liquidatorsDetails
|
|
116
|
+
liquidatorsDetails?: {
|
|
117
117
|
includeBasicInformation?: boolean;
|
|
118
118
|
};
|
|
119
119
|
companyStatus: string;
|
|
120
|
-
administratorsDetails
|
|
120
|
+
administratorsDetails?: {
|
|
121
121
|
includeBasicInformation?: boolean;
|
|
122
122
|
};
|
|
123
123
|
}
|
|
@@ -43,6 +43,7 @@ export interface Entity {
|
|
|
43
43
|
law_governed?: string;
|
|
44
44
|
public_register_name?: string;
|
|
45
45
|
registration_number?: string;
|
|
46
|
+
is_on_register_in_country_formed_in?: yesNoResponse;
|
|
46
47
|
}
|
|
47
48
|
export interface BeneficialOwnerIndividual {
|
|
48
49
|
first_name?: string;
|
|
@@ -80,7 +81,7 @@ export interface BeneficialOwnerCorporate {
|
|
|
80
81
|
legal_form?: string;
|
|
81
82
|
law_governed?: string;
|
|
82
83
|
is_on_register_in_country_formed_in?: yesNoResponse;
|
|
83
|
-
|
|
84
|
+
public_register_name?: string;
|
|
84
85
|
registration_number?: string;
|
|
85
86
|
start_date?: InputDate;
|
|
86
87
|
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
@@ -96,7 +97,7 @@ export interface BeneficialOwnerCorporateResource {
|
|
|
96
97
|
legal_form?: string;
|
|
97
98
|
law_governed?: string;
|
|
98
99
|
is_on_register_in_country_formed_in?: yesNoResponse;
|
|
99
|
-
|
|
100
|
+
public_register_name?: string;
|
|
100
101
|
registration_number?: string;
|
|
101
102
|
start_date?: string;
|
|
102
103
|
beneficial_owner_nature_of_control_types?: NatureOfControlType[];
|
|
@@ -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;;;AAkLH,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"}
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Checkout, CheckoutResource } from "./types";
|
|
2
|
-
import { MemberDetails } from "../certificates";
|
|
3
|
-
export default class CheckoutMapping {
|
|
4
|
-
static mapCheckoutResourceToCheckout(checkoutResource: CheckoutResource): Checkout;
|
|
5
|
-
private static mapItemResourceToItem;
|
|
6
|
-
private static removeEmptyObjects;
|
|
7
|
-
private static mapItemOptionsResourceToItemOptions;
|
|
8
|
-
static mapMemberDetails: (member_details: {
|
|
9
|
-
include_address?: boolean;
|
|
10
|
-
include_appointment_date?: boolean;
|
|
11
|
-
include_basic_information?: boolean;
|
|
12
|
-
include_country_of_residence?: boolean;
|
|
13
|
-
include_dob_type?: string;
|
|
14
|
-
}) => MemberDetails;
|
|
15
|
-
}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class CheckoutMapping {
|
|
4
|
-
static mapCheckoutResourceToCheckout(checkoutResource) {
|
|
5
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6
|
-
const checkout = {
|
|
7
|
-
deliveryDetails: {
|
|
8
|
-
addressLine1: (_a = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _a === void 0 ? void 0 : _a.address_line_1,
|
|
9
|
-
addressLine2: (_b = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _b === void 0 ? void 0 : _b.address_line_2,
|
|
10
|
-
country: (_c = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _c === void 0 ? void 0 : _c.country,
|
|
11
|
-
forename: (_d = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _d === void 0 ? void 0 : _d.forename,
|
|
12
|
-
locality: (_e = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _e === void 0 ? void 0 : _e.locality,
|
|
13
|
-
poBox: (_f = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _f === void 0 ? void 0 : _f.po_box,
|
|
14
|
-
postalCode: (_g = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _g === void 0 ? void 0 : _g.postal_code,
|
|
15
|
-
region: (_h = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _h === void 0 ? void 0 : _h.region,
|
|
16
|
-
surname: (_j = checkoutResource === null || checkoutResource === void 0 ? void 0 : checkoutResource.delivery_details) === null || _j === void 0 ? void 0 : _j.surname
|
|
17
|
-
},
|
|
18
|
-
items: checkoutResource.items.map((item) => {
|
|
19
|
-
return this.mapItemResourceToItem(item);
|
|
20
|
-
}),
|
|
21
|
-
etag: checkoutResource.etag,
|
|
22
|
-
kind: checkoutResource.kind,
|
|
23
|
-
links: {
|
|
24
|
-
self: checkoutResource.links.self,
|
|
25
|
-
payment: checkoutResource.links.payment
|
|
26
|
-
},
|
|
27
|
-
paidAt: checkoutResource.paid_at,
|
|
28
|
-
checkedOutBy: {
|
|
29
|
-
email: checkoutResource.checked_out_by.email,
|
|
30
|
-
id: checkoutResource.checked_out_by.id
|
|
31
|
-
},
|
|
32
|
-
status: checkoutResource.status,
|
|
33
|
-
paymentReference: checkoutResource.payment_reference,
|
|
34
|
-
reference: checkoutResource.reference,
|
|
35
|
-
totalOrderCost: checkoutResource.total_order_cost
|
|
36
|
-
};
|
|
37
|
-
return checkout;
|
|
38
|
-
}
|
|
39
|
-
static mapItemResourceToItem(itemResource) {
|
|
40
|
-
return {
|
|
41
|
-
companyName: itemResource.company_name,
|
|
42
|
-
companyNumber: itemResource.company_number,
|
|
43
|
-
customerReference: itemResource.customer_reference,
|
|
44
|
-
description: itemResource.description,
|
|
45
|
-
descriptionIdentifier: itemResource.description_identifier,
|
|
46
|
-
descriptionValues: itemResource.description_values,
|
|
47
|
-
etag: itemResource.etag,
|
|
48
|
-
id: itemResource.id,
|
|
49
|
-
itemCosts: itemResource.item_costs.map((i) => ({
|
|
50
|
-
calculatedCost: i === null || i === void 0 ? void 0 : i.calculated_cost,
|
|
51
|
-
discountApplied: i === null || i === void 0 ? void 0 : i.discount_applied,
|
|
52
|
-
itemCost: i === null || i === void 0 ? void 0 : i.item_cost,
|
|
53
|
-
productType: i === null || i === void 0 ? void 0 : i.product_type
|
|
54
|
-
})),
|
|
55
|
-
itemOptions: this.mapItemOptionsResourceToItemOptions(itemResource.item_options, itemResource.kind),
|
|
56
|
-
itemUri: itemResource.item_uri,
|
|
57
|
-
kind: itemResource.kind,
|
|
58
|
-
links: {
|
|
59
|
-
self: itemResource.links.self
|
|
60
|
-
},
|
|
61
|
-
postageCost: itemResource.postage_cost,
|
|
62
|
-
postalDelivery: itemResource.postal_delivery,
|
|
63
|
-
quantity: itemResource.quantity,
|
|
64
|
-
satisfiedAt: itemResource.satisfied_at,
|
|
65
|
-
status: itemResource.status,
|
|
66
|
-
totalItemCost: itemResource.total_item_cost
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
static removeEmptyObjects(input) {
|
|
70
|
-
return Object.values(input).some((value) => value !== undefined) ? input : undefined;
|
|
71
|
-
}
|
|
72
|
-
static mapItemOptionsResourceToItemOptions(itemResource, kind) {
|
|
73
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
74
|
-
if (kind === "item#certificate") {
|
|
75
|
-
itemResource = itemResource;
|
|
76
|
-
const directorDetails = this.removeEmptyObjects({
|
|
77
|
-
includeBasicInformation: (_a = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _a === void 0 ? void 0 : _a.include_basic_information,
|
|
78
|
-
includeAddress: (_b = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _b === void 0 ? void 0 : _b.include_address,
|
|
79
|
-
includeAppointmentDate: (_c = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _c === void 0 ? void 0 : _c.include_appointment_date,
|
|
80
|
-
includeCountryOfResidence: (_d = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _d === void 0 ? void 0 : _d.include_country_of_residence,
|
|
81
|
-
includeNationality: (_e = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _e === void 0 ? void 0 : _e.include_nationality,
|
|
82
|
-
includeOccupation: (_f = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _f === void 0 ? void 0 : _f.include_occupation,
|
|
83
|
-
includeDobType: (_g = itemResource === null || itemResource === void 0 ? void 0 : itemResource.director_details) === null || _g === void 0 ? void 0 : _g.include_dob_type
|
|
84
|
-
});
|
|
85
|
-
const secretaryDetails = this.removeEmptyObjects({
|
|
86
|
-
includeBasicInformation: (_h = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _h === void 0 ? void 0 : _h.include_basic_information,
|
|
87
|
-
includeAddress: (_j = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _j === void 0 ? void 0 : _j.include_address,
|
|
88
|
-
includeAppointmentDate: (_k = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _k === void 0 ? void 0 : _k.include_appointment_date,
|
|
89
|
-
includeCountryOfResidence: (_l = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _l === void 0 ? void 0 : _l.include_country_of_residence,
|
|
90
|
-
includeNationality: (_m = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _m === void 0 ? void 0 : _m.include_nationality,
|
|
91
|
-
includeOccupation: (_o = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _o === void 0 ? void 0 : _o.include_occupation,
|
|
92
|
-
includeDobType: (_p = itemResource === null || itemResource === void 0 ? void 0 : itemResource.secretary_details) === null || _p === void 0 ? void 0 : _p.include_dob_type
|
|
93
|
-
});
|
|
94
|
-
const memberDetails = CheckoutMapping.mapMemberDetails(itemResource === null || itemResource === void 0 ? void 0 : itemResource.member_details);
|
|
95
|
-
const designatedMemberDetails = CheckoutMapping.mapMemberDetails(itemResource === null || itemResource === void 0 ? void 0 : itemResource.designated_member_details);
|
|
96
|
-
const registeredOfficeAddressDetails = this.removeEmptyObjects({
|
|
97
|
-
includeAddressRecordsType: (_q = itemResource === null || itemResource === void 0 ? void 0 : itemResource.registered_office_address_details) === null || _q === void 0 ? void 0 : _q.include_address_records_type
|
|
98
|
-
});
|
|
99
|
-
const principalPlaceOfBusinessDetails = this.removeEmptyObjects({
|
|
100
|
-
includeAddressRecordsType: (_r = itemResource === null || itemResource === void 0 ? void 0 : itemResource.principal_place_of_business_details) === null || _r === void 0 ? void 0 : _r.include_address_records_type
|
|
101
|
-
});
|
|
102
|
-
const generalPartnerDetails = this.removeEmptyObjects({
|
|
103
|
-
includeBasicInformation: (_s = itemResource === null || itemResource === void 0 ? void 0 : itemResource.general_partner_details) === null || _s === void 0 ? void 0 : _s.include_basic_information
|
|
104
|
-
});
|
|
105
|
-
const limitedPartnerDetails = this.removeEmptyObjects({
|
|
106
|
-
includeBasicInformation: (_t = itemResource === null || itemResource === void 0 ? void 0 : itemResource.limited_partner_details) === null || _t === void 0 ? void 0 : _t.include_basic_information
|
|
107
|
-
});
|
|
108
|
-
const liquidatorsDetails = this.removeEmptyObjects({
|
|
109
|
-
includeBasicInformation: (_u = itemResource === null || itemResource === void 0 ? void 0 : itemResource.liquidators_details) === null || _u === void 0 ? void 0 : _u.include_basic_information
|
|
110
|
-
});
|
|
111
|
-
const administratorsDetails = this.removeEmptyObjects({
|
|
112
|
-
includeBasicInformation: (_v = itemResource === null || itemResource === void 0 ? void 0 : itemResource.administrators_details) === null || _v === void 0 ? void 0 : _v.include_basic_information
|
|
113
|
-
});
|
|
114
|
-
return {
|
|
115
|
-
certificateType: itemResource.certificate_type,
|
|
116
|
-
companyType: itemResource.company_type,
|
|
117
|
-
deliveryTimescale: itemResource.delivery_timescale,
|
|
118
|
-
deliveryMethod: itemResource.delivery_method,
|
|
119
|
-
designatedMemberDetails: designatedMemberDetails,
|
|
120
|
-
includeGeneralNatureOfBusinessInformation: itemResource.include_general_nature_of_business_information,
|
|
121
|
-
includeGoodStandingInformation: itemResource.include_good_standing_information,
|
|
122
|
-
includeCompanyObjectsInformation: itemResource.include_company_objects_information,
|
|
123
|
-
generalPartnerDetails: generalPartnerDetails,
|
|
124
|
-
limitedPartnerDetails: limitedPartnerDetails,
|
|
125
|
-
memberDetails: memberDetails,
|
|
126
|
-
registeredOfficeAddressDetails: registeredOfficeAddressDetails,
|
|
127
|
-
principalPlaceOfBusinessDetails: principalPlaceOfBusinessDetails,
|
|
128
|
-
secretaryDetails: secretaryDetails,
|
|
129
|
-
directorDetails: directorDetails,
|
|
130
|
-
forename: itemResource.forename,
|
|
131
|
-
surname: itemResource.surname,
|
|
132
|
-
liquidatorsDetails: liquidatorsDetails,
|
|
133
|
-
companyStatus: itemResource.company_status,
|
|
134
|
-
administratorsDetails: administratorsDetails
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
else if (kind === "item#certified-copy") {
|
|
138
|
-
itemResource = itemResource;
|
|
139
|
-
return {
|
|
140
|
-
deliveryTimescale: itemResource.delivery_timescale,
|
|
141
|
-
deliveryMethod: itemResource.delivery_method,
|
|
142
|
-
filingHistoryDocuments: itemResource.filing_history_documents.map(f => ({
|
|
143
|
-
filingHistoryDate: f.filing_history_date,
|
|
144
|
-
filingHistoryDescription: f.filing_history_description,
|
|
145
|
-
filingHistoryId: f.filing_history_id,
|
|
146
|
-
filingHistoryType: f.filing_history_type,
|
|
147
|
-
filingHistoryDescriptionValues: f.filing_history_description_values,
|
|
148
|
-
filingHistoryCost: f.filing_history_cost
|
|
149
|
-
}))
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
itemResource = itemResource;
|
|
154
|
-
return {
|
|
155
|
-
filingHistoryDate: itemResource.filing_history_date,
|
|
156
|
-
filingHistoryDescription: itemResource.filing_history_description,
|
|
157
|
-
filingHistoryId: itemResource.filing_history_id,
|
|
158
|
-
filingHistoryType: itemResource.filing_history_type,
|
|
159
|
-
filingHistoryDescriptionValues: itemResource.filing_history_description_values
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
exports.default = CheckoutMapping;
|
|
165
|
-
CheckoutMapping.mapMemberDetails = (member_details) => {
|
|
166
|
-
return CheckoutMapping.removeEmptyObjects({
|
|
167
|
-
includeAddress: member_details === null || member_details === void 0 ? void 0 : member_details.include_address,
|
|
168
|
-
includeAppointmentDate: member_details === null || member_details === void 0 ? void 0 : member_details.include_appointment_date,
|
|
169
|
-
includeBasicInformation: member_details === null || member_details === void 0 ? void 0 : member_details.include_basic_information,
|
|
170
|
-
includeCountryOfResidence: member_details === null || member_details === void 0 ? void 0 : member_details.include_country_of_residence,
|
|
171
|
-
includeDobType: member_details === null || member_details === void 0 ? void 0 : member_details.include_dob_type
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
//# sourceMappingURL=mapping.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../../../src/services/order/checkout/mapping.ts"],"names":[],"mappings":";;AAOA,MAAqB,eAAe;IACzB,MAAM,CAAC,6BAA6B,CAAE,gBAAkC;;QAC3E,MAAM,QAAQ,GAAa;YACvB,eAAe,EAAE;gBACb,YAAY,QAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,0CAAE,cAAc;gBAChE,YAAY,QAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,0CAAE,cAAc;gBAChE,OAAO,QAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,0CAAE,OAAO;gBACpD,QAAQ,QAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,0CAAE,QAAQ;gBACtD,QAAQ,QAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,0CAAE,QAAQ;gBACtD,KAAK,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