@suqo/sdk 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SUQO
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # @suqo/sdk
2
+
3
+ Server-side TypeScript SDK for the SUQO subscription management platform. Lets platform sellers integrate customers, subscriptions, and payments into their own apps without building raw API calls by hand.
4
+
5
+ > **Server-side only.** This SDK uses your full-access API key and must never be bundled into browser code.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @suqo/sdk
11
+ ```
12
+
13
+ ## Quickstart
14
+
15
+ ```ts
16
+ import { SuqoClient } from "@suqo/sdk";
17
+
18
+ // The key's prefix tells the SDK which environment to talk to — nothing else to configure.
19
+ const suqo = new SuqoClient({ apiKey: process.env.SUQO_API_KEY! });
20
+
21
+ const page = await suqo.products.list();
22
+ console.log(page.results);
23
+ ```
24
+
25
+ See [`authentication.md`](docs/user/authentication.md) for how the API key determines sandbox vs. live, and every topic below for the rest of the surface.
26
+
27
+ ## Docs
28
+
29
+ | Topic | Doc |
30
+ | ------------------------- | ---------------------------------------------------------------------- |
31
+ | Examples | [`examples/`](examples/) — runnable scripts against your own sandbox |
32
+ | Authentication | [`authentication.md`](docs/user/authentication.md) |
33
+ | Products | [`products.md`](docs/user/products.md) |
34
+ | Subscriptions | [`subscriptions.md`](docs/user/subscriptions.md) |
35
+ | Customers | [`customers.md`](docs/user/customers.md) |
36
+ | Webhooks | [`webhooks.md`](docs/user/webhooks.md) |
37
+ | Pagination | [`pagination.md`](docs/user/pagination.md) |
38
+ | Errors | [`errors.md`](docs/user/errors.md) |
39
+ | Rate limiting _(planned)_ | [`rate-limiting.md`](docs/user/rate-limiting.md) |
40
+ | Idempotency _(planned)_ | [`idempotency.md`](docs/user/idempotency.md) |
41
+
42
+ Every exported class and method also carries inline TSDoc — your editor will show it on hover without needing to open these files.
43
+
44
+ ## What's included
45
+
46
+ - **Dual build** — ESM + CommonJS + `.d.ts` via [`tsup`](https://tsup.egoist.dev) (`dist/index.js`, `index.cjs`, `index.d.ts`).
47
+ - **Strict TypeScript** — `strict`, `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`, `verbatimModuleSyntax`.
48
+ - **Tests** — [`vitest`](https://vitest.dev), including contract tests run against a mock server built from the same OpenAPI contract the SDK implements.
49
+ - **Lint/format** — ESLint (`no-explicit-any: error`) + Prettier.
50
+ - **Publish-ready** — `exports` map (import/require/types), `sideEffects: false`, `files: ["dist"]`, `engines.node >=18`, `prepublishOnly` gate.
51
+
52
+ ## Scripts
53
+
54
+ ```bash
55
+ npm install
56
+ npm run build # → dist/ (esm + cjs + d.ts)
57
+ npm run typecheck # tsc --noEmit
58
+ npm test # vitest
59
+ npm run lint
60
+ npm run format
61
+ ```
62
+
63
+ ## License
64
+
65
+ MIT — see [`LICENSE`](LICENSE).