@companieshouse/api-sdk-node 2.0.276 → 2.0.277
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/company-profile/service.d.ts +2 -2
- package/dist/services/company-profile/service.js +2 -2
- package/dist/services/company-profile/service.js.map +1 -1
- package/dist/services/company-psc/service.d.ts +2 -2
- package/dist/services/company-psc/service.js +2 -2
- package/dist/services/company-psc/service.js.map +1 -1
- package/dist/services/psc/service.d.ts +2 -2
- package/dist/services/psc/service.js +2 -2
- package/dist/services/psc/service.js.map +1 -1
- package/dist/services/psc-verification-link/service.d.ts +6 -6
- package/dist/services/psc-verification-link/service.js +10 -10
- package/dist/services/psc-verification-link/service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHttpClient } from "../../http";
|
|
1
|
+
import { Headers, IHttpClient } from "../../http";
|
|
2
2
|
import { CompanyProfile } from "./types";
|
|
3
3
|
import Resource from "../resource";
|
|
4
4
|
/**
|
|
@@ -12,5 +12,5 @@ export default class CompanyProfileService {
|
|
|
12
12
|
*
|
|
13
13
|
* @param number the company number to look up
|
|
14
14
|
*/
|
|
15
|
-
getCompanyProfile(number: string): Promise<Resource<CompanyProfile>>;
|
|
15
|
+
getCompanyProfile(number: string, headers?: Headers): Promise<Resource<CompanyProfile>>;
|
|
16
16
|
}
|
|
@@ -21,9 +21,9 @@ class CompanyProfileService {
|
|
|
21
21
|
*
|
|
22
22
|
* @param number the company number to look up
|
|
23
23
|
*/
|
|
24
|
-
getCompanyProfile(number) {
|
|
24
|
+
getCompanyProfile(number, headers) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const resp = yield this.client.httpGet(`/company/${number}
|
|
26
|
+
const resp = yield this.client.httpGet(`/company/${number}`, headers);
|
|
27
27
|
const resource = {
|
|
28
28
|
httpStatusCode: resp.status
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/company-profile/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAOA;;GAEG;AACH,MAAqB,qBAAqB;IACtC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;MAIE;IACW,iBAAiB,CAAE,MAAc;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/company-profile/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAOA;;GAEG;AACH,MAAqB,qBAAqB;IACtC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;MAIE;IACW,iBAAiB,CAAE,MAAc,EAAE,OAAiB;;YAC7D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;YAEtE,MAAM,QAAQ,GAA6B;gBACvC,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,QAAQ,CAAC;aACnB;YAED,8CAA8C;YAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,IAA8B,CAAC;YAEjD,MAAM,GAAG,GAAG,IAAI,CAAC,yBAA4D,CAAC;YAC9E,MAAM,cAAc,GAAG,IAAI,CAAC,eAAyC,CAAC;YAEtE,MAAM,GAAG,GAAG,IAAI,CAAC,QAA4B,CAAC;YAE9C,MAAM,QAAQ,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,aAAqC,CAAC;YAE5D,MAAM,qBAAqB,GAAG,IAAI,CAAC,sBAAuD,CAAC;YAE3F,MAAM,6BAA6B,GAAG,IAAI,CAAC,uBAAwD,CAAC;YAEpG,MAAM,2BAA2B,GAAG,6BAA6B,aAA7B,6BAA6B,uBAA7B,6BAA6B,CAAE,oBAAoB,CAAC;YACxF,MAAM,m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ompanyPersonsWithSignificantControl } from "./types";
|
|
3
3
|
import Resource from "../resource";
|
|
4
4
|
/**
|
|
@@ -12,5 +12,5 @@ export default class CompanyPscService {
|
|
|
12
12
|
*
|
|
13
13
|
* @param number the company number to look up
|
|
14
14
|
*/
|
|
15
|
-
getCompanyPsc(number: string, startIndex?: number, itemsPerPage?: number): Promise<Resource<CompanyPersonsWithSignificantControl>>;
|
|
15
|
+
getCompanyPsc(number: string, startIndex?: number, itemsPerPage?: number, headers?: Headers): Promise<Resource<CompanyPersonsWithSignificantControl>>;
|
|
16
16
|
}
|
|
@@ -25,9 +25,9 @@ class CompanyPscService {
|
|
|
25
25
|
*
|
|
26
26
|
* @param number the company number to look up
|
|
27
27
|
*/
|
|
28
|
-
getCompanyPsc(number, startIndex = 0, itemsPerPage = 25) {
|
|
28
|
+
getCompanyPsc(number, startIndex = 0, itemsPerPage = 25, headers) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
const resp = yield this.client.httpGet(`/company/${number}/persons-with-significant-control?start_index=${startIndex}&items_per_page=${itemsPerPage}
|
|
30
|
+
const resp = yield this.client.httpGet(`/company/${number}/persons-with-significant-control?start_index=${startIndex}&items_per_page=${itemsPerPage}`, headers);
|
|
31
31
|
const resource = {
|
|
32
32
|
httpStatusCode: resp.status
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/company-psc/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,oEAA4C;AAE5C;;GAEG;AACH,MAAqB,iBAAiB;IAClC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;KAIC;IACY,aAAa,CAAE,MAAc,EAAE,aAAqB,CAAC,EAAE,eAAuB,EAAE;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/company-psc/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,oEAA4C;AAE5C;;GAEG;AACH,MAAqB,iBAAiB;IAClC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;KAIC;IACY,aAAa,CAAE,MAAc,EAAE,aAAqB,CAAC,EAAE,eAAuB,EAAE,EAAE,OAAiB;;YAC5G,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,MAAM,iDAAiD,UAAU,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;YAEhK,MAAM,QAAQ,GAAmD;gBAC7D,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,QAAQ,CAAC;aACnB;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAoD,CAAC;YAEvE,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAuC,IAAI,CAAC,CAAC;YAEtF,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AAzBD,oCAyBC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHttpClient } from "../../http";
|
|
1
|
+
import { Headers, IHttpClient } from "../../http";
|
|
2
2
|
import Resource, { ApiErrorResponse } from "../resource";
|
|
3
3
|
import { PersonWithSignificantControl } from "./types";
|
|
4
4
|
/**
|
|
@@ -13,5 +13,5 @@ export default class PscService {
|
|
|
13
13
|
* @param companyNumber the Company Number to look up
|
|
14
14
|
* @param pscNotificationId the PSC Notification ID to retrieve
|
|
15
15
|
*/
|
|
16
|
-
getPscIndividual(companyNumber: string, pscNotificationId: string): Promise<Resource<PersonWithSignificantControl> | ApiErrorResponse>;
|
|
16
|
+
getPscIndividual(companyNumber: string, pscNotificationId: string, headers?: Headers): Promise<Resource<PersonWithSignificantControl> | ApiErrorResponse>;
|
|
17
17
|
}
|
|
@@ -26,10 +26,10 @@ class PscService {
|
|
|
26
26
|
* @param companyNumber the Company Number to look up
|
|
27
27
|
* @param pscNotificationId the PSC Notification ID to retrieve
|
|
28
28
|
*/
|
|
29
|
-
getPscIndividual(companyNumber, pscNotificationId) {
|
|
29
|
+
getPscIndividual(companyNumber, pscNotificationId, headers) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const resourceUri = `/company/${companyNumber}/persons-with-significant-control/individual/${pscNotificationId}/verification-state`;
|
|
32
|
-
const response = yield this.client.httpGet(resourceUri);
|
|
32
|
+
const response = yield this.client.httpGet(resourceUri, headers);
|
|
33
33
|
if (response.error) {
|
|
34
34
|
return {
|
|
35
35
|
httpStatusCode: response.status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,oEAA4C;AAI5C;;GAEG;AACH,MAAqB,UAAU;IAC3B,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;KAKC;IACY,gBAAgB,CAAE,aAAqB,EAAE,iBAAyB;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,oEAA4C;AAI5C;;GAEG;AACH,MAAqB,UAAU;IAC3B,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;KAKC;IACY,gBAAgB,CAAE,aAAqB,EAAE,iBAAyB,EAAE,OAAiB;;YAC9F,MAAM,WAAW,GAAG,YAAY,aAAa,gDAAgD,iBAAiB,qBAAqB,CAAC;YACpI,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YAEjE,IAAI,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO;oBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;oBAC/B,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;iBAC3B,CAAA;aACJ;YAED,MAAM,gBAAgB,GAA2C;gBAC7D,cAAc,EAAE,QAAQ,CAAC,MAAM;aAClC,CAAC;YAEF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAA4C,CAAC;YACnE,gBAAgB,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAC;YAEtF,OAAO,gBAAgB,CAAC;QAC5B,CAAC;KAAA;CACJ;AA7BD,6BA6BC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PlannedMaintenance, PscVerification, PscVerificationData } from "./types";
|
|
2
|
-
import { IHttpClient } from "../../http";
|
|
2
|
+
import { Headers, IHttpClient } from "../../http";
|
|
3
3
|
import Resource, { ApiErrorResponse, ApiResponse } from "../resource";
|
|
4
4
|
/**
|
|
5
5
|
* Service class for handling PSC (Person with Significant Control) verification-related operations.
|
|
@@ -18,7 +18,7 @@ export default class PscVerificationService {
|
|
|
18
18
|
* - A `Resource<PscVerification>` object containing the created PSC verification details.
|
|
19
19
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
20
20
|
*/
|
|
21
|
-
postPscVerification(transactionId: string, pscVerification: PscVerificationData): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
21
|
+
postPscVerification(transactionId: string, pscVerification: PscVerificationData, headers?: Headers): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Retrieves a specific PSC verification by its ID for a given transaction.
|
|
24
24
|
*
|
|
@@ -28,7 +28,7 @@ export default class PscVerificationService {
|
|
|
28
28
|
* - A `Resource<PscVerification>` object containing the PSC verification details.
|
|
29
29
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
30
30
|
*/
|
|
31
|
-
getPscVerification(transactionId: string, pscVerificationId: string): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
31
|
+
getPscVerification(transactionId: string, pscVerificationId: string, headers?: Headers): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
32
32
|
/**
|
|
33
33
|
* Updates a PSC verification using a PATCH request for a given transaction and filing ID.
|
|
34
34
|
*
|
|
@@ -39,7 +39,7 @@ export default class PscVerificationService {
|
|
|
39
39
|
* - A `Resource<PscVerification>` object containing the updated PSC verification details.
|
|
40
40
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
41
41
|
*/
|
|
42
|
-
patchPscVerification(transactionId: string, pscVerificationId: string, pscVerificationPatch: PscVerificationData): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
42
|
+
patchPscVerification(transactionId: string, pscVerificationId: string, pscVerificationPatch: PscVerificationData, headers?: Headers): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
43
43
|
/**
|
|
44
44
|
* Retrieves the validation status of a Person with Significant Control (PSC) verification.
|
|
45
45
|
*
|
|
@@ -54,7 +54,7 @@ export default class PscVerificationService {
|
|
|
54
54
|
* using the `handleErrorResponse` method. Otherwise, the response body is mapped to camelCase keys
|
|
55
55
|
* and returned as part of the resource.
|
|
56
56
|
*/
|
|
57
|
-
getValidationStatus(transactionId: string, pscVerificationId: string): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
57
|
+
getValidationStatus(transactionId: string, pscVerificationId: string, headers?: Headers): Promise<Resource<PscVerification> | ApiErrorResponse>;
|
|
58
58
|
/**
|
|
59
59
|
* Checks if there is any planned maintenance for the PSC verification service.
|
|
60
60
|
*
|
|
@@ -62,7 +62,7 @@ export default class PscVerificationService {
|
|
|
62
62
|
* - An `ApiResponse<PlannedMaintenance>` object containing maintenance details.
|
|
63
63
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
64
64
|
*/
|
|
65
|
-
checkPlannedMaintenance(): Promise<ApiResponse<PlannedMaintenance> | ApiErrorResponse>;
|
|
65
|
+
checkPlannedMaintenance(headers?: Headers): Promise<ApiResponse<PlannedMaintenance> | ApiErrorResponse>;
|
|
66
66
|
/**
|
|
67
67
|
* Maps the response body to a front-end resource format with camelCase keys.
|
|
68
68
|
*
|
|
@@ -31,11 +31,11 @@ class PscVerificationService {
|
|
|
31
31
|
* - A `Resource<PscVerification>` object containing the created PSC verification details.
|
|
32
32
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
33
33
|
*/
|
|
34
|
-
postPscVerification(transactionId, pscVerification) {
|
|
34
|
+
postPscVerification(transactionId, pscVerification, headers) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
const resourceUri = `/transactions/${transactionId}/persons-with-significant-control-verification`;
|
|
37
37
|
const pscVerificationResource = mapping_1.default.snakeCaseKeys(pscVerification);
|
|
38
|
-
const response = yield this.client.httpPost(resourceUri, pscVerificationResource);
|
|
38
|
+
const response = yield this.client.httpPost(resourceUri, pscVerificationResource, headers);
|
|
39
39
|
if (response.error) {
|
|
40
40
|
return this.handleErrorResponse(response);
|
|
41
41
|
}
|
|
@@ -51,10 +51,10 @@ class PscVerificationService {
|
|
|
51
51
|
* - A `Resource<PscVerification>` object containing the PSC verification details.
|
|
52
52
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
53
53
|
*/
|
|
54
|
-
getPscVerification(transactionId, pscVerificationId) {
|
|
54
|
+
getPscVerification(transactionId, pscVerificationId, headers) {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
56
|
const resourceUri = `/transactions/${transactionId}/persons-with-significant-control-verification/${pscVerificationId}`;
|
|
57
|
-
const response = yield this.client.httpGet(resourceUri);
|
|
57
|
+
const response = yield this.client.httpGet(resourceUri, headers);
|
|
58
58
|
if (response.error) {
|
|
59
59
|
return this.handleErrorResponse(response);
|
|
60
60
|
}
|
|
@@ -71,9 +71,9 @@ class PscVerificationService {
|
|
|
71
71
|
* - A `Resource<PscVerification>` object containing the updated PSC verification details.
|
|
72
72
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
73
73
|
*/
|
|
74
|
-
patchPscVerification(transactionId, pscVerificationId, pscVerificationPatch) {
|
|
74
|
+
patchPscVerification(transactionId, pscVerificationId, pscVerificationPatch, headers) {
|
|
75
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const additionalHeaders = { "Content-Type": "application/merge-patch+json" };
|
|
76
|
+
const additionalHeaders = Object.assign(Object.assign({}, headers), { "Content-Type": "application/merge-patch+json" });
|
|
77
77
|
const resourceUri = `/transactions/${transactionId}/persons-with-significant-control-verification/${pscVerificationId}`;
|
|
78
78
|
const pscVerificationPatchResource = mapping_1.default.snakeCaseKeys(pscVerificationPatch);
|
|
79
79
|
const response = yield this.client.httpPatch(resourceUri, pscVerificationPatchResource, additionalHeaders);
|
|
@@ -97,10 +97,10 @@ class PscVerificationService {
|
|
|
97
97
|
* using the `handleErrorResponse` method. Otherwise, the response body is mapped to camelCase keys
|
|
98
98
|
* and returned as part of the resource.
|
|
99
99
|
*/
|
|
100
|
-
getValidationStatus(transactionId, pscVerificationId) {
|
|
100
|
+
getValidationStatus(transactionId, pscVerificationId, headers) {
|
|
101
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
102
|
const resourceUri = `/transactions/${transactionId}/persons-with-significant-control-verification/${pscVerificationId}/validation_status`;
|
|
103
|
-
const response = yield this.client.httpGet(resourceUri);
|
|
103
|
+
const response = yield this.client.httpGet(resourceUri, headers);
|
|
104
104
|
if (response.error) {
|
|
105
105
|
return this.handleErrorResponse(response);
|
|
106
106
|
}
|
|
@@ -117,10 +117,10 @@ class PscVerificationService {
|
|
|
117
117
|
* - An `ApiResponse<PlannedMaintenance>` object containing maintenance details.
|
|
118
118
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
119
119
|
*/
|
|
120
|
-
checkPlannedMaintenance() {
|
|
120
|
+
checkPlannedMaintenance(headers) {
|
|
121
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
const maintenanceUri = `/persons-with-significant-control-verification/maintenance`;
|
|
123
|
-
const response = yield this.client.httpGet(maintenanceUri);
|
|
123
|
+
const response = yield this.client.httpGet(maintenanceUri, headers);
|
|
124
124
|
if (response.error) {
|
|
125
125
|
return this.handleErrorResponse(response);
|
|
126
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc-verification-link/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,oEAA4C;AAG5C;;;;GAIG;AACH,MAAqB,sBAAsB;IACvC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAErD;;;;;;;;OAQG;IACU,mBAAmB,CAAE,aAAqB,EAAE,eAAoC;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc-verification-link/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,oEAA4C;AAG5C;;;;GAIG;AACH,MAAqB,sBAAsB;IACvC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAErD;;;;;;;;OAQG;IACU,mBAAmB,CAAE,aAAqB,EAAE,eAAoC,EAAE,OAAiB;;YAC5G,MAAM,WAAW,GAAG,iBAAiB,aAAa,gDAAgD,CAAC;YACnG,MAAM,uBAAuB,GAAG,iBAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;YACvE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,EAAE,OAAO,CAAC,CAAC;YAE3F,IAAI,QAAQ,CAAC,KAAK,EAAE;gBAChB,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;aAC7C;YAED,OAAO,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,kBAAkB,CAAE,aAAqB,EAAE,iBAAyB,EAAE,OAAiB;;YAChG,MAAM,WAAW,GAAG,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