@shuffl/sdk 0.7.6 → 0.7.8

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 CHANGED
@@ -10,7 +10,7 @@ The package is ESM-only and ships its own types. It installs `@shuffl/api-contra
10
10
 
11
11
  Create an API key in **Settings → API keys**. The key is bound to one team and the issuing user's current permissions, and expires within 30 days. There is one kind of API key: the same key works for the SDK, CLI, HTTP API and, when it carries the `mcp.knowledge` permission, the MCP server.
12
12
 
13
- Choose exact endpoint permissions such as `users.list` and `groups.save`, grouped by resource and Read/Write. Discover them with `shuffl.permissions.list()`. A write grant does not imply reads or sibling operations. See [endpoint permissions and delegation](https://shuffl-rebuild.vercel.app/docs/api-permissions).
13
+ Choose exact endpoint permissions such as `users.list` and `groups.save`, grouped by resource and Read/Write. Discover them with `shuffl.permissions.list()`. A write grant does not imply reads or sibling operations. See [endpoint permissions and delegation](https://shuffl.ai/docs/api-permissions).
14
14
 
15
15
  ```ts
16
16
  import { Shuffl } from '@shuffl/sdk';
@@ -28,11 +28,11 @@ const preview = await shuffl.programs.preview({
28
28
  });
29
29
  ```
30
30
 
31
- `new Shuffl` takes a workspace key or a company key and reads its prefix to tell them apart. Pass `baseUrl` (the application origin, without `/api/v1`) only to reach a server other than production, such as `http://localhost:3000` in development.
31
+ `new Shuffl` takes a workspace key or a company key and reads its prefix to tell them apart. Pass `baseUrl` (the application origin, without `/api/v1`) only to reach a server other than production, such as `http://localhost:3000` in development. Production defaults to `https://shuffl.ai`. If you previously set the old Vercel host explicitly, update that setting; the SDK refuses redirects to protect credentials.
32
32
 
33
33
  `users` means people in the team directory, including people who have no web login. IDs are Shuffl person IDs, not Slack IDs or authentication account IDs.
34
34
 
35
- A team key never gains company scope; company settings have their own key and live under `shuffl.company`, below. See the [permission reference](https://shuffl-rebuild.vercel.app/docs/api-permissions) for every method. Input and output types come directly from the portable public oRPC contract.
35
+ A team key never gains company scope; company settings have their own key and live under `shuffl.company`, below. See the [permission reference](https://shuffl.ai/docs/api-permissions) for every method. Input and output types come directly from the portable public oRPC contract.
36
36
 
37
37
  ## What the client covers
38
38
 
@@ -52,7 +52,7 @@ Dates in the public API are ISO strings. Directory lists use an opaque cursor an
52
52
  new Shuffl({ apiKey: async () => credentialStore.read() });
53
53
  ```
54
54
 
55
- Every request carries an `x-shuffl-client` header naming the SDK release (`shuffl-sdk/0.7.6`; the CLI adds `shuffl-cli/0.7.6`), so Shuffl can count requests by release. Pass `client: 'billing-sync/1.2.0'` to put your app's name in front; Shuffl never stores that part.
55
+ Every request carries an `x-shuffl-client` header naming the SDK release (`shuffl-sdk/0.7.7`; the CLI adds `shuffl-cli/0.7.7`), so Shuffl can count requests by release. Pass `client: 'billing-sync/1.2.0'` to put your app's name in front; Shuffl never stores that part.
56
56
 
57
57
  Use `ORPCError.code` for errors (`UNAUTHORIZED`, `FORBIDDEN`, `BAD_REQUEST`, `NOT_FOUND`, `CONFLICT`, and others). Calls accept oRPC's second options argument, including an abort signal. HTTPS is required except on loopback; redirects are refused to avoid forwarding credentials to another origin. The public API currently allows same-origin browser calls and server/CLI clients; cross-origin browser CORS is not enabled.
58
58
 
@@ -112,9 +112,9 @@ const page = await shuffl.company.members.list({ limit: 100 });
112
112
  await shuffl.company.members.remove({ userId: page.items[0]!.userId });
113
113
  ```
114
114
 
115
- `shuffl.company.current()` returns the key's company and grants. Every other method needs its grant: `company.details`, `company.workspaces.list`, `company.members.list`, `company.emailDomains.list`, `company.slack.list`, `company.rename`, `company.workspaces.setDefault` and `company.members.remove`. `members.list` pages with `limit` and `cursor` like `users.list`. Company writes run once when called and take no `requestKey`. A company key can't call the workspace methods, and a workspace key can't call `shuffl.company`; the SDK refuses the wrong kind with `UNAUTHORIZED` before sending a request. See [company keys](https://shuffl-rebuild.vercel.app/docs/api-permissions#company-keys).
115
+ `shuffl.company.current()` returns the key's company and grants. Every other method needs its grant: `company.details`, `company.workspaces.list`, `company.members.list`, `company.emailDomains.list`, `company.slack.list`, `company.rename`, `company.workspaces.setDefault` and `company.members.remove`. `members.list` pages with `limit` and `cursor` like `users.list`. Company writes run once when called and take no `requestKey`. A company key can't call the workspace methods, and a workspace key can't call `shuffl.company`; the SDK refuses the wrong kind with `UNAUTHORIZED` before sending a request. See [company keys](https://shuffl.ai/docs/api-permissions#company-keys).
116
116
 
117
- Full guide: [Use the SDK and HTTP API](https://shuffl-rebuild.vercel.app/docs/sdk).
117
+ Full guide: [Use the SDK and HTTP API](https://shuffl.ai/docs/sdk).
118
118
 
119
119
  ## License
120
120
 
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ function clientHeader(client) {
18
18
  throw new Error('client is a short name/version, such as billing-sync/1.2.0.');
19
19
  return `${name} ${own}`;
20
20
  }
21
- const defaultBaseUrl = 'https://shuffl-rebuild.vercel.app';
21
+ const defaultBaseUrl = 'https://shuffl.ai';
22
22
  const companyKeyPrefix = 'shuffl_company_';
23
23
  function origin(baseUrl) {
24
24
  const base = new URL(baseUrl);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const sdkVersion = "0.7.6";
1
+ export declare const sdkVersion = "0.7.8";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // The published version, sent in the x-shuffl-client header so Shuffl can
2
2
  // tell which SDK release calls it. `bun sdk:version X.Y.Z` writes it.
3
- export const sdkVersion = '0.7.6';
3
+ export const sdkVersion = '0.7.8';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "dependencies": {
3
3
  "@orpc/client": "1.15.3",
4
4
  "@orpc/contract": "1.15.3",
5
- "@shuffl/api-contracts": "0.7.6"
5
+ "@shuffl/api-contracts": "0.7.8"
6
6
  },
7
7
  "description": "TypeScript client for the Shuffl API: people, groups, knowledge, playbooks, programs and management commands.",
8
8
  "engines": {
@@ -19,7 +19,7 @@
19
19
  "LICENSE",
20
20
  "README.md"
21
21
  ],
22
- "homepage": "https://shuffl-rebuild.vercel.app/docs/sdk",
22
+ "homepage": "https://shuffl.ai/docs/sdk",
23
23
  "keywords": [
24
24
  "shuffl",
25
25
  "sdk",
@@ -34,5 +34,5 @@
34
34
  "sideEffects": false,
35
35
  "type": "module",
36
36
  "types": "./dist/index.d.ts",
37
- "version": "0.7.6"
37
+ "version": "0.7.8"
38
38
  }