@companieshouse/api-sdk-node 1.0.88 → 1.0.89

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.
@@ -12,5 +12,5 @@ export default class CompanyOfficersService {
12
12
  *
13
13
  * @param number the company number to look up
14
14
  */
15
- getCompanyOfficers(number: string): Promise<Resource<CompanyOfficers>>;
15
+ getCompanyOfficers(number: string, pageSize?: number, pageIndex?: number, registerView?: boolean): Promise<Resource<CompanyOfficers>>;
16
16
  }
@@ -25,9 +25,11 @@ class CompanyOfficersService {
25
25
  *
26
26
  * @param number the company number to look up
27
27
  */
28
- getCompanyOfficers(number) {
28
+ getCompanyOfficers(number, pageSize = 35, pageIndex = 0, registerView = false) {
29
29
  return __awaiter(this, void 0, void 0, function* () {
30
- const resp = yield this.client.httpGet(`/company/${number}/officers`);
30
+ let url = `/company/${number}/officers`;
31
+ url = url.concat("?", `page_size=${pageSize}`, "&", `page_index=${pageIndex}`, "&", `register_view=${registerView}`);
32
+ const resp = yield this.client.httpGet(url);
31
33
  const resource = {
32
34
  httpStatusCode: resp.status
33
35
  };
@@ -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;;;;KAIC;IACY,kBAAkB,CAAE,MAAc;;YAC3C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,MAAM,WAAW,CAAC,CAAC;YAEtE,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;AAzBD,yCAyBC"}
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;;;;KAIC;IACY,kBAAkB,CAAE,MAAc,EAAE,WAAmB,EAAE,EAAE,YAAoB,CAAC,EAAE,eAAwB,KAAK;;YACxH,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;YAErC,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;AAjCD,yCAiCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companieshouse/api-sdk-node",
3
- "version": "1.0.88",
3
+ "version": "1.0.89",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [