@anthropic-ai/sdk 0.125.0 → 0.126.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/CHANGELOG.md +50 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +846 -840
- package/client.js.map +1 -1
- package/client.mjs +846 -834
- package/client.mjs.map +1 -1
- package/core/api-promise.js +71 -68
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +71 -64
- package/core/api-promise.mjs.map +1 -1
- package/core/error.js +5 -2
- package/core/error.js.map +1 -1
- package/core/error.mjs +5 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.js +56 -50
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +56 -41
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.js +212 -209
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +212 -209
- package/core/streaming.mjs.map +1 -1
- package/helpers/beta/mcp.js +14 -19
- package/helpers/beta/mcp.js.map +1 -1
- package/helpers/beta/mcp.mjs +14 -13
- package/helpers/beta/mcp.mjs.map +1 -1
- package/internal/constants.js +1 -1
- package/internal/constants.js.map +1 -1
- package/internal/decoders/jsonl.js +27 -24
- package/internal/decoders/jsonl.js.map +1 -1
- package/internal/decoders/jsonl.mjs +27 -24
- package/internal/decoders/jsonl.mjs.map +1 -1
- package/internal/decoders/line.js +52 -49
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +52 -43
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/file-store.js +256 -258
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +256 -243
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts.map +1 -1
- package/internal/node.browser.d.ts.map +1 -1
- package/internal/node.browser.js.map +1 -1
- package/internal/node.browser.mjs +7 -7
- package/internal/node.browser.mjs.map +1 -1
- package/internal/shim-types.js +0 -6
- package/internal/shim-types.js.map +1 -1
- package/internal/shim-types.mjs +0 -6
- package/internal/shim-types.mjs.map +1 -1
- package/internal/shims.js +0 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +0 -6
- package/internal/shims.mjs.map +1 -1
- package/internal/stainless-helper-header.js +6 -6
- package/internal/stainless-helper-header.js.map +1 -1
- package/internal/utils/async-queue.js +66 -63
- package/internal/utils/async-queue.js.map +1 -1
- package/internal/utils/async-queue.mjs +66 -56
- package/internal/utils/async-queue.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +1 -1
- package/internal/utils/bytes.d.mts.map +1 -1
- package/internal/utils/bytes.d.ts +1 -1
- package/internal/utils/bytes.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +593 -590
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +593 -590
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.js +544 -541
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +544 -541
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/environments/poller.js +180 -174
- package/lib/environments/poller.js.map +1 -1
- package/lib/environments/poller.mjs +180 -153
- package/lib/environments/poller.mjs.map +1 -1
- package/lib/environments/worker.js +375 -369
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +374 -329
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.js +316 -313
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +315 -306
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.js +241 -235
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +241 -192
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/lib/tools/ToolError.js +39 -36
- package/lib/tools/ToolError.js.map +1 -1
- package/lib/tools/ToolError.mjs +39 -13
- package/lib/tools/ToolError.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/beta/agents/agents.js +135 -132
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +135 -132
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +5 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +39 -36
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +39 -36
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/dreams.d.mts +2 -28
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +2 -28
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/environments/environments.js +157 -154
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs +157 -154
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/environments/work.js +255 -252
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +255 -252
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-stores.js +150 -147
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs +150 -147
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +12 -1
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +12 -1
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +238 -100
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +238 -100
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +113 -110
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +113 -110
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/models.d.mts +22 -1
- package/resources/beta/models.d.mts.map +1 -1
- package/resources/beta/models.d.ts +22 -1
- package/resources/beta/models.d.ts.map +1 -1
- package/resources/beta/organization/federation/federation.js +11 -8
- package/resources/beta/organization/federation/federation.js.map +1 -1
- package/resources/beta/organization/federation/federation.mjs +11 -8
- package/resources/beta/organization/federation/federation.mjs.map +1 -1
- package/resources/beta/organization/federation/rules/rules.js +187 -184
- package/resources/beta/organization/federation/rules/rules.js.map +1 -1
- package/resources/beta/organization/federation/rules/rules.mjs +187 -184
- package/resources/beta/organization/federation/rules/rules.mjs.map +1 -1
- package/resources/beta/organization/organization.js +38 -35
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +38 -35
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.js +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.js.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.mjs +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js +97 -94
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs +97 -94
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +12 -21
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +12 -21
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js +118 -115
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs +118 -115
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/resources.d.mts +0 -3
- package/resources/beta/sessions/resources.d.mts.map +1 -1
- package/resources/beta/sessions/resources.d.ts +0 -3
- package/resources/beta/sessions/resources.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +2 -2
- package/resources/beta/sessions/sessions.d.ts +2 -2
- package/resources/beta/sessions/sessions.js +161 -158
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs +161 -158
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.js +86 -83
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs +86 -83
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/skills/skills.js +104 -101
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +104 -101
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/tunnels/tunnels.js +188 -185
- package/resources/beta/tunnels/tunnels.js.map +1 -1
- package/resources/beta/tunnels/tunnels.mjs +188 -185
- package/resources/beta/tunnels/tunnels.mjs.map +1 -1
- package/resources/beta/user-profiles.d.mts +45 -0
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +45 -0
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/user-profiles.js +25 -10
- package/resources/beta/user-profiles.js.map +1 -1
- package/resources/beta/user-profiles.mjs +25 -10
- package/resources/beta/user-profiles.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +0 -14
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +0 -14
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js +156 -153
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs +156 -153
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/completions.d.mts +1 -1
- package/resources/completions.d.ts +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +100 -63
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +100 -63
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +115 -112
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +115 -112
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/skills/skills.js +88 -85
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +88 -85
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/top-level.js +0 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -1
- package/resources/top-level.mjs.map +1 -1
- package/src/client.ts +13 -1
- package/src/internal/node.browser.ts +7 -7
- package/src/internal/utils/bytes.ts +1 -1
- package/src/resources/beta/beta.ts +24 -1
- package/src/resources/beta/dreams.ts +2 -28
- package/src/resources/beta/index.ts +11 -0
- package/src/resources/beta/messages/batches.ts +13 -1
- package/src/resources/beta/messages/index.ts +10 -0
- package/src/resources/beta/messages/messages.ts +288 -99
- package/src/resources/beta/models.ts +25 -0
- package/src/resources/beta/organization/workspaces/workspaces.ts +3 -3
- package/src/resources/beta/sessions/events.ts +12 -21
- package/src/resources/beta/sessions/resources.ts +0 -3
- package/src/resources/beta/sessions/sessions.ts +2 -2
- package/src/resources/beta/user-profiles.ts +75 -10
- package/src/resources/beta/vaults/credentials.ts +0 -14
- package/src/resources/completions.ts +1 -1
- package/src/resources/index.ts +6 -0
- package/src/resources/messages/index.ts +6 -0
- package/src/resources/messages/messages.ts +128 -62
- package/src/tsconfig.json +13 -3
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.js +0 -6
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +0 -6
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.js +4 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +2 -2
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/node.browser.js +12 -12
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.js +142 -139
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +132 -125
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.js +5 -5
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/sync-interval.js +3 -3
- package/tools/agent-toolset/sync-interval.js.map +1 -1
- package/tools/memory/node.browser.js +2 -2
- package/tools/memory/node.browser.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,189 +4,192 @@ import { Workspaces, } from "./workspaces.mjs";
|
|
|
4
4
|
import { PageCursor } from "../../../../../core/pagination.mjs";
|
|
5
5
|
import { buildHeaders } from "../../../../../internal/headers.mjs";
|
|
6
6
|
import { path } from "../../../../../internal/utils/path.mjs";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export var Rules = /* @__PURE__ */ (() => {
|
|
8
|
+
class Rules extends APIResource {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.workspaces = new WorkspacesAPI.Workspaces(this._client);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
15
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
16
|
+
* API keys are not accepted. See
|
|
17
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
18
|
+
*
|
|
19
|
+
* Create a federation rule owned by your organization.
|
|
20
|
+
*
|
|
21
|
+
* The referenced issuer and the target service account must already exist in the
|
|
22
|
+
* same organization; invalid references are rejected with a 400 error. The
|
|
23
|
+
* workspace reference is validated. Membership is not checked at rule creation:
|
|
24
|
+
* token exchange resolves a single enabled workspace per call and is rejected
|
|
25
|
+
* unless the target service account is a member of that workspace (it is
|
|
26
|
+
* implicitly a member of the default workspace). Rules on well-known shared
|
|
27
|
+
* issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud, Google) must
|
|
28
|
+
* constrain tenant identity via an identity-bearing claim, a tenant-pinning
|
|
29
|
+
* subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition referencing one
|
|
30
|
+
* of those identity claims (e.g. `claims.repository_owner`). OAuth callers may
|
|
31
|
+
* only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
32
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const betaFederationRule =
|
|
37
|
+
* await client.beta.organization.federation.rules.create({
|
|
38
|
+
* issuer_id: 'issuer_id',
|
|
39
|
+
* match: {},
|
|
40
|
+
* name: 'x',
|
|
41
|
+
* oauth_scope: 'x',
|
|
42
|
+
* target: {
|
|
43
|
+
* service_account_id: 'svac_01SDCCSbTxrXDpWc1phhtcfK',
|
|
44
|
+
* type: 'service_account',
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
create(params, options) {
|
|
50
|
+
const { betas, ...body } = params;
|
|
51
|
+
return this._client.post('/v1/organizations/federation_rules?beta=true', {
|
|
52
|
+
body,
|
|
53
|
+
...options,
|
|
54
|
+
headers: buildHeaders([
|
|
55
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
56
|
+
options?.headers,
|
|
57
|
+
]),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
62
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
63
|
+
* API keys are not accepted. See
|
|
64
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
65
|
+
*
|
|
66
|
+
* Retrieve a federation rule by its ID (`fdrl_...`).
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const betaFederationRule =
|
|
71
|
+
* await client.beta.organization.federation.rules.retrieve(
|
|
72
|
+
* 'federation_rule_id',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
retrieve(federationRuleID, params = {}, options) {
|
|
77
|
+
const { betas } = params ?? {};
|
|
78
|
+
return this._client.get(path `/v1/organizations/federation_rules/${federationRuleID}?beta=true`, {
|
|
79
|
+
...options,
|
|
80
|
+
headers: buildHeaders([
|
|
81
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
82
|
+
options?.headers,
|
|
83
|
+
]),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
88
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
89
|
+
* API keys are not accepted. See
|
|
90
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
91
|
+
*
|
|
92
|
+
* Partially update a federation rule.
|
|
93
|
+
*
|
|
94
|
+
* `issuer_id` is immutable. `match` and `target` are replaced as whole objects
|
|
95
|
+
* when set. Referenced service accounts and workspaces must exist in your
|
|
96
|
+
* organization; invalid references are rejected with a 400 error. Archived rules
|
|
97
|
+
* cannot be updated; this returns 400. Create a new rule instead. Rules on
|
|
98
|
+
* well-known shared issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud,
|
|
99
|
+
* Google) must constrain tenant identity via an identity-bearing claim, a
|
|
100
|
+
* tenant-pinning subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition
|
|
101
|
+
* referencing one of those identity claims (e.g. `claims.repository_owner`). On
|
|
102
|
+
* these issuers the requirement is re-checked on every update; if an existing
|
|
103
|
+
* rule's stored match does not yet constrain tenant identity, any update (even a
|
|
104
|
+
* rename or description change) must also supply a conforming `match` in the same
|
|
105
|
+
* request. OAuth callers may only manage rules whose `oauth_scope` is
|
|
106
|
+
* `workspace:developer` or `workspace:inference`; other scopes require a Console
|
|
107
|
+
* session.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const betaFederationRule =
|
|
112
|
+
* await client.beta.organization.federation.rules.update(
|
|
113
|
+
* 'federation_rule_id',
|
|
114
|
+
* );
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
update(federationRuleID, params, options) {
|
|
118
|
+
const { betas, ...body } = params;
|
|
119
|
+
return this._client.post(path `/v1/organizations/federation_rules/${federationRuleID}?beta=true`, {
|
|
120
|
+
body,
|
|
121
|
+
...options,
|
|
122
|
+
headers: buildHeaders([
|
|
123
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
124
|
+
options?.headers,
|
|
125
|
+
]),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
130
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
131
|
+
* API keys are not accepted. See
|
|
132
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
133
|
+
*
|
|
134
|
+
* List federation rules in your organization.
|
|
135
|
+
*
|
|
136
|
+
* Optionally filter by issuer with `issuer_id`. Archived rules are excluded unless
|
|
137
|
+
* `include_archived=true`.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* // Automatically fetches more pages as needed.
|
|
142
|
+
* for await (const betaFederationRule of client.beta.organization.federation.rules.list()) {
|
|
143
|
+
* // ...
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
list(params = {}, options) {
|
|
148
|
+
const { betas, ...query } = params ?? {};
|
|
149
|
+
return this._client.getAPIList('/v1/organizations/federation_rules?beta=true', (PageCursor), {
|
|
150
|
+
query,
|
|
151
|
+
...options,
|
|
152
|
+
headers: buildHeaders([
|
|
153
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
154
|
+
options?.headers,
|
|
155
|
+
]),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
160
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
161
|
+
* API keys are not accepted. See
|
|
162
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
163
|
+
*
|
|
164
|
+
* Archive a federation rule.
|
|
165
|
+
*
|
|
166
|
+
* Token exchange through this rule stops immediately. Idempotent; re-archiving
|
|
167
|
+
* returns the rule with its original `archived_at`. Archiving clears the rule's
|
|
168
|
+
* workspace targeting (`workspace_id` and `workspace_ids` are emptied). Tokens
|
|
169
|
+
* already minted before archive remain valid until they expire. OAuth callers may
|
|
170
|
+
* only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
171
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* const betaFederationRule =
|
|
176
|
+
* await client.beta.organization.federation.rules.archive(
|
|
177
|
+
* 'federation_rule_id',
|
|
178
|
+
* );
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
archive(federationRuleID, params = {}, options) {
|
|
182
|
+
const { betas } = params ?? {};
|
|
183
|
+
return this._client.post(path `/v1/organizations/federation_rules/${federationRuleID}/archive?beta=true`, {
|
|
184
|
+
...options,
|
|
185
|
+
headers: buildHeaders([
|
|
186
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
187
|
+
options?.headers,
|
|
188
|
+
]),
|
|
189
|
+
});
|
|
190
|
+
}
|
|
11
191
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* API keys are not accepted. See
|
|
16
|
-
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
17
|
-
*
|
|
18
|
-
* Create a federation rule owned by your organization.
|
|
19
|
-
*
|
|
20
|
-
* The referenced issuer and the target service account must already exist in the
|
|
21
|
-
* same organization; invalid references are rejected with a 400 error. The
|
|
22
|
-
* workspace reference is validated. Membership is not checked at rule creation:
|
|
23
|
-
* token exchange resolves a single enabled workspace per call and is rejected
|
|
24
|
-
* unless the target service account is a member of that workspace (it is
|
|
25
|
-
* implicitly a member of the default workspace). Rules on well-known shared
|
|
26
|
-
* issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud, Google) must
|
|
27
|
-
* constrain tenant identity via an identity-bearing claim, a tenant-pinning
|
|
28
|
-
* subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition referencing one
|
|
29
|
-
* of those identity claims (e.g. `claims.repository_owner`). OAuth callers may
|
|
30
|
-
* only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
31
|
-
* `workspace:inference`; other scopes require a Console session.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const betaFederationRule =
|
|
36
|
-
* await client.beta.organization.federation.rules.create({
|
|
37
|
-
* issuer_id: 'issuer_id',
|
|
38
|
-
* match: {},
|
|
39
|
-
* name: 'x',
|
|
40
|
-
* oauth_scope: 'x',
|
|
41
|
-
* target: {
|
|
42
|
-
* service_account_id: 'svac_01SDCCSbTxrXDpWc1phhtcfK',
|
|
43
|
-
* type: 'service_account',
|
|
44
|
-
* },
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
create(params, options) {
|
|
49
|
-
const { betas, ...body } = params;
|
|
50
|
-
return this._client.post('/v1/organizations/federation_rules?beta=true', {
|
|
51
|
-
body,
|
|
52
|
-
...options,
|
|
53
|
-
headers: buildHeaders([
|
|
54
|
-
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
55
|
-
options?.headers,
|
|
56
|
-
]),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
61
|
-
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
62
|
-
* API keys are not accepted. See
|
|
63
|
-
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
64
|
-
*
|
|
65
|
-
* Retrieve a federation rule by its ID (`fdrl_...`).
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const betaFederationRule =
|
|
70
|
-
* await client.beta.organization.federation.rules.retrieve(
|
|
71
|
-
* 'federation_rule_id',
|
|
72
|
-
* );
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
retrieve(federationRuleID, params = {}, options) {
|
|
76
|
-
const { betas } = params ?? {};
|
|
77
|
-
return this._client.get(path `/v1/organizations/federation_rules/${federationRuleID}?beta=true`, {
|
|
78
|
-
...options,
|
|
79
|
-
headers: buildHeaders([
|
|
80
|
-
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
81
|
-
options?.headers,
|
|
82
|
-
]),
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
87
|
-
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
88
|
-
* API keys are not accepted. See
|
|
89
|
-
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
90
|
-
*
|
|
91
|
-
* Partially update a federation rule.
|
|
92
|
-
*
|
|
93
|
-
* `issuer_id` is immutable. `match` and `target` are replaced as whole objects
|
|
94
|
-
* when set. Referenced service accounts and workspaces must exist in your
|
|
95
|
-
* organization; invalid references are rejected with a 400 error. Archived rules
|
|
96
|
-
* cannot be updated; this returns 400. Create a new rule instead. Rules on
|
|
97
|
-
* well-known shared issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud,
|
|
98
|
-
* Google) must constrain tenant identity via an identity-bearing claim, a
|
|
99
|
-
* tenant-pinning subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition
|
|
100
|
-
* referencing one of those identity claims (e.g. `claims.repository_owner`). On
|
|
101
|
-
* these issuers the requirement is re-checked on every update; if an existing
|
|
102
|
-
* rule's stored match does not yet constrain tenant identity, any update (even a
|
|
103
|
-
* rename or description change) must also supply a conforming `match` in the same
|
|
104
|
-
* request. OAuth callers may only manage rules whose `oauth_scope` is
|
|
105
|
-
* `workspace:developer` or `workspace:inference`; other scopes require a Console
|
|
106
|
-
* session.
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```ts
|
|
110
|
-
* const betaFederationRule =
|
|
111
|
-
* await client.beta.organization.federation.rules.update(
|
|
112
|
-
* 'federation_rule_id',
|
|
113
|
-
* );
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
update(federationRuleID, params, options) {
|
|
117
|
-
const { betas, ...body } = params;
|
|
118
|
-
return this._client.post(path `/v1/organizations/federation_rules/${federationRuleID}?beta=true`, {
|
|
119
|
-
body,
|
|
120
|
-
...options,
|
|
121
|
-
headers: buildHeaders([
|
|
122
|
-
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
123
|
-
options?.headers,
|
|
124
|
-
]),
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
129
|
-
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
130
|
-
* API keys are not accepted. See
|
|
131
|
-
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
132
|
-
*
|
|
133
|
-
* List federation rules in your organization.
|
|
134
|
-
*
|
|
135
|
-
* Optionally filter by issuer with `issuer_id`. Archived rules are excluded unless
|
|
136
|
-
* `include_archived=true`.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```ts
|
|
140
|
-
* // Automatically fetches more pages as needed.
|
|
141
|
-
* for await (const betaFederationRule of client.beta.organization.federation.rules.list()) {
|
|
142
|
-
* // ...
|
|
143
|
-
* }
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
list(params = {}, options) {
|
|
147
|
-
const { betas, ...query } = params ?? {};
|
|
148
|
-
return this._client.getAPIList('/v1/organizations/federation_rules?beta=true', (PageCursor), {
|
|
149
|
-
query,
|
|
150
|
-
...options,
|
|
151
|
-
headers: buildHeaders([
|
|
152
|
-
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
153
|
-
options?.headers,
|
|
154
|
-
]),
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
159
|
-
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
160
|
-
* API keys are not accepted. See
|
|
161
|
-
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
162
|
-
*
|
|
163
|
-
* Archive a federation rule.
|
|
164
|
-
*
|
|
165
|
-
* Token exchange through this rule stops immediately. Idempotent; re-archiving
|
|
166
|
-
* returns the rule with its original `archived_at`. Archiving clears the rule's
|
|
167
|
-
* workspace targeting (`workspace_id` and `workspace_ids` are emptied). Tokens
|
|
168
|
-
* already minted before archive remain valid until they expire. OAuth callers may
|
|
169
|
-
* only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
170
|
-
* `workspace:inference`; other scopes require a Console session.
|
|
171
|
-
*
|
|
172
|
-
* @example
|
|
173
|
-
* ```ts
|
|
174
|
-
* const betaFederationRule =
|
|
175
|
-
* await client.beta.organization.federation.rules.archive(
|
|
176
|
-
* 'federation_rule_id',
|
|
177
|
-
* );
|
|
178
|
-
* ```
|
|
179
|
-
*/
|
|
180
|
-
archive(federationRuleID, params = {}, options) {
|
|
181
|
-
const { betas } = params ?? {};
|
|
182
|
-
return this._client.post(path `/v1/organizations/federation_rules/${federationRuleID}/archive?beta=true`, {
|
|
183
|
-
...options,
|
|
184
|
-
headers: buildHeaders([
|
|
185
|
-
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
186
|
-
options?.headers,
|
|
187
|
-
]),
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
Rules.Workspaces = Workspaces;
|
|
192
|
+
Rules.Workspaces = Workspaces;
|
|
193
|
+
return Rules;
|
|
194
|
+
})();
|
|
192
195
|
//# sourceMappingURL=rules.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.mjs","sourceRoot":"","sources":["../../../../../src/resources/beta/organization/federation/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,yCAAqC;AAE3D,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EAKL,UAAU,GACX,yBAAqB;AAEtB,OAAO,EAAE,UAAU,EAAsC,2CAAuC;AAChG,OAAO,EAAE,YAAY,EAAE,4CAAwC;AAE/D,OAAO,EAAE,IAAI,EAAE,+CAA2C;AAE1D,MAAM,
|
|
1
|
+
{"version":3,"file":"rules.mjs","sourceRoot":"","sources":["../../../../../src/resources/beta/organization/federation/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,yCAAqC;AAE3D,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EAKL,UAAU,GACX,yBAAqB;AAEtB,OAAO,EAAE,UAAU,EAAsC,2CAAuC;AAChG,OAAO,EAAE,YAAY,EAAE,4CAAwC;AAE/D,OAAO,EAAE,IAAI,EAAE,+CAA2C;AAE1D,MAAM;IAAN,MAAa,KAAM,SAAQ,WAAW;QAAtC;;YACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QA2MpF,CAAC;QAzMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAmCG;QACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;YACvD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;YAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE;gBACvE,IAAI;gBACJ,GAAG,OAAO;gBACV,OAAO,EAAE,YAAY,CAAC;oBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;oBACxF,OAAO,EAAE,OAAO;iBACjB,CAAC;aACH,CAAC,CAAC;QACL,CAAC;QAED;;;;;;;;;;;;;;;WAeG;QACH,QAAQ,CACN,gBAAwB,EACxB,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,CAAA,UAA8B,CAAA,EAC9B;gBACE,KAAK;gBACL,GAAG,OAAO;gBACV,OAAO,EAAE,YAAY,CAAC;oBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;oBACxF,OAAO,EAAE,OAAO;iBACjB,CAAC;aACH,CACF,CAAC;QACJ,CAAC;QAED;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,OAAO,CACL,gBAAwB,EACxB,SAA+C,EAAE,EACjD,OAAwB;YAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,sCAAsC,gBAAgB,oBAAoB,EAAE;gBACvG,GAAG,OAAO;gBACV,OAAO,EAAE,YAAY,CAAC;oBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;oBACxF,OAAO,EAAE,OAAO;iBACjB,CAAC;aACH,CAAC,CAAC;QACL,CAAC;KACF;IA0XD,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
|
@@ -21,41 +21,44 @@ const ServiceAccountsAPI = tslib_1.__importStar(require("./service-accounts/serv
|
|
|
21
21
|
const service_accounts_1 = require("./service-accounts/service-accounts.js");
|
|
22
22
|
const WorkspacesAPI = tslib_1.__importStar(require("./workspaces/workspaces.js"));
|
|
23
23
|
const workspaces_1 = require("./workspaces/workspaces.js");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
var Organization = /* @__PURE__ */ (() => {
|
|
25
|
+
class Organization extends resource_1.APIResource {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.apiKeys = new APIKeysAPI.APIKeys(this._client);
|
|
29
|
+
this.externalKeys = new ExternalKeysAPI.ExternalKeys(this._client);
|
|
30
|
+
this.federation = new FederationAPI.Federation(this._client);
|
|
31
|
+
this.invites = new InvitesAPI.Invites(this._client);
|
|
32
|
+
this.serviceAccounts = new ServiceAccountsAPI.ServiceAccounts(this._client);
|
|
33
|
+
this.users = new UsersAPI.Users(this._client);
|
|
34
|
+
this.workspaces = new WorkspacesAPI.Workspaces(this._client);
|
|
35
|
+
this.rateLimits = new RateLimitsAPI.RateLimits(this._client);
|
|
36
|
+
this.complianceSettings = new ComplianceSettingsAPI.ComplianceSettings(this._client);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve information about the organization associated with the authenticated
|
|
40
|
+
* API key.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const betaOrganization =
|
|
45
|
+
* await client.beta.organization.retrieve();
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
retrieve(options) {
|
|
49
|
+
return this._client.get('/v1/organizations/me?beta=true', options);
|
|
50
|
+
}
|
|
36
51
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return this._client.get('/v1/organizations/me?beta=true', options);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
52
|
+
Organization.APIKeys = api_keys_1.APIKeys;
|
|
53
|
+
Organization.ExternalKeys = external_keys_1.ExternalKeys;
|
|
54
|
+
Organization.Federation = federation_1.Federation;
|
|
55
|
+
Organization.Invites = invites_1.Invites;
|
|
56
|
+
Organization.ServiceAccounts = service_accounts_1.ServiceAccounts;
|
|
57
|
+
Organization.Users = users_1.Users;
|
|
58
|
+
Organization.Workspaces = workspaces_1.Workspaces;
|
|
59
|
+
Organization.RateLimits = rate_limits_1.RateLimits;
|
|
60
|
+
Organization.ComplianceSettings = compliance_settings_1.ComplianceSettings;
|
|
61
|
+
return Organization;
|
|
62
|
+
})();
|
|
51
63
|
exports.Organization = Organization;
|
|
52
|
-
Organization.APIKeys = api_keys_1.APIKeys;
|
|
53
|
-
Organization.ExternalKeys = external_keys_1.ExternalKeys;
|
|
54
|
-
Organization.Federation = federation_1.Federation;
|
|
55
|
-
Organization.Invites = invites_1.Invites;
|
|
56
|
-
Organization.ServiceAccounts = service_accounts_1.ServiceAccounts;
|
|
57
|
-
Organization.Users = users_1.Users;
|
|
58
|
-
Organization.Workspaces = workspaces_1.Workspaces;
|
|
59
|
-
Organization.RateLimits = rate_limits_1.RateLimits;
|
|
60
|
-
Organization.ComplianceSettings = compliance_settings_1.ComplianceSettings;
|
|
61
64
|
//# sourceMappingURL=organization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../src/resources/beta/organization/organization.ts"],"names":[],"mappings":";;;;AAAA,wDAAqD;AACrD,kEAAyC;AACzC,4CAWoB;AACpB,wFAA+D;AAC/D,kEAU+B;AAC/B,4EAAmD;AACnD,sDAeyB;AACzB,iEAAwC;AACxC,0CAOmB;AACnB,wEAA+C;AAC/C,kDAMuB;AACvB,6DAAoC;AACpC,sCAOiB;AACjB,kFAAyD;AACzD,2DAAqD;AACrD,mGAA0E;AAC1E,6EAU6C;AAC7C,kFAAyD;AACzD,2DAciC
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../src/resources/beta/organization/organization.ts"],"names":[],"mappings":";;;;AAAA,wDAAqD;AACrD,kEAAyC;AACzC,4CAWoB;AACpB,wFAA+D;AAC/D,kEAU+B;A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Y,CAAC,UAAU,GAAG,uBAAU,CAAC;IACrC,YAAY,CAAC,OAAO,GAAG,iBAAO,CAAC;IAC/B,YAAY,CAAC,eAAe,GAAG,kCAAe,CAAC;IAC/C,YAAY,CAAC,KAAK,GAAG,aAAK,CAAC;IAC3B,YAAY,CAAC,UAAU,GAAG,uBAAU,CAAC;IACrC,YAAY,CAAC,UAAU,GAAG,wBAAU,CAAC;IACrC,YAAY,CAAC,kBAAkB,GAAG,wCAAkB,CAAC;;;AAlErD,oCA0BC"}
|
|
@@ -17,40 +17,43 @@ import * as ServiceAccountsAPI from "./service-accounts/service-accounts.mjs";
|
|
|
17
17
|
import { ServiceAccounts, } from "./service-accounts/service-accounts.mjs";
|
|
18
18
|
import * as WorkspacesAPI from "./workspaces/workspaces.mjs";
|
|
19
19
|
import { Workspaces, } from "./workspaces/workspaces.mjs";
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
export var Organization = /* @__PURE__ */ (() => {
|
|
21
|
+
class Organization extends APIResource {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.apiKeys = new APIKeysAPI.APIKeys(this._client);
|
|
25
|
+
this.externalKeys = new ExternalKeysAPI.ExternalKeys(this._client);
|
|
26
|
+
this.federation = new FederationAPI.Federation(this._client);
|
|
27
|
+
this.invites = new InvitesAPI.Invites(this._client);
|
|
28
|
+
this.serviceAccounts = new ServiceAccountsAPI.ServiceAccounts(this._client);
|
|
29
|
+
this.users = new UsersAPI.Users(this._client);
|
|
30
|
+
this.workspaces = new WorkspacesAPI.Workspaces(this._client);
|
|
31
|
+
this.rateLimits = new RateLimitsAPI.RateLimits(this._client);
|
|
32
|
+
this.complianceSettings = new ComplianceSettingsAPI.ComplianceSettings(this._client);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Retrieve information about the organization associated with the authenticated
|
|
36
|
+
* API key.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const betaOrganization =
|
|
41
|
+
* await client.beta.organization.retrieve();
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
retrieve(options) {
|
|
45
|
+
return this._client.get('/v1/organizations/me?beta=true', options);
|
|
46
|
+
}
|
|
32
47
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return this._client.get('/v1/organizations/me?beta=true', options);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
Organization.APIKeys = APIKeys;
|
|
48
|
-
Organization.ExternalKeys = ExternalKeys;
|
|
49
|
-
Organization.Federation = Federation;
|
|
50
|
-
Organization.Invites = Invites;
|
|
51
|
-
Organization.ServiceAccounts = ServiceAccounts;
|
|
52
|
-
Organization.Users = Users;
|
|
53
|
-
Organization.Workspaces = Workspaces;
|
|
54
|
-
Organization.RateLimits = RateLimits;
|
|
55
|
-
Organization.ComplianceSettings = ComplianceSettings;
|
|
48
|
+
Organization.APIKeys = APIKeys;
|
|
49
|
+
Organization.ExternalKeys = ExternalKeys;
|
|
50
|
+
Organization.Federation = Federation;
|
|
51
|
+
Organization.Invites = Invites;
|
|
52
|
+
Organization.ServiceAccounts = ServiceAccounts;
|
|
53
|
+
Organization.Users = Users;
|
|
54
|
+
Organization.Workspaces = Workspaces;
|
|
55
|
+
Organization.RateLimits = RateLimits;
|
|
56
|
+
Organization.ComplianceSettings = ComplianceSettings;
|
|
57
|
+
return Organization;
|
|
58
|
+
})();
|
|
56
59
|
//# sourceMappingURL=organization.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.mjs","sourceRoot":"","sources":["../../../src/resources/beta/organization/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,UAAU,uBAAmB;AACzC,OAAO,EAGL,OAAO,GAQR,uBAAmB;AACpB,OAAO,KAAK,qBAAqB,kCAA8B;AAC/D,OAAO,EASL,kBAAkB,GACnB,kCAA8B;AAC/B,OAAO,KAAK,eAAe,4BAAwB;AACnD,OAAO,EAcL,YAAY,GACb,4BAAwB;AACzB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAML,OAAO,GACR,sBAAkB;AACnB,OAAO,KAAK,aAAa,0BAAsB;AAC/C,OAAO,EAKL,UAAU,GACX,0BAAsB;AACvB,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAML,KAAK,GACN,oBAAgB;AACjB,OAAO,KAAK,aAAa,oCAAgC;AACzD,OAAO,EAAE,UAAU,EAAE,oCAAgC;AACrD,OAAO,KAAK,kBAAkB,gDAA4C;AAC1E,OAAO,EASL,eAAe,GAChB,gDAA4C;AAC7C,OAAO,KAAK,aAAa,oCAAgC;AACzD,OAAO,EAaL,UAAU,GACX,oCAAgC;AAIjC,MAAM,
|
|
1
|
+
{"version":3,"file":"organization.mjs","sourceRoot":"","sources":["../../../src/resources/beta/organization/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,UAAU,uBAAmB;AACzC,OAAO,EAGL,OAAO,GAQR,uBAAmB;AACpB,OAAO,KAAK,qBAAqB,kCAA8B;AAC/D,OAAO,EASL,kBAAkB,GACnB,kCAA8B;AAC/B,OAAO,KAAK,eAAe,4BAAwB;AACnD,OAAO,EAcL,YAAY,GACb,4BAAwB;AACzB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAML,OAAO,GACR,sBAAkB;AACnB,OAAO,KAAK,aAAa,0BAAsB;AAC/C,OAAO,EAKL,UAAU,GACX,0BAAsB;AACvB,OAAO,KAAK,QAAQ,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