@companieshouse/api-sdk-node 2.0.275 → 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/associations/service.d.ts +25 -12
- package/dist/services/associations/service.js +44 -21
- package/dist/services/associations/service.js.map +1 -1
- package/dist/services/associations/types.d.ts +5 -0
- 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
|
@@ -18,17 +18,23 @@ export default class AssociationsService {
|
|
|
18
18
|
* @param includeRemoved - a flag to get a list of companies where status is "removed". Default value: false.
|
|
19
19
|
* @param pageIndex - a page number to be returned. Default value: 0.
|
|
20
20
|
* @param itemsPerPage - a number of items to be returned per page. Default value: 15.
|
|
21
|
-
* @param userId - a unique identifier of a user to check if associated with the company.
|
|
22
21
|
* @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
|
|
23
22
|
*/
|
|
24
|
-
getCompanyAssociations(companyNumber: string, includeRemoved?: boolean, pageIndex?: number, itemsPerPage?: number
|
|
23
|
+
getCompanyAssociations(companyNumber: string, includeRemoved?: boolean, pageIndex?: number, itemsPerPage?: number): Promise<Resource<AssociationList | Errors>>;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* Searches for an association between a user and a company using either the user's email or user ID.
|
|
26
|
+
* Only one of userEmail or userId should be provided.
|
|
27
|
+
* Optionally filter by association status.
|
|
28
|
+
*
|
|
29
|
+
* @param companyNumber - The company number to search associations for.
|
|
30
|
+
* @param userEmail - The user's email address (optional).
|
|
31
|
+
* @param userId - The user's unique identifier (optional).
|
|
32
|
+
* @param associationStatus - Array of association statuses to filter by (optional).
|
|
33
|
+
* Available values: confirmed, awaiting-approval, removed, migrated, unauthorised.
|
|
34
|
+
* Default: confirmed.
|
|
35
|
+
* @returns Promise resolving to the association or errors object.
|
|
30
36
|
*/
|
|
31
|
-
|
|
37
|
+
searchForCompanyAssociation(companyNumber: string, userEmail?: string, userId?: string, associationStatus?: AssociationStatus[]): Promise<Resource<Association | Errors>>;
|
|
32
38
|
/**
|
|
33
39
|
* Initiates an HTTP GET request to retrieve the associations searched based on association status.
|
|
34
40
|
* @param associationStatus - an association status used to filter associations. This parameter is required. Available values: confirmed, awaiting-approval, removed. Default value: confirmed.
|
|
@@ -39,12 +45,19 @@ export default class AssociationsService {
|
|
|
39
45
|
*/
|
|
40
46
|
searchAssociations(associationStatus: AssociationStatus[], pageIndex?: number, itemsPerPage?: number, companyNumber?: string): Promise<Resource<AssociationList | Errors>>;
|
|
41
47
|
/**
|
|
42
|
-
* Creates a new association for a user
|
|
43
|
-
* @param companyNumber -
|
|
44
|
-
* @param
|
|
45
|
-
* @returns
|
|
48
|
+
* Creates a new association for a user with provided userId.
|
|
49
|
+
* @param companyNumber - The company number for the new association.
|
|
50
|
+
* @param userId - The user's unique identifier.
|
|
51
|
+
* @returns A promise resolving to the new association's link or errors object.
|
|
46
52
|
*/
|
|
47
|
-
createAssociation(companyNumber: string,
|
|
53
|
+
createAssociation(companyNumber: string, userId: string): Promise<Resource<NewAssociationResponse | Errors>>;
|
|
54
|
+
/**
|
|
55
|
+
* Invites a user with the provided email address to a company.
|
|
56
|
+
* @param companyNumber - The company number.
|
|
57
|
+
* @param inviteeEmailAddress - The email address of the user to invite.
|
|
58
|
+
* @returns A promise resolving to the new association's link or errors object.
|
|
59
|
+
*/
|
|
60
|
+
inviteUser(companyNumber: string, inviteeEmailAddress: string): Promise<Resource<NewAssociationResponse | Errors>>;
|
|
48
61
|
/**
|
|
49
62
|
* Returns an association data for the association with the provided association identifier.
|
|
50
63
|
* @param associationId - an identifier of the association for which data has to be returned.
|
|
@@ -30,18 +30,16 @@ class AssociationsService {
|
|
|
30
30
|
* @param includeRemoved - a flag to get a list of companies where status is "removed". Default value: false.
|
|
31
31
|
* @param pageIndex - a page number to be returned. Default value: 0.
|
|
32
32
|
* @param itemsPerPage - a number of items to be returned per page. Default value: 15.
|
|
33
|
-
* @param userId - a unique identifier of a user to check if associated with the company.
|
|
34
33
|
* @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
|
|
35
34
|
*/
|
|
36
|
-
getCompanyAssociations(companyNumber, includeRemoved, pageIndex, itemsPerPage
|
|
35
|
+
getCompanyAssociations(companyNumber, includeRemoved, pageIndex, itemsPerPage) {
|
|
37
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
37
|
let queryString = "";
|
|
39
|
-
if (includeRemoved || pageIndex || itemsPerPage
|
|
38
|
+
if (includeRemoved || pageIndex || itemsPerPage) {
|
|
40
39
|
const queryParameters = {
|
|
41
40
|
include_removed: includeRemoved || undefined,
|
|
42
41
|
page_index: pageIndex || undefined,
|
|
43
|
-
items_per_page: itemsPerPage || undefined
|
|
44
|
-
user_id: userId || undefined
|
|
42
|
+
items_per_page: itemsPerPage || undefined
|
|
45
43
|
};
|
|
46
44
|
queryString = this.getQueryString(queryParameters);
|
|
47
45
|
}
|
|
@@ -51,15 +49,28 @@ class AssociationsService {
|
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
52
|
+
* Searches for an association between a user and a company using either the user's email or user ID.
|
|
53
|
+
* Only one of userEmail or userId should be provided.
|
|
54
|
+
* Optionally filter by association status.
|
|
55
|
+
*
|
|
56
|
+
* @param companyNumber - The company number to search associations for.
|
|
57
|
+
* @param userEmail - The user's email address (optional).
|
|
58
|
+
* @param userId - The user's unique identifier (optional).
|
|
59
|
+
* @param associationStatus - Array of association statuses to filter by (optional).
|
|
60
|
+
* Available values: confirmed, awaiting-approval, removed, migrated, unauthorised.
|
|
61
|
+
* Default: confirmed.
|
|
62
|
+
* @returns Promise resolving to the association or errors object.
|
|
58
63
|
*/
|
|
59
|
-
|
|
64
|
+
searchForCompanyAssociation(companyNumber, userEmail, userId, associationStatus) {
|
|
60
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const url = `/associations/companies/${companyNumber}`;
|
|
62
|
-
const body = {
|
|
66
|
+
const url = `/associations/companies/${companyNumber}/search`;
|
|
67
|
+
const body = {};
|
|
68
|
+
if (userEmail)
|
|
69
|
+
body.user_email = userEmail;
|
|
70
|
+
if (userId)
|
|
71
|
+
body.user_id = userId;
|
|
72
|
+
if (associationStatus)
|
|
73
|
+
body.status = associationStatus;
|
|
63
74
|
const response = yield this.client.httpPost(url, body);
|
|
64
75
|
return this.getResource(response);
|
|
65
76
|
});
|
|
@@ -87,17 +98,29 @@ class AssociationsService {
|
|
|
87
98
|
});
|
|
88
99
|
}
|
|
89
100
|
/**
|
|
90
|
-
* Creates a new association for a user
|
|
91
|
-
* @param companyNumber -
|
|
92
|
-
* @param
|
|
93
|
-
* @returns
|
|
101
|
+
* Creates a new association for a user with provided userId.
|
|
102
|
+
* @param companyNumber - The company number for the new association.
|
|
103
|
+
* @param userId - The user's unique identifier.
|
|
104
|
+
* @returns A promise resolving to the new association's link or errors object.
|
|
105
|
+
*/
|
|
106
|
+
createAssociation(companyNumber, userId) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const url = "/associations";
|
|
109
|
+
const body = { company_number: companyNumber, user_id: userId };
|
|
110
|
+
const response = yield this.client.httpPost(url, body);
|
|
111
|
+
return this.getResource(response);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Invites a user with the provided email address to a company.
|
|
116
|
+
* @param companyNumber - The company number.
|
|
117
|
+
* @param inviteeEmailAddress - The email address of the user to invite.
|
|
118
|
+
* @returns A promise resolving to the new association's link or errors object.
|
|
94
119
|
*/
|
|
95
|
-
|
|
120
|
+
inviteUser(companyNumber, inviteeEmailAddress) {
|
|
96
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
const url =
|
|
98
|
-
const body = inviteeEmailAddress
|
|
99
|
-
? { company_number: companyNumber, invitee_email_id: inviteeEmailAddress }
|
|
100
|
-
: { company_number: companyNumber };
|
|
122
|
+
const url = "/associations/invitations";
|
|
123
|
+
const body = { company_number: companyNumber, invitee_email_id: inviteeEmailAddress };
|
|
101
124
|
const response = yield this.client.httpPost(url, body);
|
|
102
125
|
return this.getResource(response);
|
|
103
126
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/associations/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/associations/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAcA,oEAA4C;AAE5C;;GAEG;AACH,MAAqB,mBAAmB;IAGpC;;;OAGG;IACH,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;;;OAOG;IACU,sBAAsB,CAC/B,aAAqB,EACrB,cAAwB,EACxB,SAAkB,EAClB,YAAqB;;YAErB,IAAI,WAAW,GAAW,EAAE,CAAC;YAC7B,IAAI,cAAc,IAAI,SAAS,IAAI,YAAY,EAAE;gBAC7C,MAAM,eAAe,GAAoB;oBACrC,eAAe,EAAE,cAAc,IAAI,SAAS;oBAC5C,UAAU,EAAE,SAAS,IAAI,SAAS;oBAClC,cAAc,EAAE,YAAY,IAAI,SAAS;iBAC5C,CAAC;gBACF,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;aACtD;YAED,M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AO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,OAAO,EAAE,CAAC;YACV,MAAM,SAAS,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,WAAW,GAAG,GAAG,WAAW,GAAG,OAAO,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;SACjE;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACK,WAAW,CAAE,QAAsB;QACvC,MAAM,QAAQ,GAAmC;YAC7C,cAAc,EAAE,QAAQ,CAAC,MAAM;SAClC,CAAC;QAEF,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAuB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAE/E,OAAO,QAAQ,CAAC;IACpB,CAAC;;AAlSL,sCAmSC;AAlS2B,0BAAM,GAAG,QAAQ,CAAC"}
|
|
@@ -186,3 +186,8 @@ export interface NewAssociationResponse {
|
|
|
186
186
|
associationLink: string;
|
|
187
187
|
}
|
|
188
188
|
export declare type AssociationsResponse = AssociationList | Association | NewAssociationResponse | Errors;
|
|
189
|
+
export interface SearchForCompanyAssociationPostBody {
|
|
190
|
+
user_email?: string;
|
|
191
|
+
user_id?: string;
|
|
192
|
+
status?: AssociationStatus[];
|
|
193
|
+
}
|
|
@@ -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,yBAA4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,qBAAqB,EAAE,qBAAqB;gBAC5C,6BAA6B,EAAE,6BAA6B;gBAC5D,KAAK,EAAE;oBACH,aAAa,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc;iBACvC;gBACD,OAAO,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO;aACzB,CAAC;YAEF,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AAnHD,wCAmHC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHttpClient } from "../../http";
|
|
1
|
+
import { Headers, IHttpClient } from "../../http";
|
|
2
2
|
import { CompanyPersonsWithSignificantControl } 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,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