@terrantula/sdk 0.6.0 → 0.7.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.
@@ -132,7 +132,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
132
132
  id: z.string().describe("Organization ID")
133
133
  }),
134
134
  async (params) => callPersonalTokens(
135
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${params.id}/personal-tokens`)
135
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/personal-tokens`)
136
136
  )
137
137
  ),
138
138
  createPersonalToken: withSchema(
@@ -144,7 +144,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
144
144
  async (params) => {
145
145
  const { id, ...body } = params;
146
146
  return callPersonalTokens(
147
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${id}/personal-tokens`, {
147
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${id}/personal-tokens`, {
148
148
  method: "POST",
149
149
  headers: { "Content-Type": "application/json" },
150
150
  body: JSON.stringify(body)
@@ -161,7 +161,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
161
161
  await personalTokensRequest(
162
162
  baseUrl,
163
163
  hcOpts,
164
- `/api/orgs/${params.id}/personal-tokens/${params.tokenId}`,
164
+ `/orgs/${params.id}/personal-tokens/${params.tokenId}`,
165
165
  { method: "DELETE" }
166
166
  )
167
167
  )
@@ -171,7 +171,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
171
171
  id: z.string().describe("Organization ID")
172
172
  }),
173
173
  async (params) => callPersonalTokens(
174
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${params.id}/sso-extras`)
174
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/sso-extras`)
175
175
  )
176
176
  ),
177
177
  setSsoForce: withSchema(
@@ -184,7 +184,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
184
184
  await personalTokensRequest(
185
185
  baseUrl,
186
186
  hcOpts,
187
- `/api/orgs/${params.id}/sso-extras/${params.providerId}`,
187
+ `/orgs/${params.id}/sso-extras/${params.providerId}`,
188
188
  {
189
189
  method: "PATCH",
190
190
  headers: { "Content-Type": "application/json" },
@@ -310,7 +310,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
310
310
  }),
311
311
  (params) => call(
312
312
  hc(
313
- `${baseUrl}/api/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
313
+ `${baseUrl}/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
314
314
  hcOpts
315
315
  ).index.$get()
316
316
  )
@@ -331,7 +331,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
331
331
  const { orgId, projectId, ...body } = params;
332
332
  return call(
333
333
  hc(
334
- `${baseUrl}/api/orgs/${orgId}/projects/${projectId}/tokens`,
334
+ `${baseUrl}/orgs/${orgId}/projects/${projectId}/tokens`,
335
335
  hcOpts
336
336
  ).index.$post({ json: body })
337
337
  );
@@ -345,7 +345,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
345
345
  }),
346
346
  (params) => call(
347
347
  hc(
348
- `${baseUrl}/api/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
348
+ `${baseUrl}/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
349
349
  hcOpts
350
350
  )[":tokenId"].$delete({ param: { tokenId: params.tokenId } })
351
351
  )
@@ -362,7 +362,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
362
362
  projectId: z2.string().describe("Project ID to nuke")
363
363
  }),
364
364
  async (params) => {
365
- const url = `${baseUrl}/api/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
365
+ const url = `${baseUrl}/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
366
366
  const fetchImpl = hcOpts?.fetch ?? fetch;
367
367
  const rawHeaders = hcOpts?.headers;
368
368
  const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
@@ -1507,7 +1507,7 @@ function createGraphViewsClient(proj) {
1507
1507
  import { z as z16 } from "zod";
1508
1508
  import { hc as hc2 } from "hono/client";
1509
1509
  function createNotificationsClient(baseUrl, hcOpts) {
1510
- const c = hc2(`${baseUrl}/api/notifications`, hcOpts);
1510
+ const c = hc2(`${baseUrl}/notifications`, hcOpts);
1511
1511
  return {
1512
1512
  list: withSchema(
1513
1513
  z16.object({
@@ -1564,7 +1564,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1564
1564
  getConfig: withSchema(
1565
1565
  z17.object({ orgId: z17.string().describe("Organization ID") }),
1566
1566
  async (params) => callRaw(
1567
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${params.orgId}/audit-export/config`)
1567
+ await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
1568
1568
  )
1569
1569
  ),
1570
1570
  /** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
@@ -1579,7 +1579,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1579
1579
  async (params) => {
1580
1580
  const { orgId, ...body } = params;
1581
1581
  return callRaw(
1582
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${orgId}/audit-export/config`, {
1582
+ await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/config`, {
1583
1583
  method: "POST",
1584
1584
  headers: { "Content-Type": "application/json" },
1585
1585
  body: JSON.stringify(body)
@@ -1598,7 +1598,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1598
1598
  async (params) => {
1599
1599
  const { orgId, ...body } = params;
1600
1600
  return callRaw(
1601
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${orgId}/audit-export/test-connection`, {
1601
+ await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/test-connection`, {
1602
1602
  method: "POST",
1603
1603
  headers: { "Content-Type": "application/json" },
1604
1604
  body: JSON.stringify(body)
@@ -1618,7 +1618,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1618
1618
  await rawRequest(
1619
1619
  baseUrl,
1620
1620
  hcOpts,
1621
- `/api/orgs/${params.orgId}/audit-export/runs${qs}`
1621
+ `/orgs/${params.orgId}/audit-export/runs${qs}`
1622
1622
  )
1623
1623
  );
1624
1624
  }
@@ -1630,7 +1630,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1630
1630
  import { hc as hc3 } from "hono/client";
1631
1631
  function createUserPreferencesClient(baseUrl, hcOpts) {
1632
1632
  const c = hc3(
1633
- `${baseUrl}/api/user/preferences`,
1633
+ `${baseUrl}/user/preferences`,
1634
1634
  hcOpts
1635
1635
  );
1636
1636
  return {
@@ -1905,9 +1905,9 @@ var createClient = (baseUrl, options = {}) => {
1905
1905
  const headers = buildHeaders(opts.token);
1906
1906
  const fetchImpl = opts.fetch;
1907
1907
  const hcOpts = fetchImpl ? { headers, fetch: fetchImpl } : { headers };
1908
- const cloud = hc4(`${baseUrl}/api`, hcOpts);
1909
- const proj = (orgId, projectId) => hc4(`${baseUrl}/api/${orgId}/${projectId}`, hcOpts);
1910
- const projEnv = (orgId, projectId, envName) => hc4(`${baseUrl}/api/${orgId}/${projectId}/envs/${envName}`, hcOpts);
1908
+ const cloud = hc4(`${baseUrl}`, hcOpts);
1909
+ const proj = (orgId, projectId) => hc4(`${baseUrl}/${orgId}/${projectId}`, hcOpts);
1910
+ const projEnv = (orgId, projectId, envName) => hc4(`${baseUrl}/${orgId}/${projectId}/envs/${envName}`, hcOpts);
1911
1911
  const cells = createCellsClient(proj);
1912
1912
  const catalogRevisions = createCatalogRevisionsClient(proj);
1913
1913
  const exportCatalog = createExportCatalogFn(proj, projEnv);
package/dist/index.js CHANGED
@@ -158,7 +158,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
158
158
  id: import_zod.z.string().describe("Organization ID")
159
159
  }),
160
160
  async (params) => callPersonalTokens(
161
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${params.id}/personal-tokens`)
161
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/personal-tokens`)
162
162
  )
163
163
  ),
164
164
  createPersonalToken: withSchema(
@@ -170,7 +170,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
170
170
  async (params) => {
171
171
  const { id, ...body } = params;
172
172
  return callPersonalTokens(
173
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${id}/personal-tokens`, {
173
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${id}/personal-tokens`, {
174
174
  method: "POST",
175
175
  headers: { "Content-Type": "application/json" },
176
176
  body: JSON.stringify(body)
@@ -187,7 +187,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
187
187
  await personalTokensRequest(
188
188
  baseUrl,
189
189
  hcOpts,
190
- `/api/orgs/${params.id}/personal-tokens/${params.tokenId}`,
190
+ `/orgs/${params.id}/personal-tokens/${params.tokenId}`,
191
191
  { method: "DELETE" }
192
192
  )
193
193
  )
@@ -197,7 +197,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
197
197
  id: import_zod.z.string().describe("Organization ID")
198
198
  }),
199
199
  async (params) => callPersonalTokens(
200
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${params.id}/sso-extras`)
200
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/sso-extras`)
201
201
  )
202
202
  ),
203
203
  setSsoForce: withSchema(
@@ -210,7 +210,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
210
210
  await personalTokensRequest(
211
211
  baseUrl,
212
212
  hcOpts,
213
- `/api/orgs/${params.id}/sso-extras/${params.providerId}`,
213
+ `/orgs/${params.id}/sso-extras/${params.providerId}`,
214
214
  {
215
215
  method: "PATCH",
216
216
  headers: { "Content-Type": "application/json" },
@@ -336,7 +336,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
336
336
  }),
337
337
  (params) => call(
338
338
  (0, import_client.hc)(
339
- `${baseUrl}/api/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
339
+ `${baseUrl}/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
340
340
  hcOpts
341
341
  ).index.$get()
342
342
  )
@@ -357,7 +357,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
357
357
  const { orgId, projectId, ...body } = params;
358
358
  return call(
359
359
  (0, import_client.hc)(
360
- `${baseUrl}/api/orgs/${orgId}/projects/${projectId}/tokens`,
360
+ `${baseUrl}/orgs/${orgId}/projects/${projectId}/tokens`,
361
361
  hcOpts
362
362
  ).index.$post({ json: body })
363
363
  );
@@ -371,7 +371,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
371
371
  }),
372
372
  (params) => call(
373
373
  (0, import_client.hc)(
374
- `${baseUrl}/api/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
374
+ `${baseUrl}/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
375
375
  hcOpts
376
376
  )[":tokenId"].$delete({ param: { tokenId: params.tokenId } })
377
377
  )
@@ -388,7 +388,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
388
388
  projectId: import_zod2.z.string().describe("Project ID to nuke")
389
389
  }),
390
390
  async (params) => {
391
- const url = `${baseUrl}/api/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
391
+ const url = `${baseUrl}/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
392
392
  const fetchImpl = hcOpts?.fetch ?? fetch;
393
393
  const rawHeaders = hcOpts?.headers;
394
394
  const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
@@ -1530,7 +1530,7 @@ function createGraphViewsClient(proj) {
1530
1530
  var import_zod16 = require("zod");
1531
1531
  var import_client2 = require("hono/client");
1532
1532
  function createNotificationsClient(baseUrl, hcOpts) {
1533
- const c = (0, import_client2.hc)(`${baseUrl}/api/notifications`, hcOpts);
1533
+ const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
1534
1534
  return {
1535
1535
  list: withSchema(
1536
1536
  import_zod16.z.object({
@@ -1587,7 +1587,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1587
1587
  getConfig: withSchema(
1588
1588
  import_zod17.z.object({ orgId: import_zod17.z.string().describe("Organization ID") }),
1589
1589
  async (params) => callRaw(
1590
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${params.orgId}/audit-export/config`)
1590
+ await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
1591
1591
  )
1592
1592
  ),
1593
1593
  /** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
@@ -1602,7 +1602,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1602
1602
  async (params) => {
1603
1603
  const { orgId, ...body } = params;
1604
1604
  return callRaw(
1605
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${orgId}/audit-export/config`, {
1605
+ await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/config`, {
1606
1606
  method: "POST",
1607
1607
  headers: { "Content-Type": "application/json" },
1608
1608
  body: JSON.stringify(body)
@@ -1621,7 +1621,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1621
1621
  async (params) => {
1622
1622
  const { orgId, ...body } = params;
1623
1623
  return callRaw(
1624
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${orgId}/audit-export/test-connection`, {
1624
+ await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/test-connection`, {
1625
1625
  method: "POST",
1626
1626
  headers: { "Content-Type": "application/json" },
1627
1627
  body: JSON.stringify(body)
@@ -1641,7 +1641,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1641
1641
  await rawRequest(
1642
1642
  baseUrl,
1643
1643
  hcOpts,
1644
- `/api/orgs/${params.orgId}/audit-export/runs${qs}`
1644
+ `/orgs/${params.orgId}/audit-export/runs${qs}`
1645
1645
  )
1646
1646
  );
1647
1647
  }
@@ -1653,7 +1653,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1653
1653
  var import_client3 = require("hono/client");
1654
1654
  function createUserPreferencesClient(baseUrl, hcOpts) {
1655
1655
  const c = (0, import_client3.hc)(
1656
- `${baseUrl}/api/user/preferences`,
1656
+ `${baseUrl}/user/preferences`,
1657
1657
  hcOpts
1658
1658
  );
1659
1659
  return {
@@ -1928,9 +1928,9 @@ var createClient = (baseUrl, options = {}) => {
1928
1928
  const headers = buildHeaders(opts.token);
1929
1929
  const fetchImpl = opts.fetch;
1930
1930
  const hcOpts = fetchImpl ? { headers, fetch: fetchImpl } : { headers };
1931
- const cloud = (0, import_client4.hc)(`${baseUrl}/api`, hcOpts);
1932
- const proj = (orgId, projectId) => (0, import_client4.hc)(`${baseUrl}/api/${orgId}/${projectId}`, hcOpts);
1933
- const projEnv = (orgId, projectId, envName) => (0, import_client4.hc)(`${baseUrl}/api/${orgId}/${projectId}/envs/${envName}`, hcOpts);
1931
+ const cloud = (0, import_client4.hc)(`${baseUrl}`, hcOpts);
1932
+ const proj = (orgId, projectId) => (0, import_client4.hc)(`${baseUrl}/${orgId}/${projectId}`, hcOpts);
1933
+ const projEnv = (orgId, projectId, envName) => (0, import_client4.hc)(`${baseUrl}/${orgId}/${projectId}/envs/${envName}`, hcOpts);
1934
1934
  const cells = createCellsClient(proj);
1935
1935
  const catalogRevisions = createCatalogRevisionsClient(proj);
1936
1936
  const exportCatalog = createExportCatalogFn(proj, projEnv);
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  TerrantulaError,
3
3
  createClient,
4
4
  withSchema
5
- } from "./chunk-FYVCEOF7.mjs";
5
+ } from "./chunk-SDDTVMHH.mjs";
6
6
  export {
7
7
  TerrantulaError,
8
8
  createClient,
package/dist/local.js CHANGED
@@ -158,7 +158,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
158
158
  id: import_zod.z.string().describe("Organization ID")
159
159
  }),
160
160
  async (params) => callPersonalTokens(
161
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${params.id}/personal-tokens`)
161
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/personal-tokens`)
162
162
  )
163
163
  ),
164
164
  createPersonalToken: withSchema(
@@ -170,7 +170,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
170
170
  async (params) => {
171
171
  const { id, ...body } = params;
172
172
  return callPersonalTokens(
173
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${id}/personal-tokens`, {
173
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${id}/personal-tokens`, {
174
174
  method: "POST",
175
175
  headers: { "Content-Type": "application/json" },
176
176
  body: JSON.stringify(body)
@@ -187,7 +187,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
187
187
  await personalTokensRequest(
188
188
  baseUrl,
189
189
  hcOpts,
190
- `/api/orgs/${params.id}/personal-tokens/${params.tokenId}`,
190
+ `/orgs/${params.id}/personal-tokens/${params.tokenId}`,
191
191
  { method: "DELETE" }
192
192
  )
193
193
  )
@@ -197,7 +197,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
197
197
  id: import_zod.z.string().describe("Organization ID")
198
198
  }),
199
199
  async (params) => callPersonalTokens(
200
- await personalTokensRequest(baseUrl, hcOpts, `/api/orgs/${params.id}/sso-extras`)
200
+ await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/sso-extras`)
201
201
  )
202
202
  ),
203
203
  setSsoForce: withSchema(
@@ -210,7 +210,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
210
210
  await personalTokensRequest(
211
211
  baseUrl,
212
212
  hcOpts,
213
- `/api/orgs/${params.id}/sso-extras/${params.providerId}`,
213
+ `/orgs/${params.id}/sso-extras/${params.providerId}`,
214
214
  {
215
215
  method: "PATCH",
216
216
  headers: { "Content-Type": "application/json" },
@@ -336,7 +336,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
336
336
  }),
337
337
  (params) => call(
338
338
  (0, import_client.hc)(
339
- `${baseUrl}/api/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
339
+ `${baseUrl}/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
340
340
  hcOpts
341
341
  ).index.$get()
342
342
  )
@@ -357,7 +357,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
357
357
  const { orgId, projectId, ...body } = params;
358
358
  return call(
359
359
  (0, import_client.hc)(
360
- `${baseUrl}/api/orgs/${orgId}/projects/${projectId}/tokens`,
360
+ `${baseUrl}/orgs/${orgId}/projects/${projectId}/tokens`,
361
361
  hcOpts
362
362
  ).index.$post({ json: body })
363
363
  );
@@ -371,7 +371,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
371
371
  }),
372
372
  (params) => call(
373
373
  (0, import_client.hc)(
374
- `${baseUrl}/api/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
374
+ `${baseUrl}/orgs/${params.orgId}/projects/${params.projectId}/tokens`,
375
375
  hcOpts
376
376
  )[":tokenId"].$delete({ param: { tokenId: params.tokenId } })
377
377
  )
@@ -388,7 +388,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
388
388
  projectId: import_zod2.z.string().describe("Project ID to nuke")
389
389
  }),
390
390
  async (params) => {
391
- const url = `${baseUrl}/api/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
391
+ const url = `${baseUrl}/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
392
392
  const fetchImpl = hcOpts?.fetch ?? fetch;
393
393
  const rawHeaders = hcOpts?.headers;
394
394
  const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
@@ -1530,7 +1530,7 @@ function createGraphViewsClient(proj) {
1530
1530
  var import_zod16 = require("zod");
1531
1531
  var import_client2 = require("hono/client");
1532
1532
  function createNotificationsClient(baseUrl, hcOpts) {
1533
- const c = (0, import_client2.hc)(`${baseUrl}/api/notifications`, hcOpts);
1533
+ const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
1534
1534
  return {
1535
1535
  list: withSchema(
1536
1536
  import_zod16.z.object({
@@ -1587,7 +1587,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1587
1587
  getConfig: withSchema(
1588
1588
  import_zod17.z.object({ orgId: import_zod17.z.string().describe("Organization ID") }),
1589
1589
  async (params) => callRaw(
1590
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${params.orgId}/audit-export/config`)
1590
+ await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
1591
1591
  )
1592
1592
  ),
1593
1593
  /** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
@@ -1602,7 +1602,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1602
1602
  async (params) => {
1603
1603
  const { orgId, ...body } = params;
1604
1604
  return callRaw(
1605
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${orgId}/audit-export/config`, {
1605
+ await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/config`, {
1606
1606
  method: "POST",
1607
1607
  headers: { "Content-Type": "application/json" },
1608
1608
  body: JSON.stringify(body)
@@ -1621,7 +1621,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1621
1621
  async (params) => {
1622
1622
  const { orgId, ...body } = params;
1623
1623
  return callRaw(
1624
- await rawRequest(baseUrl, hcOpts, `/api/orgs/${orgId}/audit-export/test-connection`, {
1624
+ await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/test-connection`, {
1625
1625
  method: "POST",
1626
1626
  headers: { "Content-Type": "application/json" },
1627
1627
  body: JSON.stringify(body)
@@ -1641,7 +1641,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1641
1641
  await rawRequest(
1642
1642
  baseUrl,
1643
1643
  hcOpts,
1644
- `/api/orgs/${params.orgId}/audit-export/runs${qs}`
1644
+ `/orgs/${params.orgId}/audit-export/runs${qs}`
1645
1645
  )
1646
1646
  );
1647
1647
  }
@@ -1653,7 +1653,7 @@ function createAuditExportClient(baseUrl, hcOpts) {
1653
1653
  var import_client3 = require("hono/client");
1654
1654
  function createUserPreferencesClient(baseUrl, hcOpts) {
1655
1655
  const c = (0, import_client3.hc)(
1656
- `${baseUrl}/api/user/preferences`,
1656
+ `${baseUrl}/user/preferences`,
1657
1657
  hcOpts
1658
1658
  );
1659
1659
  return {
@@ -1928,9 +1928,9 @@ var createClient = (baseUrl, options = {}) => {
1928
1928
  const headers = buildHeaders(opts.token);
1929
1929
  const fetchImpl = opts.fetch;
1930
1930
  const hcOpts = fetchImpl ? { headers, fetch: fetchImpl } : { headers };
1931
- const cloud = (0, import_client4.hc)(`${baseUrl}/api`, hcOpts);
1932
- const proj = (orgId, projectId) => (0, import_client4.hc)(`${baseUrl}/api/${orgId}/${projectId}`, hcOpts);
1933
- const projEnv = (orgId, projectId, envName) => (0, import_client4.hc)(`${baseUrl}/api/${orgId}/${projectId}/envs/${envName}`, hcOpts);
1931
+ const cloud = (0, import_client4.hc)(`${baseUrl}`, hcOpts);
1932
+ const proj = (orgId, projectId) => (0, import_client4.hc)(`${baseUrl}/${orgId}/${projectId}`, hcOpts);
1933
+ const projEnv = (orgId, projectId, envName) => (0, import_client4.hc)(`${baseUrl}/${orgId}/${projectId}/envs/${envName}`, hcOpts);
1934
1934
  const cells = createCellsClient(proj);
1935
1935
  const catalogRevisions = createCatalogRevisionsClient(proj);
1936
1936
  const exportCatalog = createExportCatalogFn(proj, projEnv);
@@ -2016,7 +2016,7 @@ var createLocalClient = (options = {}) => {
2016
2016
  const req = input instanceof Request ? input : new Request(input, init);
2017
2017
  return Promise.resolve(app.fetch(req));
2018
2018
  });
2019
- const client = createClient("http://local/api", { fetch: localFetch });
2019
+ const client = createClient("http://local", { fetch: localFetch });
2020
2020
  return Object.assign(client, { close: opened.close });
2021
2021
  };
2022
2022
  // Annotate the CommonJS export names for ESM import in node:
package/dist/local.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createClient
3
- } from "./chunk-FYVCEOF7.mjs";
3
+ } from "./chunk-SDDTVMHH.mjs";
4
4
 
5
5
  // src/local.ts
6
6
  import { createLocalApp, openLocalDb } from "@terrantula/local";
@@ -19,7 +19,7 @@ var createLocalClient = (options = {}) => {
19
19
  const req = input instanceof Request ? input : new Request(input, init);
20
20
  return Promise.resolve(app.fetch(req));
21
21
  });
22
- const client = createClient("http://local/api", { fetch: localFetch });
22
+ const client = createClient("http://local", { fetch: localFetch });
23
23
  return Object.assign(client, { close: opened.close });
24
24
  };
25
25
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrantula/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "TypeScript SDK for Terrantula — the multi-tenant entity-graph control plane that herds Terraform/OpenTofu cattle.",
5
5
  "keywords": [
6
6
  "terrantula",
@@ -60,7 +60,7 @@
60
60
  "test": "bun test"
61
61
  },
62
62
  "dependencies": {
63
- "@terrantula/local": "^0.0.7",
63
+ "@terrantula/local": "^0.0.8",
64
64
  "@terrantula/types": "^0.2.0",
65
65
  "hono": "^4.4.0",
66
66
  "zod": "^3.22.0"