@envsync-cloud/envsync-management-ts-sdk 0.8.5

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 EnvSync Cloud
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,98 @@
1
+ # `@envsync-cloud/envsync-management-ts-sdk`
2
+
3
+ Private TypeScript SDK for the EnvSync Management API.
4
+
5
+ This package provides the generated fetch-based client, models, and service
6
+ types for interacting with the Enterprise management surface from browser or
7
+ server-side TypeScript applications.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @envsync-cloud/envsync-management-ts-sdk
13
+ ```
14
+
15
+ ```bash
16
+ bun add @envsync-cloud/envsync-management-ts-sdk
17
+ ```
18
+
19
+ ```bash
20
+ pnpm add @envsync-cloud/envsync-management-ts-sdk
21
+ ```
22
+
23
+ ## Basic Usage
24
+
25
+ ```ts
26
+ import { EnvSyncManagementAPISDK } from "@envsync-cloud/envsync-management-ts-sdk";
27
+
28
+ const sdk = new EnvSyncManagementAPISDK({
29
+ BASE: "https://manage-api.envsync.cloud",
30
+ WITH_CREDENTIALS: true,
31
+ CREDENTIALS: "include",
32
+ });
33
+
34
+ const status = await sdk.system.getManagementSystemStatus();
35
+
36
+ console.log(status.system.edition);
37
+ ```
38
+
39
+ ## Multi-Org Bearer Token Usage
40
+
41
+ If one identity belongs to multiple organizations, bearer-token clients can
42
+ select the org for a single request by sending `X-EnvSync-Org-Id`.
43
+
44
+ ```ts
45
+ import { EnvSyncManagementAPISDK } from "@envsync-cloud/envsync-management-ts-sdk";
46
+
47
+ const sdk = new EnvSyncManagementAPISDK({
48
+ BASE: "https://manage-api.envsync.cloud",
49
+ TOKEN: process.env.ENVSYNC_TOKEN,
50
+ HEADERS: async () => ({
51
+ "X-EnvSync-Org-Id": process.env.ENVSYNC_ORG_ID ?? "",
52
+ }),
53
+ });
54
+
55
+ const providers = await sdk.enterprise.listEnterpriseProviders();
56
+
57
+ console.log(providers.providers.length);
58
+ ```
59
+
60
+ Notes:
61
+
62
+ - `X-EnvSync-Org-Id` is honored only for bearer-token requests.
63
+ - Cookie-session clients should continue using `POST /api/auth/switch-org`.
64
+ - API-key requests ignore this header.
65
+
66
+ ## Runtime Notes
67
+
68
+ - The SDK uses the generated `fetch` client from `openapi-typescript-codegen`.
69
+ - It works in browser bundlers and modern Node runtimes that provide `fetch`.
70
+ - Configure the Management API base URL and auth or CSRF headers through the SDK config.
71
+
72
+ ## Exports
73
+
74
+ The package exports:
75
+
76
+ - `EnvSyncManagementAPISDK`
77
+ - `OpenAPI`
78
+ - `ApiError` and other core request types
79
+ - generated models and services from the EnvSync Management API OpenAPI spec
80
+
81
+ ## Regeneration
82
+
83
+ The source for this package is generated from the EnvSync Management API OpenAPI spec.
84
+
85
+ - Regenerate locally with `bun run generate:local`
86
+ - Build with `bun run build`
87
+
88
+ Do not hand-edit generated source under `src/`; regeneration will overwrite it.
89
+
90
+ ## Links
91
+
92
+ - Repository: https://github.com/EnvSync-Cloud/envsync
93
+ - Issues: https://github.com/EnvSync-Cloud/envsync/issues
94
+ - Monorepo docs: https://github.com/EnvSync-Cloud/envsync#readme
95
+
96
+ ## Releases
97
+
98
+ Private releases are published from monorepo tags in the form `vX.Y.Z`.