@companieshouse/api-sdk-node 1.0.89 → 1.0.90
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.
|
@@ -11,6 +11,12 @@ export default class CompanyOfficersService {
|
|
|
11
11
|
* Get the officers for a company.
|
|
12
12
|
*
|
|
13
13
|
* @param number the company number to look up
|
|
14
|
+
* @param pageSize the number of officers to show on the page
|
|
15
|
+
* @param pageIndex the start position of the page
|
|
16
|
+
* @param registerView Display register specific information. If given register is held at Companies House,
|
|
17
|
+
* registers_view set to true and correct register_type specified, only active officers will be returned.
|
|
18
|
+
* Those will also have full date of birth.Defaults to false
|
|
19
|
+
* @param orderBy the field by which to order the result set
|
|
14
20
|
*/
|
|
15
|
-
getCompanyOfficers(number: string, pageSize?: number, pageIndex?: number, registerView?: boolean): Promise<Resource<CompanyOfficers>>;
|
|
21
|
+
getCompanyOfficers(number: string, pageSize?: number, pageIndex?: number, registerView?: boolean, orderBy?: string): Promise<Resource<CompanyOfficers>>;
|
|
16
22
|
}
|
|
@@ -24,11 +24,20 @@ class CompanyOfficersService {
|
|
|
24
24
|
* Get the officers for a company.
|
|
25
25
|
*
|
|
26
26
|
* @param number the company number to look up
|
|
27
|
+
* @param pageSize the number of officers to show on the page
|
|
28
|
+
* @param pageIndex the start position of the page
|
|
29
|
+
* @param registerView Display register specific information. If given register is held at Companies House,
|
|
30
|
+
* registers_view set to true and correct register_type specified, only active officers will be returned.
|
|
31
|
+
* Those will also have full date of birth.Defaults to false
|
|
32
|
+
* @param orderBy the field by which to order the result set
|
|
27
33
|
*/
|
|
28
|
-
getCompanyOfficers(number, pageSize = 35, pageIndex = 0, registerView = false) {
|
|
34
|
+
getCompanyOfficers(number, pageSize = 35, pageIndex = 0, registerView = false, orderBy) {
|
|
29
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
36
|
let url = `/company/${number}/officers`;
|
|
31
37
|
url = url.concat("?", `page_size=${pageSize}`, "&", `page_index=${pageIndex}`, "&", `register_view=${registerView}`);
|
|
38
|
+
if (orderBy) {
|
|
39
|
+
url = url.concat(`&order_by=${orderBy}`);
|
|
40
|
+
}
|
|
32
41
|
const resp = yield this.client.httpGet(url);
|
|
33
42
|
const resource = {
|
|
34
43
|
httpStatusCode: resp.status
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/company-officers/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,oEAA4C;AAE5C;;GAEG;AACH,MAAqB,sBAAsB;IACvC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/company-officers/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,oEAA4C;AAE5C;;GAEG;AACH,MAAqB,sBAAsB;IACvC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;;;;;;KAUC;IACY,kBAAkB,CAAE,MAAc,EAAE,WAAmB,EAAE,EAAE,YAAoB,CAAC,EAAE,eAAwB,KAAK,EAAE,OAAgB;;YAC1I,IAAI,GAAG,GAAG,YAAY,MAAM,WAAW,CAAC;YACxC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,EAChB,aAAa,QAAQ,EAAE,EACvB,GAAG,EACH,cAAc,SAAS,EAAE,EACzB,GAAG,EACH,iBAAiB,YAAY,EAAE,CAAC,CAAC;YACrC,IAAI,OAAO,EAAE;gBACT,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,OAAO,EAAE,CAAC,CAAC;aAC5C;YAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE5C,MAAM,QAAQ,GAA8B;gBACxC,cAAc,EAAE,IAAI,CAAC,MAAM;aAC9B,CAAC;YAEF,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO,QAAQ,CAAC;aACnB;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAA+B,CAAC;YAElD,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAkB,IAAI,CAAC,CAAC;YAEjE,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ;AA1CD,yCA0CC"}
|