@quickshops/sdk 1.0.3 → 1.0.6
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/FUNCTIONS.md +0 -1
- package/README.md +155 -28
- package/RUNTIMES.md +2 -0
- package/esm/funcs/health-health-check.d.ts +1 -2
- package/esm/funcs/health-health-check.d.ts.map +1 -1
- package/esm/funcs/health-health-check.js +4 -12
- package/esm/funcs/health-health-check.js.map +1 -1
- package/esm/hooks/hooks.d.ts.map +1 -1
- package/esm/hooks/hooks.js +6 -1
- package/esm/hooks/hooks.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +3 -2
- package/esm/lib/sdks.js.map +1 -1
- package/esm/lib/url-policy.d.ts +10 -0
- package/esm/lib/url-policy.d.ts.map +1 -0
- package/esm/lib/url-policy.js +57 -0
- package/esm/lib/url-policy.js.map +1 -0
- package/esm/lib/url-policy.test.d.ts +2 -0
- package/esm/lib/url-policy.test.d.ts.map +1 -0
- package/esm/lib/url-policy.test.js +25 -0
- package/esm/lib/url-policy.test.js.map +1 -0
- package/esm/models/errors/index.d.ts +0 -1
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +0 -1
- package/esm/models/errors/index.js.map +1 -1
- package/examples/healthHealthCheck.example.ts +0 -1
- package/jsr.json +1 -1
- package/package.json +5 -2
- package/src/funcs/health-health-check.ts +4 -26
- package/src/hooks/hooks.ts +6 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/sdks.ts +3 -2
- package/src/lib/url-policy.ts +83 -0
- package/src/models/errors/index.ts +0 -1
- package/tests/url-policy.test.ts +47 -0
- package/src/models/errors/health-check.ts +0 -173
package/FUNCTIONS.md
CHANGED
|
@@ -26,7 +26,6 @@ import { healthHealthCheck } from "@quickshops/sdk/funcs/health-health-check.js"
|
|
|
26
26
|
// You can create one instance of it to use across an application.
|
|
27
27
|
const quickshops = new QuickshopsCore({
|
|
28
28
|
serverURL: "https://api.example.com",
|
|
29
|
-
bearerAuth: process.env["QUICKSHOPS_BEARER_AUTH"] ?? "",
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
async function run() {
|
package/README.md
CHANGED
|
@@ -1,78 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @quickshops/sdk
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This package is **closed source** and proprietary to QuickShops. Installing it grants you a license to use it with the QuickShops API; it is not open source and may not be redistributed or modified outside the terms of your QuickShops agreement.
|
|
3
|
+
Developer-friendly and type-safe TypeScript SDK for the *QuickShops Headless API*.
|
|
6
4
|
|
|
7
5
|
[](https://quickshops.app)
|
|
8
6
|
[](https://quickshops.app)
|
|
9
7
|
|
|
10
8
|
## Summary
|
|
11
9
|
|
|
12
|
-
QuickShops Headless API for starter templates and
|
|
10
|
+
QuickShops Headless API for starter templates and custom storefronts. Use this SDK server-side to fetch products, manage carts, start checkout, and handle subscriptions.
|
|
11
|
+
|
|
12
|
+
This package is **closed source** and proprietary to QuickShops. Full docs: [docs.quickshops.app](https://docs.quickshops.app/sdk/installation).
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [@quickshops/sdk](#quickshops-sdk)
|
|
17
|
+
- [Summary](#summary)
|
|
18
|
+
- [Table of Contents](#table-of-contents)
|
|
19
|
+
- [SDK Installation](#sdk-installation)
|
|
20
|
+
- [Requirements](#requirements)
|
|
21
|
+
- [SDK Example Usage](#sdk-example-usage)
|
|
22
|
+
- [Authentication](#authentication)
|
|
23
|
+
- [Available Resources and Operations](#available-resources-and-operations)
|
|
24
|
+
- [Error Handling](#error-handling)
|
|
25
|
+
- [Development](#development)
|
|
26
|
+
- [Maturity](#maturity)
|
|
27
|
+
- [License](#license)
|
|
15
28
|
|
|
16
29
|
## SDK Installation
|
|
17
30
|
|
|
31
|
+
The SDK can be installed with [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/), or [yarn](https://classic.yarnpkg.com/en/).
|
|
32
|
+
|
|
33
|
+
### NPM
|
|
34
|
+
|
|
18
35
|
```bash
|
|
19
36
|
npm add @quickshops/sdk
|
|
20
37
|
```
|
|
21
38
|
|
|
39
|
+
### PNPM
|
|
40
|
+
|
|
22
41
|
```bash
|
|
23
42
|
pnpm add @quickshops/sdk
|
|
24
43
|
```
|
|
25
44
|
|
|
26
|
-
|
|
45
|
+
### Bun
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bun add @quickshops/sdk
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Yarn
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
yarn add @quickshops/sdk
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
> [!NOTE]
|
|
58
|
+
> This package is published as an ES Module (ESM) only. For CommonJS apps, use `await import("@quickshops/sdk")`.
|
|
59
|
+
|
|
60
|
+
## Requirements
|
|
61
|
+
|
|
62
|
+
For supported JavaScript runtimes, see [RUNTIMES.md](RUNTIMES.md).
|
|
27
63
|
|
|
28
64
|
## SDK Example Usage
|
|
29
65
|
|
|
66
|
+
### Example
|
|
67
|
+
|
|
30
68
|
```typescript
|
|
31
69
|
import { Quickshops } from "@quickshops/sdk";
|
|
32
70
|
|
|
33
|
-
const
|
|
71
|
+
const qs = new Quickshops({
|
|
34
72
|
serverURL: "https://api.quickshops.app",
|
|
35
73
|
bearerAuth: process.env.HEADLESS_API_KEY!,
|
|
36
74
|
});
|
|
37
75
|
|
|
38
|
-
|
|
76
|
+
async function run() {
|
|
77
|
+
const { data: products } = await qs.products.productsGetAll();
|
|
78
|
+
console.log(products);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
run();
|
|
39
82
|
```
|
|
40
83
|
|
|
41
|
-
Use the SDK in server-only code. Never expose your API key to the browser.
|
|
84
|
+
Use the SDK in server-only code (API routes, server actions, loaders). Never expose your API key to the browser.
|
|
85
|
+
|
|
86
|
+
Never enable `QUICKSHOPS_DEBUG` or a custom `debugLogger` in production — request logs redact auth headers, but debug mode should stay off in live environments.
|
|
87
|
+
|
|
88
|
+
Set `serverURL` to a trusted host such as `https://api.quickshops.app`. The SDK rejects unknown hosts by default.
|
|
42
89
|
|
|
43
90
|
## Authentication
|
|
44
91
|
|
|
45
|
-
|
|
92
|
+
### Per-Client Security Schemes
|
|
93
|
+
|
|
94
|
+
This SDK supports the following security scheme globally:
|
|
95
|
+
|
|
96
|
+
| Name | Type | Scheme | Environment Variable |
|
|
97
|
+
| --- | --- | --- | --- |
|
|
98
|
+
| `bearerAuth` | http | HTTP Bearer | `QUICKSHOPS_BEARER_AUTH` |
|
|
99
|
+
|
|
100
|
+
Set `bearerAuth` when creating the client. API keys start with `qk_` and are sent as `Authorization: Bearer qk_...`.
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { Quickshops } from "@quickshops/sdk";
|
|
104
|
+
|
|
105
|
+
const qs = new Quickshops({
|
|
106
|
+
serverURL: "https://api.quickshops.app",
|
|
107
|
+
bearerAuth: process.env.HEADLESS_API_KEY!,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const { data: store } = await qs.store.storeGet();
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The API base URL is `https://api.quickshops.app` (the SDK adds `/v1` to each path).
|
|
114
|
+
|
|
115
|
+
## Available Resources and Operations
|
|
116
|
+
|
|
117
|
+
<details open>
|
|
118
|
+
<summary>Available methods</summary>
|
|
119
|
+
|
|
120
|
+
### [Store](https://docs.quickshops.app/api/products)
|
|
121
|
+
|
|
122
|
+
* `storeGet` — Get store for API key
|
|
123
|
+
|
|
124
|
+
### [Products](https://docs.quickshops.app/api/products)
|
|
125
|
+
|
|
126
|
+
* `productsGetAll` — List products
|
|
127
|
+
* `productsGetById` — Get product
|
|
128
|
+
|
|
129
|
+
### [Cart](https://docs.quickshops.app/api/cart)
|
|
130
|
+
|
|
131
|
+
* `cartCreate` — Create cart
|
|
132
|
+
* `cartGet` — Get cart
|
|
133
|
+
* `cartAddLine` — Add cart line
|
|
134
|
+
* `cartUpdateLine` — Update cart line quantity
|
|
135
|
+
* `cartRemoveLine` — Remove cart line
|
|
136
|
+
* `cartClear` — Clear cart
|
|
137
|
+
|
|
138
|
+
### [Checkout](https://docs.quickshops.app/api/checkout)
|
|
139
|
+
|
|
140
|
+
* `checkoutCreateSession` — Create checkout session
|
|
141
|
+
|
|
142
|
+
### [Subscription](https://docs.quickshops.app/api/subscriptions)
|
|
46
143
|
|
|
47
|
-
|
|
144
|
+
* `subscriptionCreatePortalSession` — Create subscription portal session
|
|
48
145
|
|
|
49
|
-
|
|
50
|
-
| --- | --- |
|
|
51
|
-
| Products | [docs.quickshops.app/api/products](https://docs.quickshops.app/api/products) |
|
|
52
|
-
| Cart | [docs.quickshops.app/api/cart](https://docs.quickshops.app/api/cart) |
|
|
53
|
-
| Checkout | [docs.quickshops.app/api/checkout](https://docs.quickshops.app/api/checkout) |
|
|
54
|
-
| Subscriptions | [docs.quickshops.app/api/subscriptions](https://docs.quickshops.app/api/subscriptions) |
|
|
146
|
+
### [Health](https://docs.quickshops.app/api/overview)
|
|
55
147
|
|
|
56
|
-
|
|
148
|
+
* `healthCheck` — Health check
|
|
57
149
|
|
|
58
|
-
|
|
150
|
+
</details>
|
|
151
|
+
|
|
152
|
+
Method reference with request shapes: [docs.quickshops.app/sdk/installation](https://docs.quickshops.app/sdk/installation#method-reference).
|
|
153
|
+
|
|
154
|
+
## Error Handling
|
|
155
|
+
|
|
156
|
+
[`QuickshopsError`](https://docs.quickshops.app/sdk/error-handling) is the base class for HTTP error responses.
|
|
157
|
+
|
|
158
|
+
| Property | Type | Description |
|
|
159
|
+
| --- | --- | --- |
|
|
160
|
+
| `error.message` | `string` | Error message |
|
|
161
|
+
| `error.statusCode` | `number` | HTTP status code, e.g. `404` |
|
|
162
|
+
| `error.headers` | `Headers` | Response headers |
|
|
163
|
+
| `error.body` | `string` | Response body |
|
|
164
|
+
| `error.rawResponse` | `Response` | Raw HTTP response |
|
|
165
|
+
| `error.data$` | `object` | Optional structured error payload |
|
|
166
|
+
|
|
167
|
+
### Example
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
import { Quickshops } from "@quickshops/sdk";
|
|
171
|
+
import * as errors from "@quickshops/sdk/models/errors";
|
|
172
|
+
|
|
173
|
+
const qs = new Quickshops({
|
|
174
|
+
serverURL: "https://api.quickshops.app",
|
|
175
|
+
bearerAuth: process.env.HEADLESS_API_KEY!,
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
try {
|
|
179
|
+
await qs.products.productsGetById({ productId: "prod_123" });
|
|
180
|
+
} catch (error) {
|
|
181
|
+
if (error instanceof errors.QuickshopsError) {
|
|
182
|
+
console.log(error.statusCode, error.message);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
59
186
|
|
|
60
|
-
|
|
187
|
+
See [error handling](https://docs.quickshops.app/sdk/error-handling) for typed errors and retries.
|
|
61
188
|
|
|
62
|
-
|
|
189
|
+
# Development
|
|
63
190
|
|
|
64
|
-
|
|
191
|
+
## Maturity
|
|
65
192
|
|
|
66
|
-
This SDK is in beta. Pin a specific package version in production.
|
|
193
|
+
This SDK is in beta. There may be breaking changes between minor versions. Pin a specific package version in production.
|
|
67
194
|
|
|
68
|
-
|
|
195
|
+
## License
|
|
69
196
|
|
|
70
197
|
`@quickshops/sdk` is closed source software owned by QuickShops. All rights reserved.
|
|
71
198
|
|
|
72
|
-
You may install and use this SDK only to build applications that integrate with QuickShops. You may not copy, modify, sublicense, or redistribute the SDK except as
|
|
199
|
+
You may install and use this SDK only to build applications that integrate with QuickShops. You may not copy, modify, sublicense, or redistribute the SDK except as permitted by QuickShops.
|
|
73
200
|
|
|
74
|
-
|
|
201
|
+
Questions: [quickshops.app](https://quickshops.app)
|
|
75
202
|
|
|
76
203
|
### Made by QuickShops
|
|
77
204
|
|
|
78
|
-
Published and maintained by [QuickShops](https://quickshops.app).
|
|
205
|
+
Published and maintained by [QuickShops](https://quickshops.app).
|
package/RUNTIMES.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Supported JavaScript runtimes
|
|
2
2
|
|
|
3
|
+
> **Server-only SDK:** Use `@quickshops/sdk` only in trusted server environments (Node, Bun, Deno). Never embed API keys in browser bundles, even though some runtimes below include browsers.
|
|
4
|
+
|
|
3
5
|
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
|
|
4
6
|
|
|
5
7
|
- [Web Fetch API][web-fetch]
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { QuickshopsCore } from "../core.js";
|
|
2
2
|
import { RequestOptions } from "../lib/sdks.js";
|
|
3
3
|
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
|
|
4
|
-
import * as errors from "../models/errors/index.js";
|
|
5
4
|
import { QuickshopsError } from "../models/errors/quickshops-error.js";
|
|
6
5
|
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
7
6
|
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
@@ -11,5 +10,5 @@ import { Result } from "../types/fp.js";
|
|
|
11
10
|
/**
|
|
12
11
|
* Health check
|
|
13
12
|
*/
|
|
14
|
-
export declare function healthHealthCheck(client: QuickshopsCore, options?: RequestOptions): APIPromise<Result<operations.HealthCheckResponse,
|
|
13
|
+
export declare function healthHealthCheck(client: QuickshopsCore, options?: RequestOptions): APIPromise<Result<operations.HealthCheckResponse, QuickshopsError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
15
14
|
//# sourceMappingURL=health-health-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health-health-check.d.ts","sourceRoot":"","sources":["../../src/funcs/health-health-check.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"health-health-check.d.ts","sourceRoot":"","sources":["../../src/funcs/health-health-check.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,mBAAmB,EAC5B,eAAe,GACf,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAKA"}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
import { matchStatusCode } from "../lib/http.js";
|
|
6
6
|
import * as M from "../lib/matchers.js";
|
|
7
7
|
import { compactMap } from "../lib/primitives.js";
|
|
8
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
8
|
import { pathToFunc } from "../lib/url.js";
|
|
10
|
-
import * as errors from "../models/errors/index.js";
|
|
11
9
|
import * as operations from "../models/operations/index.js";
|
|
12
10
|
import { APIPromise } from "../types/async.js";
|
|
13
11
|
/**
|
|
@@ -21,23 +19,20 @@ async function $do(client, options) {
|
|
|
21
19
|
const headers = new Headers(compactMap({
|
|
22
20
|
Accept: "application/json",
|
|
23
21
|
}));
|
|
24
|
-
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
25
|
-
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
26
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
27
22
|
const context = {
|
|
28
23
|
options: client._options,
|
|
29
24
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
30
25
|
operationID: "health.check",
|
|
31
26
|
oAuth2Scopes: null,
|
|
32
|
-
resolvedSecurity:
|
|
33
|
-
securitySource:
|
|
27
|
+
resolvedSecurity: null,
|
|
28
|
+
securitySource: null,
|
|
34
29
|
retryConfig: options?.retries
|
|
35
30
|
|| client._options.retryConfig
|
|
36
31
|
|| { strategy: "none" },
|
|
37
32
|
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
38
33
|
};
|
|
39
34
|
const requestRes = client._createRequest(context, {
|
|
40
|
-
security:
|
|
35
|
+
security: null,
|
|
41
36
|
method: "GET",
|
|
42
37
|
baseURL: options?.serverURL,
|
|
43
38
|
path: path,
|
|
@@ -59,10 +54,7 @@ async function $do(client, options) {
|
|
|
59
54
|
return [doResult, { status: "request-error", request: req }];
|
|
60
55
|
}
|
|
61
56
|
const response = doResult.value;
|
|
62
|
-
const
|
|
63
|
-
HttpMeta: { Response: response, Request: req },
|
|
64
|
-
};
|
|
65
|
-
const [result] = await M.match(M.json(200, operations.HealthCheckResponse$inboundSchema), M.jsonErr(401, errors.HealthCheckUnauthorizedError$inboundSchema), M.jsonErr(403, errors.HealthCheckForbiddenError$inboundSchema), M.jsonErr(429, errors.HealthCheckTooManyRequestsError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
57
|
+
const [result] = await M.match(M.json(200, operations.HealthCheckResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
|
|
66
58
|
if (!result.ok) {
|
|
67
59
|
return [result, { status: "complete", request: req, response }];
|
|
68
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health-health-check.js","sourceRoot":"","sources":["../../src/funcs/health-health-check.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"health-health-check.js","sourceRoot":"","sources":["../../src/funcs/health-health-check.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAsB,EACtB,OAAwB,EAaxB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,CACR,CAAC,CAAC;AAAA,CACJ;AAED,KAAK,UAAU,GAAG,CAChB,MAAsB,EACtB,OAAwB,EAgBxB;IACA,MAAM,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;IAExC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;QACrC,MAAM,EAAE,kBAAkB;KAC3B,CAA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C,CAAC;QACrE,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,iCAAiC,CAAC,EACzD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
|
package/esm/hooks/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/hooks/hooks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/hooks/hooks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC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
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
* @generated-id: 01218d9e420f
|
|
4
4
|
*/
|
|
5
|
+
import { validateQuickshopsOptions } from "../lib/url-policy.js";
|
|
5
6
|
export class SDKHooks {
|
|
6
7
|
sdkInitHooks = [];
|
|
7
8
|
beforeCreateRequestHooks = [];
|
|
@@ -9,7 +10,11 @@ export class SDKHooks {
|
|
|
9
10
|
afterSuccessHooks = [];
|
|
10
11
|
afterErrorHooks = [];
|
|
11
12
|
constructor() {
|
|
12
|
-
const presetHooks = [
|
|
13
|
+
const presetHooks = [
|
|
14
|
+
{
|
|
15
|
+
sdkInit: (opts) => validateQuickshopsOptions(opts),
|
|
16
|
+
},
|
|
17
|
+
];
|
|
13
18
|
for (const hook of presetHooks) {
|
|
14
19
|
if ("sdkInit" in hook) {
|
|
15
20
|
this.registerSDKInitHook(hook);
|
package/esm/hooks/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/hooks/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/hooks/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAgBjE,MAAM,OAAO,QAAQ;IACnB,YAAY,GAAkB,EAAE,CAAC;IACjC,wBAAwB,GAA8B,EAAE,CAAC;IACzD,kBAAkB,GAAwB,EAAE,CAAC;IAC7C,iBAAiB,GAAuB,EAAE,CAAC;IAC3C,eAAe,GAAqB,EAAE,CAAC;IAEvC,cAAc;QACZ,MAAM,WAAW,GAAgB;YAC/B;gBACE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC;aACnD;SACF,CAAC;QAEF,KAAK,MAAM,IAAI,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AAC,QAAQ,CAAC;YACtB,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IAAA,CACtC;CACF"}
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
23
23
|
export declare const SDK_METADATA: {
|
|
24
24
|
readonly language: "typescript";
|
|
25
25
|
readonly openapiDocVersion: "0.1.0";
|
|
26
|
-
readonly sdkVersion: "1.0.
|
|
26
|
+
readonly sdkVersion: "1.0.5";
|
|
27
27
|
readonly genVersion: "2.904.2";
|
|
28
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.0.
|
|
28
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.0.5 2.904.2 0.1.0 @quickshops/sdk";
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -15,8 +15,8 @@ export function serverURLFromOptions(options) {
|
|
|
15
15
|
export const SDK_METADATA = {
|
|
16
16
|
language: "typescript",
|
|
17
17
|
openapiDocVersion: "0.1.0",
|
|
18
|
-
sdkVersion: "1.0.
|
|
18
|
+
sdkVersion: "1.0.5",
|
|
19
19
|
genVersion: "2.904.2",
|
|
20
|
-
userAgent: "speakeasy-sdk/typescript 1.0.
|
|
20
|
+
userAgent: "speakeasy-sdk/typescript 1.0.5 2.904.2 0.1.0 @quickshops/sdk",
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=config.js.map
|
package/esm/lib/sdks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdks.d.ts","sourceRoot":"","sources":["../../src/lib/sdks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAm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AG,GAAG,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF,qBAAa,SAAS;;IAIpB,SAAgB,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;IACrC,SAAgB,QAAQ,EAAE,UAAU,GAAG;QAAE,KAAK,CAAC,EAAE,QAAQ,CAAA;KAAE,CAAC;IAE5D,YAAY,OAAO,EAAE,UAAU,EA6B9B;IAEM,cAAc,CACnB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,aAAa,EACnB,OAAO,CAAC,EAAE,cAAc,GACvB,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,qBAAqB,CAAC,CAsI9D;IAEY,GAAG,CACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;QACP,OAAO,EAAE,WAAW,CAAC;QACrB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;QACnD,WAAW,EAAE,WAAW,CAAC;QACzB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,GACA,OAAO,CACR,MAAM,CACJ,QAAQ,EACN,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,GACf,qBAAqB,CACxB,CACF,CAsEA;CACF"}
|
package/esm/lib/sdks.js
CHANGED
|
@@ -9,6 +9,7 @@ import { stringToBase64 } from "./base64.js";
|
|
|
9
9
|
import { SDK_METADATA, serverURLFromOptions } from "./config.js";
|
|
10
10
|
import { encodeForm } from "./encodings.js";
|
|
11
11
|
import { env } from "./env.js";
|
|
12
|
+
import { formatHeaderForDebug } from "./url-policy.js";
|
|
12
13
|
import { HTTPClient, isAbortError, isConnectionError, isTimeoutError, matchContentType, } from "./http.js";
|
|
13
14
|
import { combineSignals } from "./primitives.js";
|
|
14
15
|
import { retry } from "./retries.js";
|
|
@@ -224,7 +225,7 @@ async function logRequest(logger, req) {
|
|
|
224
225
|
logger.group(`> Request: ${req.method} ${req.url}`);
|
|
225
226
|
logger.group("Headers:");
|
|
226
227
|
for (const [k, v] of req.headers.entries()) {
|
|
227
|
-
logger.log(`${k}: ${v}`);
|
|
228
|
+
logger.log(`${k}: ${formatHeaderForDebug(k, v)}`);
|
|
228
229
|
}
|
|
229
230
|
logger.groupEnd();
|
|
230
231
|
logger.group("Body:");
|
|
@@ -260,7 +261,7 @@ async function logResponse(logger, res, req) {
|
|
|
260
261
|
logger.log("Status Code:", res.status, res.statusText);
|
|
261
262
|
logger.group("Headers:");
|
|
262
263
|
for (const [k, v] of res.headers.entries()) {
|
|
263
|
-
logger.log(`${k}: ${v}`);
|
|
264
|
+
logger.log(`${k}: ${formatHeaderForDebug(k, v)}`);
|
|
264
265
|
}
|
|
265
266
|
logger.groupEnd();
|
|
266
267
|
logger.group("Body:");
|
package/esm/lib/sdks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdks.js","sourceRoot":"","sources":["../../src/lib/sdks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAc,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MA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KAAK,gBAAgB,CAAC,GAAG,EAAE,qBAAqB,CAAC,EAAE,CAAC;YAClD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;gBAC1B,MAAM,MAAM,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE,CAAC,CAAC;YAChC,CAAC;YACD,MAAM;QACR,CAAC;QACD;YACE,MAAM,CAAC,GAAG,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC;YAC/B,MAAM;IACV,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;IAElB,MAAM,CAAC,QAAQ,EAAE,CAAC;AAAA,CACnB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SDKOptions } from "./config.js";
|
|
2
|
+
export type TrustedUrlOptions = {
|
|
3
|
+
allowedHosts?: ReadonlySet<string> | readonly string[];
|
|
4
|
+
requireHttps?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function assertTrustedServerURL(serverURL: string, opts?: TrustedUrlOptions): void;
|
|
7
|
+
export declare function assertBearerAuthConfigured(options: SDKOptions): void;
|
|
8
|
+
export declare function validateQuickshopsOptions(options: SDKOptions): SDKOptions;
|
|
9
|
+
export declare function formatHeaderForDebug(name: string, value: string): string;
|
|
10
|
+
//# sourceMappingURL=url-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-policy.d.ts","sourceRoot":"","sources":["../../src/lib/url-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAS9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,MAAM,EAAE,CAAC;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAeF,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,iBAAiB,GACvB,IAAI,CAqBN;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAWpE;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,CAIzE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { env } from "./env.js";
|
|
2
|
+
const DEFAULT_ALLOWED_HOSTS = new Set([
|
|
3
|
+
"localhost",
|
|
4
|
+
"127.0.0.1",
|
|
5
|
+
"api.quickshops.app",
|
|
6
|
+
]);
|
|
7
|
+
function resolveAllowedHosts(opts) {
|
|
8
|
+
if (!opts?.allowedHosts) {
|
|
9
|
+
return DEFAULT_ALLOWED_HOSTS;
|
|
10
|
+
}
|
|
11
|
+
return new Set(opts.allowedHosts instanceof Set
|
|
12
|
+
? opts.allowedHosts
|
|
13
|
+
: opts.allowedHosts);
|
|
14
|
+
}
|
|
15
|
+
export function assertTrustedServerURL(serverURL, opts) {
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = new URL(serverURL);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
throw new Error("Invalid serverURL");
|
|
22
|
+
}
|
|
23
|
+
const nodeEnv = globalThis.process?.env?.["NODE_ENV"];
|
|
24
|
+
const requireHttps = opts?.requireHttps ?? nodeEnv === "production";
|
|
25
|
+
if (requireHttps && parsed.protocol !== "https:") {
|
|
26
|
+
throw new Error("serverURL must use https in production");
|
|
27
|
+
}
|
|
28
|
+
const allowedHosts = resolveAllowedHosts(opts);
|
|
29
|
+
if (!allowedHosts.has(parsed.hostname)) {
|
|
30
|
+
throw new Error(`serverURL host is not allowed: ${parsed.hostname}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function assertBearerAuthConfigured(options) {
|
|
34
|
+
const bearerAuth = options.bearerAuth ?? env().QUICKSHOPS_BEARER_AUTH;
|
|
35
|
+
if (typeof bearerAuth === "function") {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (typeof bearerAuth === "string" && bearerAuth.trim().length > 0) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
throw new Error("Missing bearerAuth. Set bearerAuth when creating Quickshops or QUICKSHOPS_BEARER_AUTH in the environment.");
|
|
42
|
+
}
|
|
43
|
+
export function validateQuickshopsOptions(options) {
|
|
44
|
+
assertTrustedServerURL(options.serverURL);
|
|
45
|
+
assertBearerAuthConfigured(options);
|
|
46
|
+
return options;
|
|
47
|
+
}
|
|
48
|
+
export function formatHeaderForDebug(name, value) {
|
|
49
|
+
const normalized = name.toLowerCase();
|
|
50
|
+
if (normalized === "authorization" ||
|
|
51
|
+
normalized === "cookie" ||
|
|
52
|
+
normalized === "set-cookie") {
|
|
53
|
+
return "<redacted>";
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=url-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-policy.js","sourceRoot":"","sources":["../../src/lib/url-policy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,WAAW;IACX,WAAW;IACX,oBAAoB;CACrB,CAAC,CAAC;AAOH,SAAS,mBAAmB,CAC1B,IAAwB,EACX;IACb,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC;QACxB,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,OAAO,IAAI,GA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AM,IAAI,KAAK,CACb,2GAA2G,CAC5G,CAAC;AAAA,CACH;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAmB,EAAc;IACzE,sBAAsB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1C,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC;AAAA,CAChB;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAa,EAAU;IACxE,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACtC,IACE,UAAU,KAAK,eAAe;QAC9B,UAAU,KAAK,QAAQ;QACvB,UAAU,KAAK,YAAY,EAC3B,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO,KAAK,CAAC;AAAA,CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-policy.test.d.ts","sourceRoot":"","sources":["../../src/lib/url-policy.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { assertBearerAuthConfigured, assertTrustedServerURL, formatHeaderForDebug, } from "./url-policy.js";
|
|
4
|
+
test("assertTrustedServerURL allows localhost", () => {
|
|
5
|
+
assert.doesNotThrow(() => assertTrustedServerURL("http://localhost:3006", { requireHttps: false }));
|
|
6
|
+
});
|
|
7
|
+
test("assertTrustedServerURL rejects unknown hosts", () => {
|
|
8
|
+
assert.throws(() => assertTrustedServerURL("https://evil.example", { requireHttps: false }), /not allowed/);
|
|
9
|
+
});
|
|
10
|
+
test("assertTrustedServerURL requires https in production mode", () => {
|
|
11
|
+
assert.throws(() => assertTrustedServerURL("http://api.quickshops.app", {
|
|
12
|
+
requireHttps: true,
|
|
13
|
+
}), /https/);
|
|
14
|
+
});
|
|
15
|
+
test("assertBearerAuthConfigured rejects missing auth", () => {
|
|
16
|
+
const options = {
|
|
17
|
+
serverURL: "http://localhost:3006",
|
|
18
|
+
};
|
|
19
|
+
assert.throws(() => assertBearerAuthConfigured(options), /Missing bearerAuth/);
|
|
20
|
+
});
|
|
21
|
+
test("formatHeaderForDebug redacts sensitive headers", () => {
|
|
22
|
+
assert.equal(formatHeaderForDebug("Authorization", "Bearer qk_secret"), "<redacted>");
|
|
23
|
+
assert.equal(formatHeaderForDebug("Accept", "application/json"), "application/json");
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=url-policy.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-policy.test.js","sourceRoot":"","sources":["../../src/lib/url-policy.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAGzB,IAAI,CAAC,yCAAyC,EAAE,GAAG,EAAE,CAAC;IACpD,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CACvB,sBAAsB,CAAC,uBAAuB,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CACzE,CAAC;AAAA,CACH,CAAC,CAAC;AAEH,IAAI,CAAC,8CAA8C,EAAE,GAAG,EAAE,CAAC;IACzD,MAAM,CAAC,MAAM,CACX,GAAG,EAAE,CAAC,sBAAsB,CAAC,sBAAsB,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,EAC7E,aAAa,CACd,CAAC;AAAA,CACH,CAAC,CAAC;AAEH,IAAI,CAAC,0DAA0D,EAAE,GAAG,EAAE,CAAC;IACrE,MAAM,CAAC,MAAM,CACX,GAAG,EAAE,CACH,sBAAsB,CAAC,2BAA2B,EAAE;QAClD,YAAY,EAAE,IAAI;KACnB,CAAC,EACJ,OAAO,CACR,CAAC;AAAA,CACH,CAAC,CAAC;AAEH,IAAI,CAAC,iDAAiD,EAAE,GAAG,EAAE,CAAC;IAC5D,MAAM,OAAO,GAAG;QACd,SAAS,EAAE,uBAAuB;KACd,CAAC;IAEvB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC;AAAA,CAChF,CAAC,CAAC;AAEH,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE,CAAC;IAC3D,MAAM,CAAC,KAAK,CACV,oBAAoB,CAAC,eAAe,EAAE,kBAAkB,CAAC,EACzD,YAAY,CACb,CAAC;IACF,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAAA,CACtF,CAAC,CAAC"}
|
|
@@ -5,7 +5,6 @@ export * from "./cart-get.js";
|
|
|
5
5
|
export * from "./cart-remove-line.js";
|
|
6
6
|
export * from "./cart-update-line.js";
|
|
7
7
|
export * from "./checkout-create-session.js";
|
|
8
|
-
export * from "./health-check.js";
|
|
9
8
|
export * from "./http-client-errors.js";
|
|
10
9
|
export * from "./products-get-all.js";
|
|
11
10
|
export * from "./products-get-by-id.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/errors/index.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/errors/index.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yCAAyC,CAAC"}
|
|
@@ -9,7 +9,6 @@ export * from "./cart-get.js";
|
|
|
9
9
|
export * from "./cart-remove-line.js";
|
|
10
10
|
export * from "./cart-update-line.js";
|
|
11
11
|
export * from "./checkout-create-session.js";
|
|
12
|
-
export * from "./health-check.js";
|
|
13
12
|
export * from "./http-client-errors.js";
|
|
14
13
|
export * from "./products-get-all.js";
|
|
15
14
|
export * from "./products-get-by-id.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/errors/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/errors/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yCAAyC,CAAC"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quickshops/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"author": "QuickShops",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,12 +50,15 @@
|
|
|
50
50
|
"scripts": {
|
|
51
51
|
"lint": "oxlint --max-warnings=0 --deny-warnings src/**/*.ts src/**/*.tsx",
|
|
52
52
|
"build": "tsgo",
|
|
53
|
-
"prepublishOnly": "npm run build"
|
|
53
|
+
"prepublishOnly": "npm run build",
|
|
54
|
+
"test": "node --import tsx --test tests/url-policy.test.ts"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {},
|
|
56
57
|
"devDependencies": {
|
|
58
|
+
"@types/node": "^22.13.10",
|
|
57
59
|
"@typescript/native-preview": "7.0.0-dev.20260302.1",
|
|
58
60
|
"oxlint": "^1.60.0",
|
|
61
|
+
"tsx": "^4.22.3",
|
|
59
62
|
"typescript": "~5.8.3"
|
|
60
63
|
},
|
|
61
64
|
"dependencies": {
|
|
@@ -8,7 +8,6 @@ import { matchStatusCode } from "../lib/http.js";
|
|
|
8
8
|
import * as M from "../lib/matchers.js";
|
|
9
9
|
import { compactMap } from "../lib/primitives.js";
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
11
|
import { pathToFunc } from "../lib/url.js";
|
|
13
12
|
import {
|
|
14
13
|
ConnectionError,
|
|
@@ -17,7 +16,6 @@ import {
|
|
|
17
16
|
RequestTimeoutError,
|
|
18
17
|
UnexpectedClientError,
|
|
19
18
|
} from "../models/errors/http-client-errors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
19
|
import { QuickshopsError } from "../models/errors/quickshops-error.js";
|
|
22
20
|
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
23
21
|
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
@@ -34,9 +32,6 @@ export function healthHealthCheck(
|
|
|
34
32
|
): APIPromise<
|
|
35
33
|
Result<
|
|
36
34
|
operations.HealthCheckResponse,
|
|
37
|
-
| errors.HealthCheckUnauthorizedError
|
|
38
|
-
| errors.HealthCheckForbiddenError
|
|
39
|
-
| errors.HealthCheckTooManyRequestsError
|
|
40
35
|
| QuickshopsError
|
|
41
36
|
| ResponseValidationError
|
|
42
37
|
| ConnectionError
|
|
@@ -60,9 +55,6 @@ async function $do(
|
|
|
60
55
|
[
|
|
61
56
|
Result<
|
|
62
57
|
operations.HealthCheckResponse,
|
|
63
|
-
| errors.HealthCheckUnauthorizedError
|
|
64
|
-
| errors.HealthCheckForbiddenError
|
|
65
|
-
| errors.HealthCheckTooManyRequestsError
|
|
66
58
|
| QuickshopsError
|
|
67
59
|
| ResponseValidationError
|
|
68
60
|
| ConnectionError
|
|
@@ -81,19 +73,15 @@ async function $do(
|
|
|
81
73
|
Accept: "application/json",
|
|
82
74
|
}));
|
|
83
75
|
|
|
84
|
-
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
85
|
-
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
86
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
87
|
-
|
|
88
76
|
const context = {
|
|
89
77
|
options: client._options,
|
|
90
78
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
91
79
|
operationID: "health.check",
|
|
92
80
|
oAuth2Scopes: null,
|
|
93
81
|
|
|
94
|
-
resolvedSecurity:
|
|
82
|
+
resolvedSecurity: null,
|
|
95
83
|
|
|
96
|
-
securitySource:
|
|
84
|
+
securitySource: null,
|
|
97
85
|
retryConfig: options?.retries
|
|
98
86
|
|| client._options.retryConfig
|
|
99
87
|
|| { strategy: "none" },
|
|
@@ -101,7 +89,7 @@ async function $do(
|
|
|
101
89
|
};
|
|
102
90
|
|
|
103
91
|
const requestRes = client._createRequest(context, {
|
|
104
|
-
security:
|
|
92
|
+
security: null,
|
|
105
93
|
method: "GET",
|
|
106
94
|
baseURL: options?.serverURL,
|
|
107
95
|
path: path,
|
|
@@ -126,15 +114,8 @@ async function $do(
|
|
|
126
114
|
}
|
|
127
115
|
const response = doResult.value;
|
|
128
116
|
|
|
129
|
-
const responseFields = {
|
|
130
|
-
HttpMeta: { Response: response, Request: req },
|
|
131
|
-
};
|
|
132
|
-
|
|
133
117
|
const [result] = await M.match<
|
|
134
118
|
operations.HealthCheckResponse,
|
|
135
|
-
| errors.HealthCheckUnauthorizedError
|
|
136
|
-
| errors.HealthCheckForbiddenError
|
|
137
|
-
| errors.HealthCheckTooManyRequestsError
|
|
138
119
|
| QuickshopsError
|
|
139
120
|
| ResponseValidationError
|
|
140
121
|
| ConnectionError
|
|
@@ -145,12 +126,9 @@ async function $do(
|
|
|
145
126
|
| SDKValidationError
|
|
146
127
|
>(
|
|
147
128
|
M.json(200, operations.HealthCheckResponse$inboundSchema),
|
|
148
|
-
M.jsonErr(401, errors.HealthCheckUnauthorizedError$inboundSchema),
|
|
149
|
-
M.jsonErr(403, errors.HealthCheckForbiddenError$inboundSchema),
|
|
150
|
-
M.jsonErr(429, errors.HealthCheckTooManyRequestsError$inboundSchema),
|
|
151
129
|
M.fail("4XX"),
|
|
152
130
|
M.fail("5XX"),
|
|
153
|
-
)(response, req
|
|
131
|
+
)(response, req);
|
|
154
132
|
if (!result.ok) {
|
|
155
133
|
return [result, { status: "complete", request: req, response }];
|
|
156
134
|
}
|
package/src/hooks/hooks.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { SDKOptions } from "../lib/config.js";
|
|
7
|
+
import { validateQuickshopsOptions } from "../lib/url-policy.js";
|
|
7
8
|
import { RequestInput } from "../lib/http.js";
|
|
8
9
|
import {
|
|
9
10
|
AfterErrorContext,
|
|
@@ -27,7 +28,11 @@ export class SDKHooks implements Hooks {
|
|
|
27
28
|
afterErrorHooks: AfterErrorHook[] = [];
|
|
28
29
|
|
|
29
30
|
constructor() {
|
|
30
|
-
const presetHooks: Array<Hook> = [
|
|
31
|
+
const presetHooks: Array<Hook> = [
|
|
32
|
+
{
|
|
33
|
+
sdkInit: (opts) => validateQuickshopsOptions(opts),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
31
36
|
|
|
32
37
|
for (const hook of presetHooks) {
|
|
33
38
|
if ("sdkInit" in hook) {
|
package/src/lib/config.ts
CHANGED
|
@@ -44,7 +44,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
44
44
|
export const SDK_METADATA = {
|
|
45
45
|
language: "typescript",
|
|
46
46
|
openapiDocVersion: "0.1.0",
|
|
47
|
-
sdkVersion: "1.0.
|
|
47
|
+
sdkVersion: "1.0.5",
|
|
48
48
|
genVersion: "2.904.2",
|
|
49
|
-
userAgent: "speakeasy-sdk/typescript 1.0.
|
|
49
|
+
userAgent: "speakeasy-sdk/typescript 1.0.5 2.904.2 0.1.0 @quickshops/sdk",
|
|
50
50
|
} as const;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { stringToBase64 } from "./base64.js";
|
|
|
17
17
|
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js";
|
|
18
18
|
import { encodeForm } from "./encodings.js";
|
|
19
19
|
import { env } from "./env.js";
|
|
20
|
+
import { formatHeaderForDebug } from "./url-policy.js";
|
|
20
21
|
import {
|
|
21
22
|
HTTPClient,
|
|
22
23
|
isAbortError,
|
|
@@ -361,7 +362,7 @@ async function logRequest(logger: Logger | undefined, req: Request) {
|
|
|
361
362
|
|
|
362
363
|
logger.group("Headers:");
|
|
363
364
|
for (const [k, v] of req.headers.entries()) {
|
|
364
|
-
logger.log(`${k}: ${v}`);
|
|
365
|
+
logger.log(`${k}: ${formatHeaderForDebug(k, v)}`);
|
|
365
366
|
}
|
|
366
367
|
logger.groupEnd();
|
|
367
368
|
|
|
@@ -407,7 +408,7 @@ async function logResponse(
|
|
|
407
408
|
|
|
408
409
|
logger.group("Headers:");
|
|
409
410
|
for (const [k, v] of res.headers.entries()) {
|
|
410
|
-
logger.log(`${k}: ${v}`);
|
|
411
|
+
logger.log(`${k}: ${formatHeaderForDebug(k, v)}`);
|
|
411
412
|
}
|
|
412
413
|
logger.groupEnd();
|
|
413
414
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { SDKOptions } from "./config.js";
|
|
2
|
+
import { env } from "./env.js";
|
|
3
|
+
|
|
4
|
+
const DEFAULT_ALLOWED_HOSTS = new Set([
|
|
5
|
+
"localhost",
|
|
6
|
+
"127.0.0.1",
|
|
7
|
+
"api.quickshops.app",
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
export type TrustedUrlOptions = {
|
|
11
|
+
allowedHosts?: ReadonlySet<string> | readonly string[];
|
|
12
|
+
requireHttps?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function resolveAllowedHosts(
|
|
16
|
+
opts?: TrustedUrlOptions,
|
|
17
|
+
): Set<string> {
|
|
18
|
+
if (!opts?.allowedHosts) {
|
|
19
|
+
return DEFAULT_ALLOWED_HOSTS;
|
|
20
|
+
}
|
|
21
|
+
return new Set(
|
|
22
|
+
opts.allowedHosts instanceof Set
|
|
23
|
+
? opts.allowedHosts
|
|
24
|
+
: opts.allowedHosts,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function assertTrustedServerURL(
|
|
29
|
+
serverURL: string,
|
|
30
|
+
opts?: TrustedUrlOptions,
|
|
31
|
+
): void {
|
|
32
|
+
let parsed: URL;
|
|
33
|
+
try {
|
|
34
|
+
parsed = new URL(serverURL);
|
|
35
|
+
} catch {
|
|
36
|
+
throw new Error("Invalid serverURL");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const nodeEnv = (
|
|
40
|
+
globalThis as { process?: { env?: Record<string, string | undefined> } }
|
|
41
|
+
).process?.env?.["NODE_ENV"];
|
|
42
|
+
const requireHttps = opts?.requireHttps ?? nodeEnv === "production";
|
|
43
|
+
|
|
44
|
+
if (requireHttps && parsed.protocol !== "https:") {
|
|
45
|
+
throw new Error("serverURL must use https in production");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const allowedHosts = resolveAllowedHosts(opts);
|
|
49
|
+
if (!allowedHosts.has(parsed.hostname)) {
|
|
50
|
+
throw new Error(`serverURL host is not allowed: ${parsed.hostname}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function assertBearerAuthConfigured(options: SDKOptions): void {
|
|
55
|
+
const bearerAuth = options.bearerAuth ?? env().QUICKSHOPS_BEARER_AUTH;
|
|
56
|
+
if (typeof bearerAuth === "function") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (typeof bearerAuth === "string" && bearerAuth.trim().length > 0) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
throw new Error(
|
|
63
|
+
"Missing bearerAuth. Set bearerAuth when creating Quickshops or QUICKSHOPS_BEARER_AUTH in the environment.",
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function validateQuickshopsOptions(options: SDKOptions): SDKOptions {
|
|
68
|
+
assertTrustedServerURL(options.serverURL);
|
|
69
|
+
assertBearerAuthConfigured(options);
|
|
70
|
+
return options;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function formatHeaderForDebug(name: string, value: string): string {
|
|
74
|
+
const normalized = name.toLowerCase();
|
|
75
|
+
if (
|
|
76
|
+
normalized === "authorization" ||
|
|
77
|
+
normalized === "cookie" ||
|
|
78
|
+
normalized === "set-cookie"
|
|
79
|
+
) {
|
|
80
|
+
return "<redacted>";
|
|
81
|
+
}
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
@@ -10,7 +10,6 @@ export * from "./cart-get.js";
|
|
|
10
10
|
export * from "./cart-remove-line.js";
|
|
11
11
|
export * from "./cart-update-line.js";
|
|
12
12
|
export * from "./checkout-create-session.js";
|
|
13
|
-
export * from "./health-check.js";
|
|
14
13
|
export * from "./http-client-errors.js";
|
|
15
14
|
export * from "./products-get-all.js";
|
|
16
15
|
export * from "./products-get-by-id.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import {
|
|
4
|
+
assertBearerAuthConfigured,
|
|
5
|
+
assertTrustedServerURL,
|
|
6
|
+
formatHeaderForDebug,
|
|
7
|
+
} from "../src/lib/url-policy.js";
|
|
8
|
+
import type { SDKOptions } from "../src/lib/config.js";
|
|
9
|
+
|
|
10
|
+
test("assertTrustedServerURL allows localhost", () => {
|
|
11
|
+
assert.doesNotThrow(() =>
|
|
12
|
+
assertTrustedServerURL("http://localhost:3006", { requireHttps: false }),
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test("assertTrustedServerURL rejects unknown hosts", () => {
|
|
17
|
+
assert.throws(
|
|
18
|
+
() => assertTrustedServerURL("https://evil.example", { requireHttps: false }),
|
|
19
|
+
/not allowed/,
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("assertTrustedServerURL requires https in production mode", () => {
|
|
24
|
+
assert.throws(
|
|
25
|
+
() =>
|
|
26
|
+
assertTrustedServerURL("http://api.quickshops.app", {
|
|
27
|
+
requireHttps: true,
|
|
28
|
+
}),
|
|
29
|
+
/https/,
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test("assertBearerAuthConfigured rejects missing auth", () => {
|
|
34
|
+
const options = {
|
|
35
|
+
serverURL: "http://localhost:3006",
|
|
36
|
+
} satisfies SDKOptions;
|
|
37
|
+
|
|
38
|
+
assert.throws(() => assertBearerAuthConfigured(options), /Missing bearerAuth/);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test("formatHeaderForDebug redacts sensitive headers", () => {
|
|
42
|
+
assert.equal(
|
|
43
|
+
formatHeaderForDebug("Authorization", "Bearer qk_secret"),
|
|
44
|
+
"<redacted>",
|
|
45
|
+
);
|
|
46
|
+
assert.equal(formatHeaderForDebug("Accept", "application/json"), "application/json");
|
|
47
|
+
});
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: 730679c37eb5
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as z from "zod/v4-mini";
|
|
7
|
-
import * as types from "../../types/primitives.js";
|
|
8
|
-
import { QuickshopsError } from "./quickshops-error.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Response for status 429
|
|
12
|
-
*/
|
|
13
|
-
export type HealthCheckTooManyRequestsErrorData = {
|
|
14
|
-
error: string;
|
|
15
|
-
code: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Response for status 429
|
|
20
|
-
*/
|
|
21
|
-
export class HealthCheckTooManyRequestsError extends QuickshopsError {
|
|
22
|
-
error: string;
|
|
23
|
-
code: string;
|
|
24
|
-
|
|
25
|
-
/** The original data that was passed to this error instance. */
|
|
26
|
-
data$: HealthCheckTooManyRequestsErrorData;
|
|
27
|
-
|
|
28
|
-
constructor(
|
|
29
|
-
err: HealthCheckTooManyRequestsErrorData,
|
|
30
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
31
|
-
) {
|
|
32
|
-
const message = "message" in err && typeof err.message === "string"
|
|
33
|
-
? err.message
|
|
34
|
-
: `API error occurred: ${JSON.stringify(err)}`;
|
|
35
|
-
super(message, httpMeta);
|
|
36
|
-
this.data$ = err;
|
|
37
|
-
this.error = err.error;
|
|
38
|
-
this.code = err.code;
|
|
39
|
-
|
|
40
|
-
this.name = "HealthCheckTooManyRequestsError";
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Response for status 403
|
|
46
|
-
*/
|
|
47
|
-
export type HealthCheckForbiddenErrorData = {
|
|
48
|
-
error: string;
|
|
49
|
-
code: string;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Response for status 403
|
|
54
|
-
*/
|
|
55
|
-
export class HealthCheckForbiddenError extends QuickshopsError {
|
|
56
|
-
error: string;
|
|
57
|
-
code: string;
|
|
58
|
-
|
|
59
|
-
/** The original data that was passed to this error instance. */
|
|
60
|
-
data$: HealthCheckForbiddenErrorData;
|
|
61
|
-
|
|
62
|
-
constructor(
|
|
63
|
-
err: HealthCheckForbiddenErrorData,
|
|
64
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
65
|
-
) {
|
|
66
|
-
const message = "message" in err && typeof err.message === "string"
|
|
67
|
-
? err.message
|
|
68
|
-
: `API error occurred: ${JSON.stringify(err)}`;
|
|
69
|
-
super(message, httpMeta);
|
|
70
|
-
this.data$ = err;
|
|
71
|
-
this.error = err.error;
|
|
72
|
-
this.code = err.code;
|
|
73
|
-
|
|
74
|
-
this.name = "HealthCheckForbiddenError";
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Response for status 401
|
|
80
|
-
*/
|
|
81
|
-
export type HealthCheckUnauthorizedErrorData = {
|
|
82
|
-
error: string;
|
|
83
|
-
code: string;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Response for status 401
|
|
88
|
-
*/
|
|
89
|
-
export class HealthCheckUnauthorizedError extends QuickshopsError {
|
|
90
|
-
error: string;
|
|
91
|
-
code: string;
|
|
92
|
-
|
|
93
|
-
/** The original data that was passed to this error instance. */
|
|
94
|
-
data$: HealthCheckUnauthorizedErrorData;
|
|
95
|
-
|
|
96
|
-
constructor(
|
|
97
|
-
err: HealthCheckUnauthorizedErrorData,
|
|
98
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
99
|
-
) {
|
|
100
|
-
const message = "message" in err && typeof err.message === "string"
|
|
101
|
-
? err.message
|
|
102
|
-
: `API error occurred: ${JSON.stringify(err)}`;
|
|
103
|
-
super(message, httpMeta);
|
|
104
|
-
this.data$ = err;
|
|
105
|
-
this.error = err.error;
|
|
106
|
-
this.code = err.code;
|
|
107
|
-
|
|
108
|
-
this.name = "HealthCheckUnauthorizedError";
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export const HealthCheckTooManyRequestsError$inboundSchema: z.ZodMiniType<
|
|
114
|
-
HealthCheckTooManyRequestsError,
|
|
115
|
-
unknown
|
|
116
|
-
> = z.pipe(
|
|
117
|
-
z.object({
|
|
118
|
-
error: types.string(),
|
|
119
|
-
code: types.string(),
|
|
120
|
-
request$: z.custom<Request>(x => x instanceof Request),
|
|
121
|
-
response$: z.custom<Response>(x => x instanceof Response),
|
|
122
|
-
body$: z.string(),
|
|
123
|
-
}),
|
|
124
|
-
z.transform((v) => {
|
|
125
|
-
return new HealthCheckTooManyRequestsError(v, {
|
|
126
|
-
request: v.request$,
|
|
127
|
-
response: v.response$,
|
|
128
|
-
body: v.body$,
|
|
129
|
-
});
|
|
130
|
-
}),
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
/** @internal */
|
|
134
|
-
export const HealthCheckForbiddenError$inboundSchema: z.ZodMiniType<
|
|
135
|
-
HealthCheckForbiddenError,
|
|
136
|
-
unknown
|
|
137
|
-
> = z.pipe(
|
|
138
|
-
z.object({
|
|
139
|
-
error: types.string(),
|
|
140
|
-
code: types.string(),
|
|
141
|
-
request$: z.custom<Request>(x => x instanceof Request),
|
|
142
|
-
response$: z.custom<Response>(x => x instanceof Response),
|
|
143
|
-
body$: z.string(),
|
|
144
|
-
}),
|
|
145
|
-
z.transform((v) => {
|
|
146
|
-
return new HealthCheckForbiddenError(v, {
|
|
147
|
-
request: v.request$,
|
|
148
|
-
response: v.response$,
|
|
149
|
-
body: v.body$,
|
|
150
|
-
});
|
|
151
|
-
}),
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
/** @internal */
|
|
155
|
-
export const HealthCheckUnauthorizedError$inboundSchema: z.ZodMiniType<
|
|
156
|
-
HealthCheckUnauthorizedError,
|
|
157
|
-
unknown
|
|
158
|
-
> = z.pipe(
|
|
159
|
-
z.object({
|
|
160
|
-
error: types.string(),
|
|
161
|
-
code: types.string(),
|
|
162
|
-
request$: z.custom<Request>(x => x instanceof Request),
|
|
163
|
-
response$: z.custom<Response>(x => x instanceof Response),
|
|
164
|
-
body$: z.string(),
|
|
165
|
-
}),
|
|
166
|
-
z.transform((v) => {
|
|
167
|
-
return new HealthCheckUnauthorizedError(v, {
|
|
168
|
-
request: v.request$,
|
|
169
|
-
response: v.response$,
|
|
170
|
-
body: v.body$,
|
|
171
|
-
});
|
|
172
|
-
}),
|
|
173
|
-
);
|