@companieshouse/api-sdk-node 2.0.223 → 2.0.225

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.
@@ -1,10 +1,12 @@
1
1
  import { IHttpClient } from "../../http";
2
- import { LimitedPartnership, LimitedPartnershipCreated } from "./types";
2
+ import { LimitedPartnership, LimitedPartnershipResourceCreated, LimitedPartnershipIncorporation } from "./types";
3
3
  import Resource, { ApiErrorResponse } from "../resource";
4
4
  export default class LimitedPartnershipsService {
5
5
  private readonly client;
6
6
  constructor(client: IHttpClient);
7
- postLimitedPartnership(transactionId: string, body: LimitedPartnership): Promise<Resource<LimitedPartnershipCreated> | ApiErrorResponse>;
7
+ postLimitedPartnership(transactionId: string, body: LimitedPartnership): Promise<Resource<LimitedPartnershipResourceCreated> | ApiErrorResponse>;
8
8
  patchLimitedPartnership(transactionId: string, submissionId: string, body: LimitedPartnership["data"]): Promise<Resource<void> | ApiErrorResponse>;
9
9
  getLimitedPartnership(transactionId: string, submissionId: string): Promise<Resource<LimitedPartnership> | ApiErrorResponse>;
10
+ postLimitedPartnershipIncorporation(transactionId: string): Promise<Resource<LimitedPartnershipResourceCreated> | ApiErrorResponse>;
11
+ getLimitedPartnershipIncorporation(transactionId: string, filingResourceId: string, includeSubResources?: boolean): Promise<Resource<LimitedPartnershipIncorporation> | ApiErrorResponse>;
10
12
  }
@@ -43,6 +43,30 @@ class LimitedPartnershipsService {
43
43
  };
44
44
  });
45
45
  }
46
+ /*
47
+ * Calls to incorporation endpoints
48
+ */
49
+ postLimitedPartnershipIncorporation(transactionId) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const URL = `/transactions/${transactionId}/incorporation/limited-partnership`;
52
+ const response = yield this.client.httpPost(URL);
53
+ return {
54
+ httpStatusCode: response.status,
55
+ resource: Object.assign({}, response.body)
56
+ };
57
+ });
58
+ }
59
+ getLimitedPartnershipIncorporation(transactionId, filingResourceId, includeSubResources) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ const subResourcesQuery = (includeSubResources ? ("?include_sub_resources=" + includeSubResources) : "");
62
+ const URL = `/transactions/${transactionId}/incorporation/limited-partnership/${filingResourceId}${subResourcesQuery}`;
63
+ const response = yield this.client.httpGet(URL);
64
+ return {
65
+ httpStatusCode: response.status,
66
+ resource: Object.assign({}, response.body)
67
+ };
68
+ });
69
+ }
46
70
  }
47
71
  exports.default = LimitedPartnershipsService;
48
72
  //# sourceMappingURL=service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/limited-partnerships/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,MAAqB,0BAA0B;IAC3C,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAExC,sBAAsB,CAC/B,aAAqB,EACrB,IAAwB;;YAExB,MAAM,GAAG,GAAG,iBAAiB,aAAa,kCAAkC,CAAC;YAC7E,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAErE,OAAO;gBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,oBAAO,QAAQ,CAAC,IAAI,CAAE;aACjC,CAAC;QACN,CAAC;KAAA;IAEY,uBAAuB,CAChC,aAAqB,EACrB,YAAoB,EACpB,IAAgC;;YAEhC,MAAM,GAAG,GAAG,iBAAiB,aAAa,oCAAoC,YAAY,EAAE,CAAC;YAC7F,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAEtE,OAAO;gBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,oBAAO,QAAQ,CAAC,IAAI,CAAE;aACjC,CAAC;QACN,CAAC;KAAA;IAEY,qBAAqB,CAC9B,aAAqB,EACrB,YAAoB;;YAEpB,MAAM,GAAG,GAAG,iB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C;YAC7F,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE9D,OAAO;gBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,oBAAO,QAAQ,CAAC,IAAI,CAAE;aACjC,CAAC;QACN,CAAC;KAAA;IAED;;OAEG;IAEU,mCAAmC,CAC5C,aAAqB;;YACrB,MAAM,GAAG,GAAG,iBAAiB,aAAa,oCAAoC,CAAC;YAC/E,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAE/D,OAAO;gBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,oBAAO,QAAQ,CAAC,IAAI,CAAE;aACjC,CAAC;QACN,CAAC;KAAA;IAEY,kCAAkC,CAC3C,aAAqB,EACrB,gBAAwB,EACxB,mBAA6B;;YAC7B,MAAM,iBAAiB,GAAW,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,yBAAyB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACjH,MAAM,GAAG,GAAG,iBAAiB,aAAa,sCAAsC,gBAAgB,GAAG,iBAAiB,EAAE,CAAC;YAEvH,MAAM,QAAQ,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAE9D,OAAO;gBACH,cAAc,EAAE,QAAQ,CAAC,MAAM;gBAC/B,QAAQ,oBAAO,QAAQ,CAAC,IAAI,CAAE;aACjC,CAAC;QACN,CAAC;KAAA;CACJ;AAxED,6CAwEC"}
@@ -16,7 +16,7 @@ export interface LimitedPartnership {
16
16
  * The data structure returned by the API when a new Limited Partnership resource has
17
17
  * successfully been created.
18
18
  */
19
- export interface LimitedPartnershipCreated {
19
+ export interface LimitedPartnershipResourceCreated {
20
20
  id: string;
21
21
  }
22
22
  export declare enum NameEndingType {
@@ -33,3 +33,12 @@ export declare enum PartnershipType {
33
33
  SLP = "SLP",
34
34
  SPFLP = "SPFLP"
35
35
  }
36
+ export interface LimitedPartnershipIncorporation {
37
+ etag: string;
38
+ kind: string;
39
+ sub_resources?: {
40
+ general_partners: any[];
41
+ limited_partners: any[];
42
+ partnership: LimitedPartnership;
43
+ };
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companieshouse/api-sdk-node",
3
- "version": "2.0.223",
3
+ "version": "2.0.225",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [