@companieshouse/api-sdk-node 2.0.302 → 2.0.303
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,4 +1,4 @@
|
|
|
1
|
-
import { PscExtension,
|
|
1
|
+
import { PscExtension, PscExtensionData } from "./types";
|
|
2
2
|
import { Headers, IHttpClient } from "../../http";
|
|
3
3
|
import Resource, { ApiErrorResponse } from "../resource";
|
|
4
4
|
/**
|
|
@@ -18,7 +18,7 @@ export default class PscExtensionService {
|
|
|
18
18
|
* - A `Resource<PscExtension>` object containing the created PSC extension details.
|
|
19
19
|
* - An `ApiErrorResponse` object if an error occurs during the request.
|
|
20
20
|
*/
|
|
21
|
-
postPscExtension(transactionId: string, pscExtension:
|
|
21
|
+
postPscExtension(transactionId: string, pscExtension: PscExtensionData, headers?: Headers): Promise<Resource<PscExtension> | ApiErrorResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Maps the response body to a front-end resource format with camelCase keys.
|
|
24
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc-extensions-link/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,oEAA4C;AAG5C;;;;GAIG;AACH,MAAqB,mBAAmB;IACpC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAErD;;;;;;;;OAQG;IACU,gBAAgB,CAAE,aAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/psc-extensions-link/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,oEAA4C;AAG5C;;;;GAIG;AACH,MAAqB,mBAAmB;IACpC,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAErD;;;;;;;;OAQG;IACU,gBAAgB,CAAE,aAAqB,EAAE,YAA8B,EAAE,OAAiB;;YACnG,MAAM,WAAW,GAAG,iBAAiB,aAAa,8CAA8C,CAAC;YACjG,MAAM,oBAAoB,GAAG,iBAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;YAExF,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;;;;;OAKG;IACK,wBAAwB,CAAE,QAAsB;QACpD,MAAM,gBAAgB,GAA2B;YAC7C,cAAc,EAAE,QAAQ,CAAC,MAAM;YAC/B,QAAQ,EAAE,QAAQ,CAAC,IAAoB;SAC1C,CAAC;QAEF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAA4C,CAAC;QACnE,gBAAgB,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAe,IAAI,CAAC,CAAC;QAEtE,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACK,mBAAmB,CAAE,QAAsB;QAC/C,OAAO;YACH,cAAc,EAAE,QAAQ,CAAC,MAAM;YAC/B,MAAM,EAAE,CAAC,iBAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAClD,CAAC;IACN,CAAC;CACJ;AAtDD,sCAsDC"}
|
|
@@ -96,13 +96,13 @@ export interface NameElements {
|
|
|
96
96
|
middleName?: string;
|
|
97
97
|
surname: string;
|
|
98
98
|
}
|
|
99
|
-
export interface
|
|
99
|
+
export interface PscExtensionResource {
|
|
100
100
|
created_at: Date;
|
|
101
101
|
updated_at: Date;
|
|
102
102
|
links: LinksResource;
|
|
103
|
-
data:
|
|
103
|
+
data: PscExtensionDataResource;
|
|
104
104
|
}
|
|
105
|
-
export interface
|
|
105
|
+
export interface PscExtensionDataResource {
|
|
106
106
|
company_number?: string;
|
|
107
107
|
psc_notification_id?: string;
|
|
108
108
|
extensionDetails?: ExtensionDetailsResource;
|
|
@@ -111,9 +111,9 @@ export interface PscExtension {
|
|
|
111
111
|
createdAt: Date;
|
|
112
112
|
updatedAt: Date;
|
|
113
113
|
links: Links;
|
|
114
|
-
data:
|
|
114
|
+
data: PscExtensionData;
|
|
115
115
|
}
|
|
116
|
-
export interface
|
|
116
|
+
export interface PscExtensionData {
|
|
117
117
|
companyNumber?: string;
|
|
118
118
|
pscNotificationId?: string;
|
|
119
119
|
extensionDetails?: ExtensionDetails;
|
|
@@ -128,3 +128,23 @@ export interface ExtensionDetails {
|
|
|
128
128
|
nameMismatchReason?: string;
|
|
129
129
|
extensionRequestDate?: string;
|
|
130
130
|
}
|
|
131
|
+
export interface ValidationStatusError {
|
|
132
|
+
error: string;
|
|
133
|
+
location: string;
|
|
134
|
+
type?: string;
|
|
135
|
+
locationType: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ValidationStatusResponse {
|
|
138
|
+
errors: ValidationStatusError[];
|
|
139
|
+
isValid?: boolean;
|
|
140
|
+
}
|
|
141
|
+
export interface ValidationStatusErrorResource {
|
|
142
|
+
error: string;
|
|
143
|
+
location: string;
|
|
144
|
+
location_type: string;
|
|
145
|
+
type?: string;
|
|
146
|
+
}
|
|
147
|
+
export interface ValidationStatusResponseResource {
|
|
148
|
+
errors: ValidationStatusErrorResource[];
|
|
149
|
+
is_valid?: boolean;
|
|
150
|
+
}
|