@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.
Files changed (297) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +846 -840
  7. package/client.js.map +1 -1
  8. package/client.mjs +846 -834
  9. package/client.mjs.map +1 -1
  10. package/core/api-promise.js +71 -68
  11. package/core/api-promise.js.map +1 -1
  12. package/core/api-promise.mjs +71 -64
  13. package/core/api-promise.mjs.map +1 -1
  14. package/core/error.js +5 -2
  15. package/core/error.js.map +1 -1
  16. package/core/error.mjs +5 -2
  17. package/core/error.mjs.map +1 -1
  18. package/core/pagination.js +56 -50
  19. package/core/pagination.js.map +1 -1
  20. package/core/pagination.mjs +56 -41
  21. package/core/pagination.mjs.map +1 -1
  22. package/core/streaming.js +212 -209
  23. package/core/streaming.js.map +1 -1
  24. package/core/streaming.mjs +212 -209
  25. package/core/streaming.mjs.map +1 -1
  26. package/helpers/beta/mcp.js +14 -19
  27. package/helpers/beta/mcp.js.map +1 -1
  28. package/helpers/beta/mcp.mjs +14 -13
  29. package/helpers/beta/mcp.mjs.map +1 -1
  30. package/internal/constants.js +1 -1
  31. package/internal/constants.js.map +1 -1
  32. package/internal/decoders/jsonl.js +27 -24
  33. package/internal/decoders/jsonl.js.map +1 -1
  34. package/internal/decoders/jsonl.mjs +27 -24
  35. package/internal/decoders/jsonl.mjs.map +1 -1
  36. package/internal/decoders/line.js +52 -49
  37. package/internal/decoders/line.js.map +1 -1
  38. package/internal/decoders/line.mjs +52 -43
  39. package/internal/decoders/line.mjs.map +1 -1
  40. package/internal/file-store.js +256 -258
  41. package/internal/file-store.js.map +1 -1
  42. package/internal/file-store.mjs +256 -243
  43. package/internal/file-store.mjs.map +1 -1
  44. package/internal/node.browser.d.mts.map +1 -1
  45. package/internal/node.browser.d.ts.map +1 -1
  46. package/internal/node.browser.js.map +1 -1
  47. package/internal/node.browser.mjs +7 -7
  48. package/internal/node.browser.mjs.map +1 -1
  49. package/internal/shim-types.js +0 -6
  50. package/internal/shim-types.js.map +1 -1
  51. package/internal/shim-types.mjs +0 -6
  52. package/internal/shim-types.mjs.map +1 -1
  53. package/internal/shims.js +0 -6
  54. package/internal/shims.js.map +1 -1
  55. package/internal/shims.mjs +0 -6
  56. package/internal/shims.mjs.map +1 -1
  57. package/internal/stainless-helper-header.js +6 -6
  58. package/internal/stainless-helper-header.js.map +1 -1
  59. package/internal/utils/async-queue.js +66 -63
  60. package/internal/utils/async-queue.js.map +1 -1
  61. package/internal/utils/async-queue.mjs +66 -56
  62. package/internal/utils/async-queue.mjs.map +1 -1
  63. package/internal/utils/bytes.d.mts +1 -1
  64. package/internal/utils/bytes.d.mts.map +1 -1
  65. package/internal/utils/bytes.d.ts +1 -1
  66. package/internal/utils/bytes.d.ts.map +1 -1
  67. package/lib/BetaMessageStream.js +593 -590
  68. package/lib/BetaMessageStream.js.map +1 -1
  69. package/lib/BetaMessageStream.mjs +593 -590
  70. package/lib/BetaMessageStream.mjs.map +1 -1
  71. package/lib/MessageStream.js +544 -541
  72. package/lib/MessageStream.js.map +1 -1
  73. package/lib/MessageStream.mjs +544 -541
  74. package/lib/MessageStream.mjs.map +1 -1
  75. package/lib/environments/poller.js +180 -174
  76. package/lib/environments/poller.js.map +1 -1
  77. package/lib/environments/poller.mjs +180 -153
  78. package/lib/environments/poller.mjs.map +1 -1
  79. package/lib/environments/worker.js +375 -369
  80. package/lib/environments/worker.js.map +1 -1
  81. package/lib/environments/worker.mjs +374 -329
  82. package/lib/environments/worker.mjs.map +1 -1
  83. package/lib/tools/BetaToolRunner.js +316 -313
  84. package/lib/tools/BetaToolRunner.js.map +1 -1
  85. package/lib/tools/BetaToolRunner.mjs +315 -306
  86. package/lib/tools/BetaToolRunner.mjs.map +1 -1
  87. package/lib/tools/SessionToolRunner.js +241 -235
  88. package/lib/tools/SessionToolRunner.js.map +1 -1
  89. package/lib/tools/SessionToolRunner.mjs +241 -192
  90. package/lib/tools/SessionToolRunner.mjs.map +1 -1
  91. package/lib/tools/ToolError.js +39 -36
  92. package/lib/tools/ToolError.js.map +1 -1
  93. package/lib/tools/ToolError.mjs +39 -13
  94. package/lib/tools/ToolError.mjs.map +1 -1
  95. package/package.json +3 -3
  96. package/resources/beta/agents/agents.js +135 -132
  97. package/resources/beta/agents/agents.js.map +1 -1
  98. package/resources/beta/agents/agents.mjs +135 -132
  99. package/resources/beta/agents/agents.mjs.map +1 -1
  100. package/resources/beta/beta.d.mts +5 -5
  101. package/resources/beta/beta.d.mts.map +1 -1
  102. package/resources/beta/beta.d.ts +5 -5
  103. package/resources/beta/beta.d.ts.map +1 -1
  104. package/resources/beta/beta.js +39 -36
  105. package/resources/beta/beta.js.map +1 -1
  106. package/resources/beta/beta.mjs +39 -36
  107. package/resources/beta/beta.mjs.map +1 -1
  108. package/resources/beta/dreams.d.mts +2 -28
  109. package/resources/beta/dreams.d.mts.map +1 -1
  110. package/resources/beta/dreams.d.ts +2 -28
  111. package/resources/beta/dreams.d.ts.map +1 -1
  112. package/resources/beta/environments/environments.js +157 -154
  113. package/resources/beta/environments/environments.js.map +1 -1
  114. package/resources/beta/environments/environments.mjs +157 -154
  115. package/resources/beta/environments/environments.mjs.map +1 -1
  116. package/resources/beta/environments/work.js +255 -252
  117. package/resources/beta/environments/work.js.map +1 -1
  118. package/resources/beta/environments/work.mjs +255 -252
  119. package/resources/beta/environments/work.mjs.map +1 -1
  120. package/resources/beta/index.d.mts +2 -2
  121. package/resources/beta/index.d.mts.map +1 -1
  122. package/resources/beta/index.d.ts +2 -2
  123. package/resources/beta/index.d.ts.map +1 -1
  124. package/resources/beta/index.js.map +1 -1
  125. package/resources/beta/index.mjs.map +1 -1
  126. package/resources/beta/memory-stores/memory-stores.js +150 -147
  127. package/resources/beta/memory-stores/memory-stores.js.map +1 -1
  128. package/resources/beta/memory-stores/memory-stores.mjs +150 -147
  129. package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
  130. package/resources/beta/messages/batches.d.mts +12 -1
  131. package/resources/beta/messages/batches.d.mts.map +1 -1
  132. package/resources/beta/messages/batches.d.ts +12 -1
  133. package/resources/beta/messages/batches.d.ts.map +1 -1
  134. package/resources/beta/messages/index.d.mts +1 -1
  135. package/resources/beta/messages/index.d.mts.map +1 -1
  136. package/resources/beta/messages/index.d.ts +1 -1
  137. package/resources/beta/messages/index.d.ts.map +1 -1
  138. package/resources/beta/messages/index.js.map +1 -1
  139. package/resources/beta/messages/index.mjs.map +1 -1
  140. package/resources/beta/messages/messages.d.mts +238 -100
  141. package/resources/beta/messages/messages.d.mts.map +1 -1
  142. package/resources/beta/messages/messages.d.ts +238 -100
  143. package/resources/beta/messages/messages.d.ts.map +1 -1
  144. package/resources/beta/messages/messages.js +113 -110
  145. package/resources/beta/messages/messages.js.map +1 -1
  146. package/resources/beta/messages/messages.mjs +113 -110
  147. package/resources/beta/messages/messages.mjs.map +1 -1
  148. package/resources/beta/models.d.mts +22 -1
  149. package/resources/beta/models.d.mts.map +1 -1
  150. package/resources/beta/models.d.ts +22 -1
  151. package/resources/beta/models.d.ts.map +1 -1
  152. package/resources/beta/organization/federation/federation.js +11 -8
  153. package/resources/beta/organization/federation/federation.js.map +1 -1
  154. package/resources/beta/organization/federation/federation.mjs +11 -8
  155. package/resources/beta/organization/federation/federation.mjs.map +1 -1
  156. package/resources/beta/organization/federation/rules/rules.js +187 -184
  157. package/resources/beta/organization/federation/rules/rules.js.map +1 -1
  158. package/resources/beta/organization/federation/rules/rules.mjs +187 -184
  159. package/resources/beta/organization/federation/rules/rules.mjs.map +1 -1
  160. package/resources/beta/organization/organization.js +38 -35
  161. package/resources/beta/organization/organization.js.map +1 -1
  162. package/resources/beta/organization/organization.mjs +38 -35
  163. package/resources/beta/organization/organization.mjs.map +1 -1
  164. package/resources/beta/organization/service-accounts/service-accounts.js +163 -160
  165. package/resources/beta/organization/service-accounts/service-accounts.js.map +1 -1
  166. package/resources/beta/organization/service-accounts/service-accounts.mjs +163 -160
  167. package/resources/beta/organization/service-accounts/service-accounts.mjs.map +1 -1
  168. package/resources/beta/organization/workspaces/workspaces.d.mts +3 -3
  169. package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
  170. package/resources/beta/organization/workspaces/workspaces.d.ts +3 -3
  171. package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
  172. package/resources/beta/organization/workspaces/workspaces.js +97 -94
  173. package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
  174. package/resources/beta/organization/workspaces/workspaces.mjs +97 -94
  175. package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
  176. package/resources/beta/sessions/events.d.mts +12 -21
  177. package/resources/beta/sessions/events.d.mts.map +1 -1
  178. package/resources/beta/sessions/events.d.ts +12 -21
  179. package/resources/beta/sessions/events.d.ts.map +1 -1
  180. package/resources/beta/sessions/events.js +118 -115
  181. package/resources/beta/sessions/events.js.map +1 -1
  182. package/resources/beta/sessions/events.mjs +118 -115
  183. package/resources/beta/sessions/events.mjs.map +1 -1
  184. package/resources/beta/sessions/resources.d.mts +0 -3
  185. package/resources/beta/sessions/resources.d.mts.map +1 -1
  186. package/resources/beta/sessions/resources.d.ts +0 -3
  187. package/resources/beta/sessions/resources.d.ts.map +1 -1
  188. package/resources/beta/sessions/sessions.d.mts +2 -2
  189. package/resources/beta/sessions/sessions.d.ts +2 -2
  190. package/resources/beta/sessions/sessions.js +161 -158
  191. package/resources/beta/sessions/sessions.js.map +1 -1
  192. package/resources/beta/sessions/sessions.mjs +161 -158
  193. package/resources/beta/sessions/sessions.mjs.map +1 -1
  194. package/resources/beta/sessions/threads/threads.js +86 -83
  195. package/resources/beta/sessions/threads/threads.js.map +1 -1
  196. package/resources/beta/sessions/threads/threads.mjs +86 -83
  197. package/resources/beta/sessions/threads/threads.mjs.map +1 -1
  198. package/resources/beta/skills/skills.js +104 -101
  199. package/resources/beta/skills/skills.js.map +1 -1
  200. package/resources/beta/skills/skills.mjs +104 -101
  201. package/resources/beta/skills/skills.mjs.map +1 -1
  202. package/resources/beta/tunnels/tunnels.js +188 -185
  203. package/resources/beta/tunnels/tunnels.js.map +1 -1
  204. package/resources/beta/tunnels/tunnels.mjs +188 -185
  205. package/resources/beta/tunnels/tunnels.mjs.map +1 -1
  206. package/resources/beta/user-profiles.d.mts +45 -0
  207. package/resources/beta/user-profiles.d.mts.map +1 -1
  208. package/resources/beta/user-profiles.d.ts +45 -0
  209. package/resources/beta/user-profiles.d.ts.map +1 -1
  210. package/resources/beta/user-profiles.js +25 -10
  211. package/resources/beta/user-profiles.js.map +1 -1
  212. package/resources/beta/user-profiles.mjs +25 -10
  213. package/resources/beta/user-profiles.mjs.map +1 -1
  214. package/resources/beta/vaults/credentials.d.mts +0 -14
  215. package/resources/beta/vaults/credentials.d.mts.map +1 -1
  216. package/resources/beta/vaults/credentials.d.ts +0 -14
  217. package/resources/beta/vaults/credentials.d.ts.map +1 -1
  218. package/resources/beta/vaults/vaults.js +156 -153
  219. package/resources/beta/vaults/vaults.js.map +1 -1
  220. package/resources/beta/vaults/vaults.mjs +156 -153
  221. package/resources/beta/vaults/vaults.mjs.map +1 -1
  222. package/resources/completions.d.mts +1 -1
  223. package/resources/completions.d.ts +1 -1
  224. package/resources/index.d.mts +1 -1
  225. package/resources/index.d.mts.map +1 -1
  226. package/resources/index.d.ts +1 -1
  227. package/resources/index.d.ts.map +1 -1
  228. package/resources/index.js.map +1 -1
  229. package/resources/index.mjs.map +1 -1
  230. package/resources/messages/index.d.mts +1 -1
  231. package/resources/messages/index.d.mts.map +1 -1
  232. package/resources/messages/index.d.ts +1 -1
  233. package/resources/messages/index.d.ts.map +1 -1
  234. package/resources/messages/index.js.map +1 -1
  235. package/resources/messages/index.mjs.map +1 -1
  236. package/resources/messages/messages.d.mts +100 -63
  237. package/resources/messages/messages.d.mts.map +1 -1
  238. package/resources/messages/messages.d.ts +100 -63
  239. package/resources/messages/messages.d.ts.map +1 -1
  240. package/resources/messages/messages.js +115 -112
  241. package/resources/messages/messages.js.map +1 -1
  242. package/resources/messages/messages.mjs +115 -112
  243. package/resources/messages/messages.mjs.map +1 -1
  244. package/resources/skills/skills.js +88 -85
  245. package/resources/skills/skills.js.map +1 -1
  246. package/resources/skills/skills.mjs +88 -85
  247. package/resources/skills/skills.mjs.map +1 -1
  248. package/resources/top-level.js +0 -1
  249. package/resources/top-level.js.map +1 -1
  250. package/resources/top-level.mjs +0 -1
  251. package/resources/top-level.mjs.map +1 -1
  252. package/src/client.ts +13 -1
  253. package/src/internal/node.browser.ts +7 -7
  254. package/src/internal/utils/bytes.ts +1 -1
  255. package/src/resources/beta/beta.ts +24 -1
  256. package/src/resources/beta/dreams.ts +2 -28
  257. package/src/resources/beta/index.ts +11 -0
  258. package/src/resources/beta/messages/batches.ts +13 -1
  259. package/src/resources/beta/messages/index.ts +10 -0
  260. package/src/resources/beta/messages/messages.ts +288 -99
  261. package/src/resources/beta/models.ts +25 -0
  262. package/src/resources/beta/organization/workspaces/workspaces.ts +3 -3
  263. package/src/resources/beta/sessions/events.ts +12 -21
  264. package/src/resources/beta/sessions/resources.ts +0 -3
  265. package/src/resources/beta/sessions/sessions.ts +2 -2
  266. package/src/resources/beta/user-profiles.ts +75 -10
  267. package/src/resources/beta/vaults/credentials.ts +0 -14
  268. package/src/resources/completions.ts +1 -1
  269. package/src/resources/index.ts +6 -0
  270. package/src/resources/messages/index.ts +6 -0
  271. package/src/resources/messages/messages.ts +128 -62
  272. package/src/tsconfig.json +13 -3
  273. package/src/version.ts +1 -1
  274. package/tools/agent-toolset/fs-util.js +0 -6
  275. package/tools/agent-toolset/fs-util.js.map +1 -1
  276. package/tools/agent-toolset/fs-util.mjs +0 -6
  277. package/tools/agent-toolset/fs-util.mjs.map +1 -1
  278. package/tools/agent-toolset/memories.js +4 -4
  279. package/tools/agent-toolset/memories.js.map +1 -1
  280. package/tools/agent-toolset/memories.mjs +2 -2
  281. package/tools/agent-toolset/memories.mjs.map +1 -1
  282. package/tools/agent-toolset/node.browser.js +12 -12
  283. package/tools/agent-toolset/node.browser.js.map +1 -1
  284. package/tools/agent-toolset/node.js +142 -139
  285. package/tools/agent-toolset/node.js.map +1 -1
  286. package/tools/agent-toolset/node.mjs +132 -125
  287. package/tools/agent-toolset/node.mjs.map +1 -1
  288. package/tools/agent-toolset/skills.js +5 -5
  289. package/tools/agent-toolset/skills.js.map +1 -1
  290. package/tools/agent-toolset/sync-interval.js +3 -3
  291. package/tools/agent-toolset/sync-interval.js.map +1 -1
  292. package/tools/memory/node.browser.js +2 -2
  293. package/tools/memory/node.browser.js.map +1 -1
  294. package/version.d.mts +1 -1
  295. package/version.d.ts +1 -1
  296. package/version.js +1 -1
  297. 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 class Rules extends APIResource {
8
- constructor() {
9
- super(...arguments);
10
- this.workspaces = new WorkspacesAPI.Workspaces(this._client);
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
- * **Requires an OAuth access token with the `org:admin` scope**, from
14
- * `ant auth login --scope org:admin` or a workload identity federation rule; Admin
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,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2MpF,CAAC;IAzMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE;YACvE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,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;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,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5B,8CAA8C,EAC9C,CAAA,UAA8B,CAAA,EAC9B;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,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;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CACL,gBAAwB,EACxB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,sCAAsC,gBAAgB,oBAAoB,EAAE;YACvG,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,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;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA0XD,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC"}
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;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AAC,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
- class Organization extends resource_1.APIResource {
25
- constructor() {
26
- super(...arguments);
27
- this.apiKeys = new APIKeysAPI.APIKeys(this._client);
28
- this.externalKeys = new ExternalKeysAPI.ExternalKeys(this._client);
29
- this.federation = new FederationAPI.Federation(this._client);
30
- this.invites = new InvitesAPI.Invites(this._client);
31
- this.serviceAccounts = new ServiceAccountsAPI.ServiceAccounts(this._client);
32
- this.users = new UsersAPI.Users(this._client);
33
- this.workspaces = new WorkspacesAPI.Workspaces(this._client);
34
- this.rateLimits = new RateLimitsAPI.RateLimits(this._client);
35
- this.complianceSettings = new ComplianceSettingsAPI.ComplianceSettings(this._client);
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
- * Retrieve information about the organization associated with the authenticated
39
- * API key.
40
- *
41
- * @example
42
- * ```ts
43
- * const betaOrganization =
44
- * await client.beta.organization.retrieve();
45
- * ```
46
- */
47
- retrieve(options) {
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;AAIjC,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,oBAAe,GAAuC,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3G,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;IAeJ,CAAC;IAbC;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AA1BD,oCA0BC;AAgCD,YAAY,CAAC,OAAO,GAAG,kBAAO,CAAC;AAC/B,YAAY,CAAC,YAAY,GAAG,4BAAY,CAAC;AACzC,YAAY,CAAC,UAAU,GAAG,uBAAU,CAAC;AACrC,YAAY,CAAC,OAAO,GAAG,iBAAO,CAAC;AAC/B,YAAY,CAAC,eAAe,GAAG,kCAAe,CAAC;AAC/C,YAAY,CAAC,KAAK,GAAG,aAAK,CAAC;AAC3B,YAAY,CAAC,UAAU,GAAG,uBAAU,CAAC;AACrC,YAAY,CAAC,UAAU,GAAG,wBAAU,CAAC;AACrC,YAAY,CAAC,kBAAkB,GAAG,wCAAkB,CAAC"}
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;;IAIjC,MAAa,YAAa,SAAQ,sBAAW;QAA7C;;YACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5F,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnE,oBAAe,GAAuC,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3G,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzD,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClF,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClF,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;QAeJ,CAAC;QAbC;;;;;;;;;WASG;QACH,QAAQ,CAAC,OAAwB;YAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;KACF;IAgCD,YAAY,CAAC,OAAO,GAAG,kBAAO,CAAC;IAC/B,YAAY,CAAC,YAAY,GAAG,4BAAY,CAAC;IACzC,YAAY,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 class Organization extends APIResource {
21
- constructor() {
22
- super(...arguments);
23
- this.apiKeys = new APIKeysAPI.APIKeys(this._client);
24
- this.externalKeys = new ExternalKeysAPI.ExternalKeys(this._client);
25
- this.federation = new FederationAPI.Federation(this._client);
26
- this.invites = new InvitesAPI.Invites(this._client);
27
- this.serviceAccounts = new ServiceAccountsAPI.ServiceAccounts(this._client);
28
- this.users = new UsersAPI.Users(this._client);
29
- this.workspaces = new WorkspacesAPI.Workspaces(this._client);
30
- this.rateLimits = new RateLimitsAPI.RateLimits(this._client);
31
- this.complianceSettings = new ComplianceSettingsAPI.ComplianceSettings(this._client);
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
- * Retrieve information about the organization associated with the authenticated
35
- * API key.
36
- *
37
- * @example
38
- * ```ts
39
- * const betaOrganization =
40
- * await client.beta.organization.retrieve();
41
- * ```
42
- */
43
- retrieve(options) {
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,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,YAAO,G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C,kBAAkB,GAAG,kBAAkB,CAAC"}
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;IAAN,MAAa,YAAa,SAAQ,WAAW;QAA7C;;YACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5F,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnE,oBAAe,GAAuC,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,O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