@vepler/sdk 2.12.0 → 2.18.12
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/README.md +19 -14
- package/dist/commonjs/funcs/epcGetByLocationId.d.ts +17 -0
- package/dist/commonjs/funcs/epcGetByLocationId.d.ts.map +1 -0
- package/dist/commonjs/funcs/epcGetByLocationId.js +124 -0
- package/dist/commonjs/funcs/epcGetByLocationId.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/sdk/epc.d.ts +12 -0
- package/dist/commonjs/sdk/epc.d.ts.map +1 -0
- package/dist/commonjs/sdk/epc.js +22 -0
- package/dist/commonjs/sdk/epc.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.d.ts +562 -0
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.js +276 -0
- package/dist/commonjs/sdk/models/operations/getepcbylocationid.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/getlistingbyid.d.ts +2 -2
- package/dist/commonjs/sdk/models/operations/getlistingbyid.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getlistingsbylocation.d.ts +2 -2
- package/dist/commonjs/sdk/models/operations/getlistingsbylocation.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getnearestpoi.d.ts +4 -4
- package/dist/commonjs/sdk/models/operations/getnearestpoi.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getnearestpoi.js +6 -6
- package/dist/commonjs/sdk/models/operations/getnearestpoi.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +1 -0
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/querylistings.d.ts +2 -2
- package/dist/commonjs/sdk/models/operations/querylistings.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/querylistingsbysource.d.ts +2 -2
- package/dist/commonjs/sdk/models/operations/querylistingsbysource.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/resolveaddress.d.ts +39 -4
- package/dist/commonjs/sdk/models/operations/resolveaddress.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/resolveaddress.js +23 -2
- package/dist/commonjs/sdk/models/operations/resolveaddress.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/propertyaddress.d.ts +1 -1
- package/dist/commonjs/sdk/models/shared/propertyaddress.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/streetdescriptor.d.ts +1 -1
- package/dist/commonjs/sdk/models/shared/streetdescriptor.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/epcGetByLocationId.d.ts +17 -0
- package/dist/esm/funcs/epcGetByLocationId.d.ts.map +1 -0
- package/dist/esm/funcs/epcGetByLocationId.js +88 -0
- package/dist/esm/funcs/epcGetByLocationId.js.map +1 -0
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/sdk/epc.d.ts +12 -0
- package/dist/esm/sdk/epc.d.ts.map +1 -0
- package/dist/esm/sdk/epc.js +18 -0
- package/dist/esm/sdk/epc.js.map +1 -0
- package/dist/esm/sdk/models/operations/getepcbylocationid.d.ts +562 -0
- package/dist/esm/sdk/models/operations/getepcbylocationid.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/getepcbylocationid.js +229 -0
- package/dist/esm/sdk/models/operations/getepcbylocationid.js.map +1 -0
- package/dist/esm/sdk/models/operations/getlistingbyid.d.ts +2 -2
- package/dist/esm/sdk/models/operations/getlistingbyid.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getlistingsbylocation.d.ts +2 -2
- package/dist/esm/sdk/models/operations/getlistingsbylocation.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getnearestpoi.d.ts +4 -4
- package/dist/esm/sdk/models/operations/getnearestpoi.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getnearestpoi.js +4 -4
- package/dist/esm/sdk/models/operations/getnearestpoi.js.map +1 -1
- package/dist/esm/sdk/models/operations/index.d.ts +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +1 -0
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/querylistings.d.ts +2 -2
- package/dist/esm/sdk/models/operations/querylistings.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/querylistingsbysource.d.ts +2 -2
- package/dist/esm/sdk/models/operations/querylistingsbysource.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/resolveaddress.d.ts +39 -4
- package/dist/esm/sdk/models/operations/resolveaddress.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/resolveaddress.js +22 -1
- package/dist/esm/sdk/models/operations/resolveaddress.js.map +1 -1
- package/dist/esm/sdk/models/shared/propertyaddress.d.ts +1 -1
- package/dist/esm/sdk/models/shared/propertyaddress.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/streetdescriptor.d.ts +1 -1
- package/dist/esm/sdk/models/shared/streetdescriptor.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/epcGetByLocationId.ts +172 -0
- package/src/lib/config.ts +4 -4
- package/src/sdk/epc.ts +27 -0
- package/src/sdk/models/operations/getepcbylocationid.ts +895 -0
- package/src/sdk/models/operations/getlistingbyid.ts +2 -2
- package/src/sdk/models/operations/getlistingsbylocation.ts +2 -2
- package/src/sdk/models/operations/getnearestpoi.ts +9 -9
- package/src/sdk/models/operations/index.ts +1 -0
- package/src/sdk/models/operations/querylistings.ts +2 -2
- package/src/sdk/models/operations/querylistingsbysource.ts +2 -2
- package/src/sdk/models/operations/resolveaddress.ts +50 -5
- package/src/sdk/models/shared/propertyaddress.ts +1 -1
- package/src/sdk/models/shared/streetdescriptor.ts +1 -1
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
21
|
+
import { SDKBaseError } from "../sdk/models/errors/sdkbaseerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
25
|
+
import { Result } from "../sdk/types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get EPC records by location ID
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Retrieve all Energy Performance Certificate (EPC) records for a specific location, ordered by lodgement date (newest first). Returns an empty array if no records are found.
|
|
32
|
+
*/
|
|
33
|
+
export function epcGetByLocationId(
|
|
34
|
+
client: SDKCore,
|
|
35
|
+
request: operations.GetEpcByLocationIdRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
operations.GetEpcByLocationIdResponse,
|
|
40
|
+
| SDKBaseError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: SDKCore,
|
|
59
|
+
request: operations.GetEpcByLocationIdRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
operations.GetEpcByLocationIdResponse,
|
|
65
|
+
| SDKBaseError
|
|
66
|
+
| ResponseValidationError
|
|
67
|
+
| ConnectionError
|
|
68
|
+
| RequestAbortedError
|
|
69
|
+
| RequestTimeoutError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| SDKValidationError
|
|
73
|
+
>,
|
|
74
|
+
APICall,
|
|
75
|
+
]
|
|
76
|
+
> {
|
|
77
|
+
const parsed = safeParse(
|
|
78
|
+
request,
|
|
79
|
+
(value) => operations.GetEpcByLocationIdRequest$outboundSchema.parse(value),
|
|
80
|
+
"Input validation failed",
|
|
81
|
+
);
|
|
82
|
+
if (!parsed.ok) {
|
|
83
|
+
return [parsed, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const payload = parsed.value;
|
|
86
|
+
const body = null;
|
|
87
|
+
|
|
88
|
+
const pathParams = {
|
|
89
|
+
locationId: encodeSimple("locationId", payload.locationId, {
|
|
90
|
+
explode: false,
|
|
91
|
+
charEncoding: "percent",
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const path = pathToFunc("/v1/epc/{locationId}")(pathParams);
|
|
96
|
+
|
|
97
|
+
const query = encodeFormQuery({
|
|
98
|
+
"limit": payload.limit,
|
|
99
|
+
"offset": payload.offset,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "getEpcByLocationId",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.apiKeyAuth,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| { strategy: "none" },
|
|
122
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const requestRes = client._createRequest(context, {
|
|
126
|
+
security: requestSecurity,
|
|
127
|
+
method: "GET",
|
|
128
|
+
baseURL: options?.serverURL,
|
|
129
|
+
path: path,
|
|
130
|
+
headers: headers,
|
|
131
|
+
query: query,
|
|
132
|
+
body: body,
|
|
133
|
+
userAgent: client._options.userAgent,
|
|
134
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
135
|
+
}, options);
|
|
136
|
+
if (!requestRes.ok) {
|
|
137
|
+
return [requestRes, { status: "invalid" }];
|
|
138
|
+
}
|
|
139
|
+
const req = requestRes.value;
|
|
140
|
+
|
|
141
|
+
const doResult = await client._do(req, {
|
|
142
|
+
context,
|
|
143
|
+
errorCodes: [],
|
|
144
|
+
retryConfig: context.retryConfig,
|
|
145
|
+
retryCodes: context.retryCodes,
|
|
146
|
+
});
|
|
147
|
+
if (!doResult.ok) {
|
|
148
|
+
return [doResult, { status: "request-error", request: req }];
|
|
149
|
+
}
|
|
150
|
+
const response = doResult.value;
|
|
151
|
+
|
|
152
|
+
const [result] = await M.match<
|
|
153
|
+
operations.GetEpcByLocationIdResponse,
|
|
154
|
+
| SDKBaseError
|
|
155
|
+
| ResponseValidationError
|
|
156
|
+
| ConnectionError
|
|
157
|
+
| RequestAbortedError
|
|
158
|
+
| RequestTimeoutError
|
|
159
|
+
| InvalidRequestError
|
|
160
|
+
| UnexpectedClientError
|
|
161
|
+
| SDKValidationError
|
|
162
|
+
>(
|
|
163
|
+
M.json(200, operations.GetEpcByLocationIdResponse$inboundSchema),
|
|
164
|
+
M.json(400, operations.GetEpcByLocationIdResponse$inboundSchema),
|
|
165
|
+
M.json(500, operations.GetEpcByLocationIdResponse$inboundSchema),
|
|
166
|
+
)(response, req);
|
|
167
|
+
if (!result.ok) {
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -60,8 +60,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
|
-
openapiDocVersion: "2.12
|
|
64
|
-
sdkVersion: "0.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
63
|
+
openapiDocVersion: "2.18.12",
|
|
64
|
+
sdkVersion: "0.8.0",
|
|
65
|
+
genVersion: "2.788.5",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.8.0 2.788.5 2.18.12 @vepler/sdk",
|
|
67
67
|
} as const;
|
package/src/sdk/epc.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { epcGetByLocationId } from "../funcs/epcGetByLocationId.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "./models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Epc extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Get EPC records by location ID
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieve all Energy Performance Certificate (EPC) records for a specific location, ordered by lodgement date (newest first). Returns an empty array if no records are found.
|
|
16
|
+
*/
|
|
17
|
+
async getByLocationId(
|
|
18
|
+
request: operations.GetEpcByLocationIdRequest,
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): Promise<operations.GetEpcByLocationIdResponse> {
|
|
21
|
+
return unwrapAsync(epcGetByLocationId(
|
|
22
|
+
this,
|
|
23
|
+
request,
|
|
24
|
+
options,
|
|
25
|
+
));
|
|
26
|
+
}
|
|
27
|
+
}
|