@companieshouse/api-sdk-node 2.0.17 → 2.0.18
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/http/request-client.js.map +1 -1
- package/dist/mapping/mapping.d.ts +4 -2
- package/dist/mapping/mapping.js +4 -4
- package/dist/mapping/mapping.js.map +1 -1
- package/dist/services/order/basket/mapping.d.ts +8 -3
- package/dist/services/order/basket/mapping.js +7 -34
- package/dist/services/order/basket/mapping.js.map +1 -1
- package/dist/services/order/basket/service.d.ts +5 -2
- package/dist/services/order/basket/service.js +25 -37
- package/dist/services/order/basket/service.js.map +1 -1
- package/dist/services/order/basket/types.d.ts +3 -82
- package/dist/services/order/basket/types.js +0 -3
- package/dist/services/order/basket/types.js.map +1 -1
- package/dist/services/order/certificates/index.d.ts +1 -1
- package/dist/services/order/certificates/index.js +2 -2
- package/dist/services/order/certificates/index.js.map +1 -1
- package/dist/services/order/certificates/service.d.ts +1 -1
- package/dist/services/order/certificates/service.js +2 -2
- package/dist/services/order/certificates/service.js.map +1 -1
- package/dist/services/order/certificates/types.d.ts +2 -3
- package/dist/services/order/certificates/types.js +0 -3
- package/dist/services/order/certificates/types.js.map +1 -1
- package/dist/services/order/certified-copies/index.d.ts +1 -1
- package/dist/services/order/certified-copies/index.js +2 -2
- package/dist/services/order/certified-copies/index.js.map +1 -1
- package/dist/services/order/certified-copies/service.d.ts +2 -1
- package/dist/services/order/certified-copies/service.js +11 -4
- package/dist/services/order/certified-copies/service.js.map +1 -1
- package/dist/services/order/certified-copies/types.d.ts +50 -6
- package/dist/services/order/certified-copies/types.js +0 -3
- package/dist/services/order/certified-copies/types.js.map +1 -1
- package/dist/services/order/checkout/service.d.ts +1 -0
- package/dist/services/order/checkout/service.js +9 -1
- package/dist/services/order/checkout/service.js.map +1 -1
- package/dist/services/order/checkout/types.d.ts +1 -241
- package/dist/services/order/checkout/types.js +0 -3
- package/dist/services/order/checkout/types.js.map +1 -1
- package/dist/services/order/mid/service.d.ts +2 -1
- package/dist/services/order/mid/service.js +13 -8
- package/dist/services/order/mid/service.js.map +1 -1
- package/dist/services/order/mid/types.d.ts +6 -6
- package/dist/services/order/mid/types.js +0 -3
- package/dist/services/order/mid/types.js.map +1 -1
- package/dist/services/order/order/service.d.ts +1 -0
- package/dist/services/order/order/service.js +10 -2
- package/dist/services/order/order/service.js.map +1 -1
- package/dist/services/order/order/types.d.ts +3 -175
- package/dist/services/order/order/types.js +0 -3
- package/dist/services/order/order/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/services/order/certified-copies/mapping.d.ts +0 -5
- package/dist/services/order/certified-copies/mapping.js +0 -32
- package/dist/services/order/certified-copies/mapping.js.map +0 -1
- package/dist/services/order/mid/mapping.d.ts +0 -5
- package/dist/services/order/mid/mapping.js +0 -54
- package/dist/services/order/mid/mapping.js.map +0 -1
- package/dist/services/order/order/mapping.d.ts +0 -15
- package/dist/services/order/order/mapping.js +0 -172
- package/dist/services/order/order/mapping.js.map +0 -1
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CertifiedCopyItemResource is what is returned from the api.
|
|
3
|
-
*/
|
|
4
1
|
export interface CertifiedCopyItemResource {
|
|
5
2
|
company_name: string;
|
|
6
3
|
company_number: string;
|
|
4
|
+
customer_reference: string;
|
|
5
|
+
description: string;
|
|
6
|
+
description_identifier: string;
|
|
7
|
+
description_values: Record<string, string>;
|
|
8
|
+
etag: string;
|
|
9
|
+
id: string;
|
|
10
|
+
item_costs: ItemCostsResource[];
|
|
7
11
|
item_options: ItemOptionsResource;
|
|
12
|
+
kind: string;
|
|
13
|
+
links: LinksResource;
|
|
14
|
+
postage_cost: string;
|
|
15
|
+
postal_delivery: boolean;
|
|
16
|
+
quantity: number;
|
|
8
17
|
total_item_cost: string;
|
|
9
18
|
}
|
|
19
|
+
export interface ItemCostsResource {
|
|
20
|
+
calculated_cost: string;
|
|
21
|
+
discount_applied: string;
|
|
22
|
+
item_cost: string;
|
|
23
|
+
product_type: string;
|
|
24
|
+
}
|
|
25
|
+
export interface LinksResource {
|
|
26
|
+
self: string;
|
|
27
|
+
}
|
|
10
28
|
export interface ItemOptionsResource {
|
|
29
|
+
collection_location: string;
|
|
30
|
+
contact_number: string;
|
|
11
31
|
delivery_method: string;
|
|
12
32
|
delivery_timescale: string;
|
|
13
33
|
filing_history_documents: FilingHistoryDocumentsResource[];
|
|
34
|
+
forename: string;
|
|
35
|
+
surname: string;
|
|
14
36
|
}
|
|
15
37
|
export interface FilingHistoryDocumentsResource {
|
|
16
38
|
filing_history_date: string;
|
|
@@ -20,19 +42,41 @@ export interface FilingHistoryDocumentsResource {
|
|
|
20
42
|
filing_history_description_values?: Record<string, any>;
|
|
21
43
|
filing_history_cost: string;
|
|
22
44
|
}
|
|
23
|
-
/**
|
|
24
|
-
* CertifiedCopyItem is the interface used within this SDK.
|
|
25
|
-
*/
|
|
26
45
|
export interface CertifiedCopyItem {
|
|
27
46
|
companyName: string;
|
|
28
47
|
companyNumber: string;
|
|
48
|
+
customerReference: string;
|
|
49
|
+
description: string;
|
|
50
|
+
descriptionIdentifier: string;
|
|
51
|
+
descriptionValues: Record<string, string>;
|
|
52
|
+
etag: string;
|
|
53
|
+
id: string;
|
|
54
|
+
itemCosts: ItemCosts[];
|
|
29
55
|
itemOptions: ItemOptions;
|
|
56
|
+
kind: string;
|
|
57
|
+
links: Links;
|
|
58
|
+
postageCost: string;
|
|
59
|
+
postalDelivery: boolean;
|
|
60
|
+
quantity: number;
|
|
30
61
|
totalItemCost: string;
|
|
31
62
|
}
|
|
63
|
+
export interface ItemCosts {
|
|
64
|
+
calculatedCost: string;
|
|
65
|
+
discountApplied: string;
|
|
66
|
+
itemCost: string;
|
|
67
|
+
productType: string;
|
|
68
|
+
}
|
|
32
69
|
export interface ItemOptions {
|
|
70
|
+
collectionLocation: string;
|
|
71
|
+
contactNumber: string;
|
|
33
72
|
deliveryMethod: string;
|
|
34
73
|
deliveryTimescale: string;
|
|
35
74
|
filingHistoryDocuments: FilingHistoryDocuments[];
|
|
75
|
+
forename: string;
|
|
76
|
+
surname: string;
|
|
77
|
+
}
|
|
78
|
+
export interface Links {
|
|
79
|
+
self: string;
|
|
36
80
|
}
|
|
37
81
|
export interface FilingHistoryDocuments {
|
|
38
82
|
filingHistoryDate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/order/certified-copies/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/order/certified-copies/types.ts"],"names":[],"mappings":""}
|
|
@@ -3,6 +3,7 @@ import { Checkout } from "./types";
|
|
|
3
3
|
import { ApiResponse, ApiResult } from "../../resource";
|
|
4
4
|
export default class CheckoutService {
|
|
5
5
|
private readonly client;
|
|
6
|
+
private static readonly EXCLUDED_FIELDS;
|
|
6
7
|
constructor(client: IHttpClient);
|
|
7
8
|
getCheckout(checkoutId: string): Promise<ApiResult<ApiResponse<Checkout>>>;
|
|
8
9
|
}
|
|
@@ -32,11 +32,19 @@ class CheckoutService {
|
|
|
32
32
|
else {
|
|
33
33
|
return result_1.success({
|
|
34
34
|
httpStatusCode: serverResponse.status,
|
|
35
|
-
resource: mapping_1.default.camelCaseKeys(serverResponse.body)
|
|
35
|
+
resource: mapping_1.default.camelCaseKeys(serverResponse.body, CheckoutService.EXCLUDED_FIELDS)
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.default = CheckoutService;
|
|
42
|
+
CheckoutService.EXCLUDED_FIELDS = {
|
|
43
|
+
deep: true,
|
|
44
|
+
stopPaths: [
|
|
45
|
+
"items.description_values",
|
|
46
|
+
"items.item_options.filing_history_description_values",
|
|
47
|
+
"items.item_options.filing_history_documents.filing_history_description_values" // certified copies
|
|
48
|
+
]
|
|
49
|
+
};
|
|
42
50
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IAUhC,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,EAAE,eAAe,CAAC,eAAe,CAAC;iBAClG,CAAC,CAAC;aACN;QACL,CAAC;KAAA;;AA5BL,kCA6BC;AA5B2B,+BAAe,GAAG;IACtC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE;QACP,0BAA0B;QAC1B,sDAAsD;QACtD,+EAA+E,CAAC,mBAAmB;KACtG;CACJ,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Checkout is the interface used within this SDK.
|
|
3
|
-
*/
|
|
1
|
+
import { Item, ItemResource } from "../order";
|
|
4
2
|
export interface Checkout {
|
|
5
3
|
deliveryDetails?: {
|
|
6
4
|
addressLine1: string;
|
|
@@ -30,122 +28,6 @@ export interface Checkout {
|
|
|
30
28
|
reference: string;
|
|
31
29
|
totalOrderCost: string;
|
|
32
30
|
}
|
|
33
|
-
export interface Item {
|
|
34
|
-
companyName: string;
|
|
35
|
-
companyNumber: string;
|
|
36
|
-
customerReference?: string;
|
|
37
|
-
description: string;
|
|
38
|
-
descriptionIdentifier: string;
|
|
39
|
-
descriptionValues: Record<string, string>;
|
|
40
|
-
etag: string;
|
|
41
|
-
id: string;
|
|
42
|
-
itemCosts: ItemCosts[];
|
|
43
|
-
itemOptions: ItemOptions;
|
|
44
|
-
itemUri: string;
|
|
45
|
-
kind: string;
|
|
46
|
-
links: {
|
|
47
|
-
self: string;
|
|
48
|
-
};
|
|
49
|
-
postageCost: string;
|
|
50
|
-
postalDelivery: boolean;
|
|
51
|
-
quantity: number;
|
|
52
|
-
satisfiedAt?: string;
|
|
53
|
-
status: string;
|
|
54
|
-
totalItemCost: string;
|
|
55
|
-
}
|
|
56
|
-
export interface ItemCosts {
|
|
57
|
-
calculatedCost: string;
|
|
58
|
-
discountApplied: string;
|
|
59
|
-
itemCost: string;
|
|
60
|
-
productType: string;
|
|
61
|
-
}
|
|
62
|
-
export interface CertificateItemOptions {
|
|
63
|
-
certificateType: string;
|
|
64
|
-
companyType: string;
|
|
65
|
-
deliveryTimescale: string;
|
|
66
|
-
includeEmailCopy?: boolean;
|
|
67
|
-
designatedMemberDetails?: {
|
|
68
|
-
includeAddress?: boolean;
|
|
69
|
-
includeAppointmentDate?: boolean;
|
|
70
|
-
includeBasicInformation?: boolean;
|
|
71
|
-
includeCountryOfResidence?: boolean;
|
|
72
|
-
includeDobType?: string;
|
|
73
|
-
};
|
|
74
|
-
deliveryMethod: string;
|
|
75
|
-
generalPartnerDetails?: {
|
|
76
|
-
includeBasicInformation?: boolean;
|
|
77
|
-
};
|
|
78
|
-
includeGeneralNatureOfBusinessInformation?: boolean;
|
|
79
|
-
includeGoodStandingInformation?: boolean;
|
|
80
|
-
includeCompanyObjectsInformation?: boolean;
|
|
81
|
-
limitedPartnerDetails?: {
|
|
82
|
-
includeBasicInformation?: boolean;
|
|
83
|
-
};
|
|
84
|
-
memberDetails?: {
|
|
85
|
-
includeAddress?: boolean;
|
|
86
|
-
includeAppointmentDate?: boolean;
|
|
87
|
-
includeBasicInformation?: boolean;
|
|
88
|
-
includeCountryOfResidence?: boolean;
|
|
89
|
-
includeDobType?: string;
|
|
90
|
-
};
|
|
91
|
-
principalPlaceOfBusinessDetails?: {
|
|
92
|
-
includeAddressRecordsType?: string;
|
|
93
|
-
};
|
|
94
|
-
registeredOfficeAddressDetails?: {
|
|
95
|
-
includeAddressRecordsType?: string;
|
|
96
|
-
};
|
|
97
|
-
secretaryDetails?: {
|
|
98
|
-
includeBasicInformation?: boolean;
|
|
99
|
-
includeAddress?: boolean;
|
|
100
|
-
includeAppointmentDate?: boolean;
|
|
101
|
-
includeCountryOfResidence?: boolean;
|
|
102
|
-
includeNationality?: boolean;
|
|
103
|
-
includeOccupation?: boolean;
|
|
104
|
-
includeDobType?: string;
|
|
105
|
-
};
|
|
106
|
-
directorDetails?: {
|
|
107
|
-
includeBasicInformation?: boolean;
|
|
108
|
-
includeAddress?: boolean;
|
|
109
|
-
includeAppointmentDate?: boolean;
|
|
110
|
-
includeCountryOfResidence?: boolean;
|
|
111
|
-
includeNationality?: boolean;
|
|
112
|
-
includeOccupation?: boolean;
|
|
113
|
-
includeDobType?: string;
|
|
114
|
-
};
|
|
115
|
-
forename: string;
|
|
116
|
-
surname: string;
|
|
117
|
-
liquidatorsDetails?: {
|
|
118
|
-
includeBasicInformation?: boolean;
|
|
119
|
-
};
|
|
120
|
-
companyStatus: string;
|
|
121
|
-
administratorsDetails?: {
|
|
122
|
-
includeBasicInformation?: boolean;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
export interface CertifiedCopyItemOptions {
|
|
126
|
-
deliveryTimescale: string;
|
|
127
|
-
deliveryMethod: string;
|
|
128
|
-
filingHistoryDocuments: FilingHistoryItemOptions[];
|
|
129
|
-
}
|
|
130
|
-
export interface FilingHistoryItemOptions {
|
|
131
|
-
filingHistoryDate: string;
|
|
132
|
-
filingHistoryDescription: string;
|
|
133
|
-
filingHistoryId: string;
|
|
134
|
-
filingHistoryType: string;
|
|
135
|
-
filingHistoryDescriptionValues: Record<string, any>;
|
|
136
|
-
filingHistoryCost: string;
|
|
137
|
-
}
|
|
138
|
-
export interface MissingImageDeliveryItemOptions {
|
|
139
|
-
filingHistoryDate: string;
|
|
140
|
-
filingHistoryDescription: string;
|
|
141
|
-
filingHistoryId: string;
|
|
142
|
-
filingHistoryType: string;
|
|
143
|
-
filingHistoryDescriptionValues: Record<string, any>;
|
|
144
|
-
}
|
|
145
|
-
export declare type ItemOptions = CertificateItemOptions | CertifiedCopyItemOptions | MissingImageDeliveryItemOptions;
|
|
146
|
-
/**
|
|
147
|
-
* CheckoutResource is what is returned from the api.
|
|
148
|
-
*/
|
|
149
31
|
export interface CheckoutResource {
|
|
150
32
|
delivery_details?: {
|
|
151
33
|
address_line_1: string;
|
|
@@ -175,125 +57,3 @@ export interface CheckoutResource {
|
|
|
175
57
|
reference: string;
|
|
176
58
|
total_order_cost: string;
|
|
177
59
|
}
|
|
178
|
-
export interface ItemResource {
|
|
179
|
-
company_name: string;
|
|
180
|
-
company_number: string;
|
|
181
|
-
customer_reference?: string;
|
|
182
|
-
description: string;
|
|
183
|
-
description_identifier: string;
|
|
184
|
-
description_values: Record<string, string>;
|
|
185
|
-
etag: string;
|
|
186
|
-
id: string;
|
|
187
|
-
item_costs: ItemCostsResource[];
|
|
188
|
-
item_options: ItemOptionsResource;
|
|
189
|
-
item_uri: string;
|
|
190
|
-
kind: string;
|
|
191
|
-
links: {
|
|
192
|
-
self: string;
|
|
193
|
-
};
|
|
194
|
-
postage_cost: string;
|
|
195
|
-
postal_delivery: boolean;
|
|
196
|
-
quantity: number;
|
|
197
|
-
satisfied_at?: string;
|
|
198
|
-
status: string;
|
|
199
|
-
total_item_cost: string;
|
|
200
|
-
}
|
|
201
|
-
export interface ItemCostsResource {
|
|
202
|
-
calculated_cost: string;
|
|
203
|
-
discount_applied: string;
|
|
204
|
-
item_cost: string;
|
|
205
|
-
product_type: string;
|
|
206
|
-
}
|
|
207
|
-
export interface CertificateItemOptionsResource {
|
|
208
|
-
certificate_type: string;
|
|
209
|
-
company_type: string;
|
|
210
|
-
delivery_timescale: string;
|
|
211
|
-
include_email_copy?: boolean;
|
|
212
|
-
delivery_method: string;
|
|
213
|
-
designated_member_details: {
|
|
214
|
-
include_address?: boolean;
|
|
215
|
-
include_appointment_date?: boolean;
|
|
216
|
-
include_basic_information?: boolean;
|
|
217
|
-
include_country_of_residence?: boolean;
|
|
218
|
-
include_dob_type?: string;
|
|
219
|
-
};
|
|
220
|
-
include_general_nature_of_business_information?: boolean;
|
|
221
|
-
include_good_standing_information?: boolean;
|
|
222
|
-
include_company_objects_information?: boolean;
|
|
223
|
-
general_partner_details: {
|
|
224
|
-
include_basic_information?: boolean;
|
|
225
|
-
};
|
|
226
|
-
limited_partner_details: {
|
|
227
|
-
include_basic_information?: boolean;
|
|
228
|
-
};
|
|
229
|
-
member_details: {
|
|
230
|
-
include_address?: boolean;
|
|
231
|
-
include_appointment_date?: boolean;
|
|
232
|
-
include_basic_information?: boolean;
|
|
233
|
-
include_country_of_residence?: boolean;
|
|
234
|
-
include_dob_type?: string;
|
|
235
|
-
};
|
|
236
|
-
principal_place_of_business_details: {
|
|
237
|
-
include_address_records_type?: string;
|
|
238
|
-
};
|
|
239
|
-
registered_office_address_details: {
|
|
240
|
-
include_address_records_type?: string;
|
|
241
|
-
};
|
|
242
|
-
secretary_details: {
|
|
243
|
-
include_basic_information?: boolean;
|
|
244
|
-
include_address?: boolean;
|
|
245
|
-
include_appointment_date?: boolean;
|
|
246
|
-
include_country_of_residence?: boolean;
|
|
247
|
-
include_nationality?: boolean;
|
|
248
|
-
include_occupation?: boolean;
|
|
249
|
-
include_dob_type?: string;
|
|
250
|
-
};
|
|
251
|
-
director_details: {
|
|
252
|
-
include_basic_information?: boolean;
|
|
253
|
-
include_address?: boolean;
|
|
254
|
-
include_appointment_date?: boolean;
|
|
255
|
-
include_country_of_residence?: boolean;
|
|
256
|
-
include_nationality?: boolean;
|
|
257
|
-
include_occupation?: boolean;
|
|
258
|
-
include_dob_type?: string;
|
|
259
|
-
};
|
|
260
|
-
forename: string;
|
|
261
|
-
surname: string;
|
|
262
|
-
liquidators_details: {
|
|
263
|
-
include_basic_information?: boolean;
|
|
264
|
-
};
|
|
265
|
-
company_status: string;
|
|
266
|
-
administrators_details: {
|
|
267
|
-
include_basic_information?: boolean;
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
export interface CertifiedCopyItemOptionsResource {
|
|
271
|
-
delivery_timescale: string;
|
|
272
|
-
delivery_method: string;
|
|
273
|
-
filing_history_documents: FilingHistoryItemOptionsResource[];
|
|
274
|
-
}
|
|
275
|
-
export interface FilingHistoryItemOptionsResource {
|
|
276
|
-
filing_history_date: string;
|
|
277
|
-
filing_history_description: string;
|
|
278
|
-
filing_history_id: string;
|
|
279
|
-
filing_history_type: string;
|
|
280
|
-
filing_history_description_values: Record<string, any>;
|
|
281
|
-
filing_history_cost: string;
|
|
282
|
-
}
|
|
283
|
-
export interface MissingImageDeliveryItemOptionsResource {
|
|
284
|
-
filing_history_date: string;
|
|
285
|
-
filing_history_description: string;
|
|
286
|
-
filing_history_id: string;
|
|
287
|
-
filing_history_type: string;
|
|
288
|
-
filing_history_description_values: Record<string, any>;
|
|
289
|
-
}
|
|
290
|
-
export declare type ItemOptionsResource = CertificateItemOptionsResource | CertifiedCopyItemOptionsResource | MissingImageDeliveryItemOptionsResource;
|
|
291
|
-
export interface DirectorOrSecretaryDetails {
|
|
292
|
-
includeBasicInformation?: boolean;
|
|
293
|
-
includeAddress?: boolean;
|
|
294
|
-
includeAppointmentDate?: boolean;
|
|
295
|
-
includeCountryOfResidence?: boolean;
|
|
296
|
-
includeNationality?: boolean;
|
|
297
|
-
includeOccupation?: boolean;
|
|
298
|
-
includeDobType?: string;
|
|
299
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/order/checkout/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/order/checkout/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IHttpClient } from "../../../http";
|
|
2
2
|
import { MidItem, MidItemPostRequest } from "./types";
|
|
3
3
|
import Resource from "../../resource";
|
|
4
|
-
export default class {
|
|
4
|
+
export default class MissingImageDeliveryService {
|
|
5
5
|
private readonly client;
|
|
6
|
+
private static readonly EXCLUDED_FIELDS;
|
|
6
7
|
constructor(client: IHttpClient);
|
|
7
8
|
getMid(missingImageDeliveryId: string): Promise<Resource<MidItem>>;
|
|
8
9
|
postMid(midItemRequest: MidItemPostRequest): Promise<Resource<MidItem>>;
|
|
@@ -12,8 +12,8 @@ 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 mapping_1 = __importDefault(require("
|
|
16
|
-
class
|
|
15
|
+
const mapping_1 = __importDefault(require("../../../mapping/mapping"));
|
|
16
|
+
class MissingImageDeliveryService {
|
|
17
17
|
constructor(client) {
|
|
18
18
|
this.client = client;
|
|
19
19
|
}
|
|
@@ -26,16 +26,15 @@ class default_1 {
|
|
|
26
26
|
if (resp.error) {
|
|
27
27
|
return resource;
|
|
28
28
|
}
|
|
29
|
-
;
|
|
30
29
|
const body = resp.body;
|
|
31
|
-
resource.resource = mapping_1.default.
|
|
30
|
+
resource.resource = mapping_1.default.camelCaseKeys(body, MissingImageDeliveryService.EXCLUDED_FIELDS);
|
|
32
31
|
return resource;
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
34
|
;
|
|
36
35
|
postMid(midItemRequest) {
|
|
37
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const midItemRequestResource = mapping_1.default.
|
|
37
|
+
const midItemRequestResource = mapping_1.default.snakeCaseKeys(midItemRequest);
|
|
39
38
|
const resp = yield this.client.httpPost("/orderable/missing-image-deliveries", midItemRequestResource);
|
|
40
39
|
const resource = {
|
|
41
40
|
httpStatusCode: resp.status
|
|
@@ -43,14 +42,20 @@ class default_1 {
|
|
|
43
42
|
if (resp.error) {
|
|
44
43
|
return resource;
|
|
45
44
|
}
|
|
46
|
-
;
|
|
47
45
|
const body = resp.body;
|
|
48
|
-
resource.resource = mapping_1.default.
|
|
46
|
+
resource.resource = mapping_1.default.camelCaseKeys(body, MissingImageDeliveryService.EXCLUDED_FIELDS);
|
|
49
47
|
return resource;
|
|
50
48
|
});
|
|
51
49
|
}
|
|
52
50
|
;
|
|
53
51
|
}
|
|
54
|
-
exports.default =
|
|
52
|
+
exports.default = MissingImageDeliveryService;
|
|
53
|
+
MissingImageDeliveryService.EXCLUDED_FIELDS = {
|
|
54
|
+
deep: true,
|
|
55
|
+
stopPaths: [
|
|
56
|
+
"description_values",
|
|
57
|
+
"item_options.filing_history_description_values"
|
|
58
|
+
]
|
|
59
|
+
};
|
|
55
60
|
;
|
|
56
61
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/mid/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/mid/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,uEAA+C;AAE/C,MAAqB,2BAA2B;IAS5C,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,MAAM,CAAE,sBAA8B;;YAC/C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,uCAAuC,sBAAsB,EAAE,CAAC,CAAC;YAExG,MAAM,QAAQ,GAAsB;gBAChC,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,QAAQ,CAAC;aACnB;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAuB,CAAC;YAE1C,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAC,IAAI,EAAE,2BAA2B,CAAC,eAAe,CAAC,CAAC;YAC7F,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;IAAA,CAAC;IAEW,OAAO,CAAE,cAAkC;;YACpD,MAAM,sBAAsB,GAAG,iBAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;YACrE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,qCAAqC,EAAE,sBAAsB,CAAC,CAAC;YAEvG,MAAM,QAAQ,GAAsB;gBAChC,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,QAAQ,CAAC;aACnB;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAuB,CAAC;YAE1C,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAC,IAAI,EAAE,2BAA2B,CAAC,eAAe,CAAC,CAAC;YAC7F,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;IAAA,CAAC;;AA5CN,8CA6CC;AA5C2B,2CAAe,GAAG;IACtC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE;QACP,oBAAoB;QACpB,gDAAgD;KACnD;CACJ,CAAC;AAsCL,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MidItemResource is what is returned from the api.
|
|
3
|
-
*/
|
|
4
1
|
export interface MidItemResource {
|
|
5
2
|
company_name: string;
|
|
6
3
|
company_number: string;
|
|
@@ -31,13 +28,13 @@ export interface ItemOptionsResource {
|
|
|
31
28
|
filing_history_description_values: Record<string, string>;
|
|
32
29
|
filing_history_id: string;
|
|
33
30
|
filing_history_type: string;
|
|
31
|
+
filing_history_category: string;
|
|
32
|
+
filing_history_cost: string;
|
|
33
|
+
filing_history_barcode: string;
|
|
34
34
|
}
|
|
35
35
|
export interface LinksResource {
|
|
36
36
|
self: string;
|
|
37
37
|
}
|
|
38
|
-
/**
|
|
39
|
-
* MidItem is the interface used within this SDK.
|
|
40
|
-
*/
|
|
41
38
|
export interface MidItem {
|
|
42
39
|
companyName: string;
|
|
43
40
|
companyNumber: string;
|
|
@@ -68,6 +65,9 @@ export interface ItemOptions {
|
|
|
68
65
|
filingHistoryDescriptionValues: Record<string, any>;
|
|
69
66
|
filingHistoryId: string;
|
|
70
67
|
filingHistoryType: string;
|
|
68
|
+
filingHistoryCategory: string;
|
|
69
|
+
filingHistoryCost: string;
|
|
70
|
+
filingHistoryBarcode: string;
|
|
71
71
|
}
|
|
72
72
|
export interface Links {
|
|
73
73
|
self: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/order/mid/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/order/mid/types.ts"],"names":[],"mappings":""}
|
|
@@ -3,6 +3,7 @@ import { Order } from "./types";
|
|
|
3
3
|
import { ApiResult } from "../../../services/resource";
|
|
4
4
|
export default class OrderService {
|
|
5
5
|
private readonly client;
|
|
6
|
+
private static readonly EXCLUDED_FIELDS;
|
|
6
7
|
constructor(client: IHttpClient);
|
|
7
8
|
getOrder(orderId: string): Promise<ApiResult<Order>>;
|
|
8
9
|
}
|
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const result_1 = require("../../../services/result");
|
|
16
|
-
const mapping_1 = __importDefault(require("
|
|
16
|
+
const mapping_1 = __importDefault(require("../../../mapping/mapping"));
|
|
17
17
|
class OrderService {
|
|
18
18
|
constructor(client) {
|
|
19
19
|
this.client = client;
|
|
@@ -29,10 +29,18 @@ class OrderService {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
const body = resp.body;
|
|
32
|
-
const result = mapping_1.default.
|
|
32
|
+
const result = mapping_1.default.camelCaseKeys(body, OrderService.EXCLUDED_FIELDS);
|
|
33
33
|
return result_1.success(result);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
exports.default = OrderService;
|
|
38
|
+
OrderService.EXCLUDED_FIELDS = {
|
|
39
|
+
deep: true,
|
|
40
|
+
stopPaths: [
|
|
41
|
+
"items.description_values",
|
|
42
|
+
"items.item_options.filing_history_description_values",
|
|
43
|
+
"items.item_options.filing_history_documents.filing_history_description_values" // certified copies
|
|
44
|
+
]
|
|
45
|
+
};
|
|
38
46
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/order/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,qDAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/services/order/order/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,qDAA4D;AAC5D,uEAA+C;AAE/C,MAAqB,YAAY;IAU7B,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEzC,QAAQ,CAAE,OAAe;;;YAClC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC;YAE7D,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,gBAAO,CAAC;oBACX,cAAc,EAAE,IAAI,CAAC,MAAM;oBAC3B,MAAM,EAAE,OAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,MAAM,KAAI,IAAI,CAAC,KAAK;iBAC5C,CAAC,CAAC;aACN;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAqB,CAAC;YAExC,MAAM,MAAM,GAAU,iBAAO,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;YAChF,OAAO,gBAAO,CAAC,MAAM,CAAC,CAAC;;KAC1B;;AA1BL,+BA2BC;AA1B2B,4BAAe,GAAG;IACtC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE;QACP,0BAA0B;QAC1B,sDAAsD;QACtD,+EAA+E,CAAC,mBAAmB;KACtG;CACJ,CAAC"}
|