@graph8/sdk 0.13.0 → 0.14.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/dist/react.js CHANGED
@@ -1235,10 +1235,282 @@ var createAppsClient = (apiKey, apiUrl) => {
1235
1235
  };
1236
1236
  };
1237
1237
 
1238
- // src/fields.ts
1238
+ // src/appPlatform.ts
1239
1239
  var DEFAULT_API18 = "https://be.graph8.com";
1240
- var createFieldsClient = (apiKey, apiUrl) => {
1240
+ var createAppPlatformClient = (apiKey, apiUrl) => {
1241
1241
  const baseUrl = apiUrl || DEFAULT_API18;
1242
+ const unwrap = (resp) => resp.data ?? resp;
1243
+ return {
1244
+ // ---- source binding -------------------------------------------------
1245
+ /**
1246
+ * Bind the repository an app builds from.
1247
+ *
1248
+ * `repo_url` must be fetchable -- `https://`, `ssh://` or `git@`, with no
1249
+ * whitespace. A `file://` or bare path is refused with 422, because a build
1250
+ * that can read the builder's filesystem is a build that can read ours.
1251
+ *
1252
+ * `credential_ref` is a POINTER into your secret manager, not a token.
1253
+ */
1254
+ async setSource(appId, params) {
1255
+ const resp = await request(
1256
+ baseUrl,
1257
+ `/api/v1/apps/${appId}/source`,
1258
+ apiKey,
1259
+ {
1260
+ method: "PUT",
1261
+ body: {
1262
+ repo_url: params.repo_url,
1263
+ provider: params.provider,
1264
+ default_branch: params.default_branch ?? null,
1265
+ credential_ref: params.credential_ref ?? null
1266
+ }
1267
+ }
1268
+ );
1269
+ return unwrap(resp);
1270
+ },
1271
+ /** Unbind the source. Returns the full app with every source field null. */
1272
+ async clearSource(appId) {
1273
+ const resp = await request(
1274
+ baseUrl,
1275
+ `/api/v1/apps/${appId}/source`,
1276
+ apiKey,
1277
+ { method: "DELETE" }
1278
+ );
1279
+ return unwrap(resp);
1280
+ },
1281
+ // ---- deployments ----------------------------------------------------
1282
+ /** Every deployment for this app, newest first. Never 404s for an app with none. */
1283
+ async listDeployments(appId) {
1284
+ return request(baseUrl, `/api/v1/apps/${appId}/deployments`, apiKey);
1285
+ },
1286
+ /**
1287
+ * Queue a deployment. Returns `201` with `status: "queued"` -- nothing builds
1288
+ * as a side effect of this call; the build controller picks it up.
1289
+ *
1290
+ * NOT idempotent: two identical calls create two deployments.
1291
+ */
1292
+ async deploy(appId, params) {
1293
+ const body = { source_ref: params.source_ref };
1294
+ if (params.schema_version_id) body.schema_version_id = params.schema_version_id;
1295
+ const resp = await request(
1296
+ baseUrl,
1297
+ `/api/v1/apps/${appId}/deployments`,
1298
+ apiKey,
1299
+ { method: "POST", body }
1300
+ );
1301
+ return unwrap(resp);
1302
+ },
1303
+ /** Fetch one deployment. The polling endpoint for a build loop. */
1304
+ async getDeployment(appId, deploymentId) {
1305
+ const resp = await request(
1306
+ baseUrl,
1307
+ `/api/v1/apps/${appId}/deployments/${deploymentId}`,
1308
+ apiKey
1309
+ );
1310
+ return unwrap(resp);
1311
+ },
1312
+ /**
1313
+ * The deployment currently serving traffic, or `null`.
1314
+ *
1315
+ * `null` is a real answer with a 200, not a 404: "this app has never shipped"
1316
+ * is information, while a 404 would read as "no such app".
1317
+ */
1318
+ async activeDeployment(appId) {
1319
+ const resp = await request(
1320
+ baseUrl,
1321
+ `/api/v1/apps/${appId}/deployments/active`,
1322
+ apiKey
1323
+ );
1324
+ return resp.data ?? null;
1325
+ },
1326
+ /**
1327
+ * Promote a built deployment to serve traffic. Anything it displaces moves to
1328
+ * `rolled_back` in the same transaction, so there is never a moment with two
1329
+ * live deployments.
1330
+ *
1331
+ * `409` when the state machine forbids it -- a deployment cannot become
1332
+ * `deployed` without having been built, and a `failed` one cannot be revived.
1333
+ * A retry is a new deployment, not a resurrection.
1334
+ */
1335
+ async promote(appId, deploymentId, imageDigest) {
1336
+ const resp = await request(
1337
+ baseUrl,
1338
+ `/api/v1/apps/${appId}/deployments/${deploymentId}/promote`,
1339
+ apiKey,
1340
+ { method: "POST", body: { image_digest: imageDigest } }
1341
+ );
1342
+ return unwrap(resp);
1343
+ },
1344
+ /** Roll back a deployment that is currently serving. Only a `deployed` one may be. */
1345
+ async rollback(appId, deploymentId) {
1346
+ const resp = await request(
1347
+ baseUrl,
1348
+ `/api/v1/apps/${appId}/deployments/${deploymentId}/rollback`,
1349
+ apiKey,
1350
+ { method: "POST", body: {} }
1351
+ );
1352
+ return unwrap(resp);
1353
+ },
1354
+ // ---- logs -----------------------------------------------------------
1355
+ /**
1356
+ * Why a build failed. Returns every step of the build pod in the order
1357
+ * Kubernetes runs them; a step that has not started yet is omitted rather
1358
+ * than returned empty.
1359
+ *
1360
+ * An empty `containers` list is not an error -- build pods are reaped an hour
1361
+ * after they finish, so logs for an older deployment are genuinely gone.
1362
+ * `last_error_sanitized` on the deployment is what survives.
1363
+ *
1364
+ * `503` means graph8 could not reach the cluster, which is deliberately
1365
+ * different from an empty `200`: one means we could not look, the other means
1366
+ * your build produced no output.
1367
+ */
1368
+ async deploymentLogs(appId, deploymentId, tailLines) {
1369
+ const resp = await request(
1370
+ baseUrl,
1371
+ `/api/v1/apps/${appId}/deployments/${deploymentId}/logs`,
1372
+ apiKey,
1373
+ { query: tailLines === void 0 ? void 0 : { tail_lines: tailLines } }
1374
+ );
1375
+ return unwrap(resp);
1376
+ },
1377
+ /**
1378
+ * What the running app is printing. The app's own pods only -- the per-app
1379
+ * egress proxy shares the namespace and is deliberately excluded.
1380
+ *
1381
+ * Empty until a deployment reaches `deployed`.
1382
+ */
1383
+ async logs(appId, tailLines) {
1384
+ const resp = await request(
1385
+ baseUrl,
1386
+ `/api/v1/apps/${appId}/logs`,
1387
+ apiKey,
1388
+ { query: tailLines === void 0 ? void 0 : { tail_lines: tailLines } }
1389
+ );
1390
+ return unwrap(resp);
1391
+ },
1392
+ // ---- domains --------------------------------------------------------
1393
+ /** Every hostname claimed for this app, whatever its verification state. */
1394
+ async listDomains(appId) {
1395
+ return request(baseUrl, `/api/v1/apps/${appId}/domains`, apiKey);
1396
+ },
1397
+ /**
1398
+ * Claim a hostname and get the TXT record that proves you own it.
1399
+ *
1400
+ * Returns `201`, and the domain is NESTED at `data.domain` -- this is the one
1401
+ * route on the surface whose payload is not the record itself. Hostnames are
1402
+ * globally unique, so a host another app holds is refused.
1403
+ */
1404
+ async claimDomain(appId, hostname) {
1405
+ const resp = await request(
1406
+ baseUrl,
1407
+ `/api/v1/apps/${appId}/domains`,
1408
+ apiKey,
1409
+ { method: "POST", body: { hostname } }
1410
+ );
1411
+ return unwrap(resp);
1412
+ },
1413
+ /**
1414
+ * Check DNS for the TXT record and advance the domain to `verified`.
1415
+ *
1416
+ * Idempotent: verifying an already-verified domain re-checks and stays
1417
+ * verified, so it is safe to re-run after a DNS change. Send no body -- the
1418
+ * record in DNS is the payload.
1419
+ */
1420
+ async verifyDomain(appId, hostname) {
1421
+ const resp = await request(
1422
+ baseUrl,
1423
+ `/api/v1/apps/${appId}/domains/${encodeURIComponent(hostname)}/verify`,
1424
+ apiKey,
1425
+ { method: "POST", body: {} }
1426
+ );
1427
+ return unwrap(resp);
1428
+ },
1429
+ /**
1430
+ * Release a claimed hostname.
1431
+ *
1432
+ * A HARD delete. Hostnames are globally unique, so a row left behind in any
1433
+ * status keeps the host burned for every other builder. Releasing one you
1434
+ * already released is a `404`, because after the first call the claim
1435
+ * genuinely does not exist.
1436
+ *
1437
+ * Returns the NORMALIZED hostname, which may differ from what you passed.
1438
+ */
1439
+ async releaseDomain(appId, hostname) {
1440
+ const resp = await request(
1441
+ baseUrl,
1442
+ `/api/v1/apps/${appId}/domains/${encodeURIComponent(hostname)}`,
1443
+ apiKey,
1444
+ { method: "DELETE" }
1445
+ );
1446
+ return unwrap(resp);
1447
+ },
1448
+ // ---- secrets --------------------------------------------------------
1449
+ /**
1450
+ * Which secrets this app declares, and when each was last rotated.
1451
+ *
1452
+ * NEVER returns a value. graph8 stores a POINTER into your secret manager and
1453
+ * has no column for the secret itself.
1454
+ */
1455
+ async listSecrets(appId) {
1456
+ return request(baseUrl, `/api/v1/apps/${appId}/secrets`, apiKey);
1457
+ },
1458
+ /**
1459
+ * Declare a secret, or rotate the pointer to it.
1460
+ *
1461
+ * `providerRef` is a REFERENCE, and the server rejects anything that looks
1462
+ * like a credential -- a value starting `bearer `, `sk-`, `ghp_`, `xox` and
1463
+ * friends is a 422. That refusal is the feature: it catches the mistake of
1464
+ * pasting the secret where its address belongs.
1465
+ */
1466
+ async putSecret(appId, secretKey, providerRef) {
1467
+ const resp = await request(
1468
+ baseUrl,
1469
+ `/api/v1/apps/${appId}/secrets/${encodeURIComponent(secretKey)}`,
1470
+ apiKey,
1471
+ { method: "PUT", body: { provider_ref: providerRef ?? null } }
1472
+ );
1473
+ return unwrap(resp);
1474
+ },
1475
+ /** Undeclare a secret. A key the app never declared is a 404, so a typo is
1476
+ * never reported as a successful removal. */
1477
+ async deleteSecret(appId, secretKey) {
1478
+ const resp = await request(
1479
+ baseUrl,
1480
+ `/api/v1/apps/${appId}/secrets/${encodeURIComponent(secretKey)}`,
1481
+ apiKey,
1482
+ { method: "DELETE" }
1483
+ );
1484
+ return unwrap(resp);
1485
+ },
1486
+ // ---- schema versions ------------------------------------------------
1487
+ /**
1488
+ * Publish a custom-object schema version. Returns `201`.
1489
+ *
1490
+ * Takes only the `objects` list, not a whole `graph8.app.yaml`: the rest of
1491
+ * that file is app metadata the control plane already holds, and accepting it
1492
+ * here would create a second place for it to disagree.
1493
+ */
1494
+ async publishSchemaVersion(appId, objects) {
1495
+ const resp = await request(
1496
+ baseUrl,
1497
+ `/api/v1/apps/${appId}/schema-versions`,
1498
+ apiKey,
1499
+ { method: "POST", body: { objects } }
1500
+ );
1501
+ return unwrap(resp);
1502
+ },
1503
+ /** Every schema version this app has published. Empty array, never 404. */
1504
+ async listSchemaVersions(appId) {
1505
+ return request(baseUrl, `/api/v1/apps/${appId}/schema-versions`, apiKey);
1506
+ }
1507
+ };
1508
+ };
1509
+
1510
+ // src/fields.ts
1511
+ var DEFAULT_API19 = "https://be.graph8.com";
1512
+ var createFieldsClient = (apiKey, apiUrl) => {
1513
+ const baseUrl = apiUrl || DEFAULT_API19;
1242
1514
  return {
1243
1515
  /** List contact fields (base + custom). Pass listId to include list-specific custom fields. */
1244
1516
  async listContactFields(listId) {
@@ -1280,9 +1552,9 @@ var createFieldsClient = (apiKey, apiUrl) => {
1280
1552
  };
1281
1553
 
1282
1554
  // src/objects.ts
1283
- var DEFAULT_API19 = "https://be.graph8.com";
1555
+ var DEFAULT_API20 = "https://be.graph8.com";
1284
1556
  var createObjectsClient = (apiKey, apiUrl) => {
1285
- const baseUrl = apiUrl || DEFAULT_API19;
1557
+ const baseUrl = apiUrl || DEFAULT_API20;
1286
1558
  const encode = (value) => encodeURIComponent(value);
1287
1559
  return {
1288
1560
  /** List the custom object types in your workspace. */
@@ -1343,12 +1615,12 @@ var createObjectsClient = (apiKey, apiUrl) => {
1343
1615
  * Values are versioned rather than overwritten, so the previous value stays
1344
1616
  * readable through `history`.
1345
1617
  */
1346
- async updateRecord(objectSlug, recordId, values) {
1618
+ async updateRecord(objectSlug, recordId, values, options) {
1347
1619
  const resp = await request(
1348
1620
  baseUrl,
1349
1621
  `/api/v1/objects/${encode(objectSlug)}/records/${encode(recordId)}`,
1350
1622
  apiKey,
1351
- { method: "PATCH", body: { values } }
1623
+ { method: "PATCH", body: { values, ...options?.expectedRevision === void 0 ? {} : { expected_revision: options.expectedRevision } } }
1352
1624
  );
1353
1625
  return resp.data ?? resp;
1354
1626
  },
@@ -1365,6 +1637,16 @@ var createObjectsClient = (apiKey, apiUrl) => {
1365
1637
  );
1366
1638
  return resp.data ?? resp;
1367
1639
  },
1640
+ /** Restore archived values under current constraints. Conflicts leave the record archived. */
1641
+ async restoreRecord(objectSlug, recordId) {
1642
+ const resp = await request(
1643
+ baseUrl,
1644
+ `/api/v1/objects/${encode(objectSlug)}/records/${encode(recordId)}/restore`,
1645
+ apiKey,
1646
+ { method: "POST" }
1647
+ );
1648
+ return resp.data ?? resp;
1649
+ },
1368
1650
  /**
1369
1651
  * A record's value timeline, newest first. An entry whose `active_until` is
1370
1652
  * null is the value currently in force.
@@ -1382,9 +1664,9 @@ var createObjectsClient = (apiKey, apiUrl) => {
1382
1664
  };
1383
1665
 
1384
1666
  // src/deals.ts
1385
- var DEFAULT_API20 = "https://be.graph8.com";
1667
+ var DEFAULT_API21 = "https://be.graph8.com";
1386
1668
  var createDealsClient = (apiKey, apiUrl) => {
1387
- const baseUrl = apiUrl || DEFAULT_API20;
1669
+ const baseUrl = apiUrl || DEFAULT_API21;
1388
1670
  return {
1389
1671
  /** List all deal pipelines and their stages. */
1390
1672
  async pipelines() {
@@ -1428,9 +1710,9 @@ var createDealsClient = (apiKey, apiUrl) => {
1428
1710
  };
1429
1711
 
1430
1712
  // src/inbox.ts
1431
- var DEFAULT_API21 = "https://be.graph8.com";
1713
+ var DEFAULT_API22 = "https://be.graph8.com";
1432
1714
  var createInboxClient = (apiKey, apiUrl) => {
1433
- const baseUrl = apiUrl || DEFAULT_API21;
1715
+ const baseUrl = apiUrl || DEFAULT_API22;
1434
1716
  return {
1435
1717
  /** List inbox threads across email, SMS, and LinkedIn. */
1436
1718
  async list(params = {}) {
@@ -1483,9 +1765,9 @@ var createInboxClient = (apiKey, apiUrl) => {
1483
1765
  };
1484
1766
 
1485
1767
  // src/quotes.ts
1486
- var DEFAULT_API22 = "https://be.graph8.com";
1768
+ var DEFAULT_API23 = "https://be.graph8.com";
1487
1769
  var createQuotesClient = (apiKey, apiUrl) => {
1488
- const baseUrl = apiUrl || DEFAULT_API22;
1770
+ const baseUrl = apiUrl || DEFAULT_API23;
1489
1771
  return {
1490
1772
  /** List quotes org-wide with optional filters and pagination. */
1491
1773
  async list(params = {}) {
@@ -1557,9 +1839,9 @@ var createQuotesClient = (apiKey, apiUrl) => {
1557
1839
  };
1558
1840
 
1559
1841
  // src/pipelines.ts
1560
- var DEFAULT_API23 = "https://be.graph8.com";
1842
+ var DEFAULT_API24 = "https://be.graph8.com";
1561
1843
  var createPipelinesClient = (apiKey, apiUrl) => {
1562
- const baseUrl = apiUrl || DEFAULT_API23;
1844
+ const baseUrl = apiUrl || DEFAULT_API24;
1563
1845
  return {
1564
1846
  /** List all stage-checklist pipelines with stages, evidence, scripts. */
1565
1847
  async list() {
@@ -1641,9 +1923,9 @@ var createPipelinesClient = (apiKey, apiUrl) => {
1641
1923
  };
1642
1924
 
1643
1925
  // src/workflows.ts
1644
- var DEFAULT_API24 = "https://be.graph8.com";
1926
+ var DEFAULT_API25 = "https://be.graph8.com";
1645
1927
  var createWorkflowsClient = (apiKey, apiUrl) => {
1646
- const baseUrl = apiUrl || DEFAULT_API24;
1928
+ const baseUrl = apiUrl || DEFAULT_API25;
1647
1929
  return {
1648
1930
  /** List workflows org-wide. */
1649
1931
  async list(params = {}) {
@@ -1759,9 +2041,9 @@ var createWorkflowsClient = (apiKey, apiUrl) => {
1759
2041
  };
1760
2042
 
1761
2043
  // src/skills.ts
1762
- var DEFAULT_API25 = "https://be.graph8.com";
2044
+ var DEFAULT_API26 = "https://be.graph8.com";
1763
2045
  var createSkillsClient = (apiKey, apiUrl) => {
1764
- const baseUrl = apiUrl || DEFAULT_API25;
2046
+ const baseUrl = apiUrl || DEFAULT_API26;
1765
2047
  return {
1766
2048
  /** List skills. */
1767
2049
  async list(params = {}) {
@@ -1848,9 +2130,9 @@ var createSkillsClient = (apiKey, apiUrl) => {
1848
2130
  };
1849
2131
 
1850
2132
  // src/intent.ts
1851
- var DEFAULT_API26 = "https://be.graph8.com";
2133
+ var DEFAULT_API27 = "https://be.graph8.com";
1852
2134
  var createIntentClient = (apiKey, apiUrl) => {
1853
- const baseUrl = apiUrl || DEFAULT_API26;
2135
+ const baseUrl = apiUrl || DEFAULT_API27;
1854
2136
  const get = (path) => request(baseUrl, `/api/v1${path}`, apiKey);
1855
2137
  const post = (path, body = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "POST", body });
1856
2138
  const del = (path) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "DELETE" });
@@ -1925,9 +2207,9 @@ var createIntentClient = (apiKey, apiUrl) => {
1925
2207
  };
1926
2208
 
1927
2209
  // src/studio.ts
1928
- var DEFAULT_API27 = "https://be.graph8.com";
2210
+ var DEFAULT_API28 = "https://be.graph8.com";
1929
2211
  var createStudioClient = (apiKey, apiUrl) => {
1930
- const baseUrl = apiUrl || DEFAULT_API27;
2212
+ const baseUrl = apiUrl || DEFAULT_API28;
1931
2213
  const get = (path, params = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { query: params });
1932
2214
  const post = (path, body = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "POST", body });
1933
2215
  const patch = (path, body = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "PATCH", body });
@@ -1982,9 +2264,9 @@ var createStudioClient = (apiKey, apiUrl) => {
1982
2264
  };
1983
2265
 
1984
2266
  // src/meetings.ts
1985
- var DEFAULT_API28 = "https://be.graph8.com";
2267
+ var DEFAULT_API29 = "https://be.graph8.com";
1986
2268
  var createMeetingsClient = (apiKey, apiUrl) => {
1987
- const baseUrl = apiUrl || DEFAULT_API28;
2269
+ const baseUrl = apiUrl || DEFAULT_API29;
1988
2270
  return {
1989
2271
  /** List meetings with optional filters. Returns summary rows without transcript / analysis. */
1990
2272
  async list(params = {}) {
@@ -1999,9 +2281,9 @@ var createMeetingsClient = (apiKey, apiUrl) => {
1999
2281
  };
2000
2282
 
2001
2283
  // src/audiences.ts
2002
- var DEFAULT_API29 = "https://be.graph8.com";
2284
+ var DEFAULT_API30 = "https://be.graph8.com";
2003
2285
  var createAudiencesClient = (apiKey, apiUrl) => {
2004
- const baseUrl = apiUrl || DEFAULT_API29;
2286
+ const baseUrl = apiUrl || DEFAULT_API30;
2005
2287
  const base = "/api/v1/audience-syncs";
2006
2288
  return {
2007
2289
  /** List all audience syncs for the organization. */
@@ -2049,9 +2331,9 @@ var createAudiencesClient = (apiKey, apiUrl) => {
2049
2331
  };
2050
2332
 
2051
2333
  // src/search.ts
2052
- var DEFAULT_API30 = "https://be.graph8.com";
2334
+ var DEFAULT_API31 = "https://be.graph8.com";
2053
2335
  var createSearchClient = (apiKey, apiUrl) => {
2054
- const baseUrl = apiUrl || DEFAULT_API30;
2336
+ const baseUrl = apiUrl || DEFAULT_API31;
2055
2337
  const body = (p) => ({ filters: [], page: 1, limit: 25, ...p });
2056
2338
  return {
2057
2339
  /** Search open-data contacts by filter. */
@@ -2082,9 +2364,9 @@ var createSearchClient = (apiKey, apiUrl) => {
2082
2364
  };
2083
2365
 
2084
2366
  // src/agency.ts
2085
- var DEFAULT_API31 = "https://be.graph8.com";
2367
+ var DEFAULT_API32 = "https://be.graph8.com";
2086
2368
  var createAgencyClient = (apiKey, apiUrl) => {
2087
- const baseUrl = apiUrl || DEFAULT_API31;
2369
+ const baseUrl = apiUrl || DEFAULT_API32;
2088
2370
  return {
2089
2371
  /** Describe the agency credential: agency org + authorized client count. */
2090
2372
  async me() {
@@ -2099,9 +2381,9 @@ var createAgencyClient = (apiKey, apiUrl) => {
2099
2381
  };
2100
2382
 
2101
2383
  // src/marketplace.ts
2102
- var DEFAULT_API32 = "https://be.graph8.com";
2384
+ var DEFAULT_API33 = "https://be.graph8.com";
2103
2385
  var createMarketplaceClient = (apiKey, apiUrl) => {
2104
- const baseUrl = apiUrl || DEFAULT_API32;
2386
+ const baseUrl = apiUrl || DEFAULT_API33;
2105
2387
  const base = "/api/v1/marketplace";
2106
2388
  return {
2107
2389
  /** Your own marketplace SDR profile. */
@@ -2151,9 +2433,9 @@ var createMarketplaceClient = (apiKey, apiUrl) => {
2151
2433
  };
2152
2434
 
2153
2435
  // src/snippet.ts
2154
- var DEFAULT_API33 = "https://be.graph8.com";
2436
+ var DEFAULT_API34 = "https://be.graph8.com";
2155
2437
  var createSnippetClient = (apiKey, apiUrl) => {
2156
- const baseUrl = apiUrl || DEFAULT_API33;
2438
+ const baseUrl = apiUrl || DEFAULT_API34;
2157
2439
  return {
2158
2440
  /** Get your org's tracking snippet (write key + React/script-tag embeds + config). */
2159
2441
  async get() {
@@ -2165,7 +2447,7 @@ var createSnippetClient = (apiKey, apiUrl) => {
2165
2447
 
2166
2448
  // src/core.ts
2167
2449
  var DEFAULT_HOST = "https://t.graph8.com";
2168
- var DEFAULT_API34 = "https://be.graph8.com";
2450
+ var DEFAULT_API35 = "https://be.graph8.com";
2169
2451
  var G8 = class {
2170
2452
  constructor() {
2171
2453
  /** @internal */
@@ -2209,6 +2491,8 @@ var G8 = class {
2209
2491
  /** @internal */
2210
2492
  this._apps = null;
2211
2493
  /** @internal */
2494
+ this._appPlatform = null;
2495
+ /** @internal */
2212
2496
  this._objects = null;
2213
2497
  /** @internal */
2214
2498
  this._deals = null;
@@ -2252,7 +2536,7 @@ var G8 = class {
2252
2536
  debug: config.debug
2253
2537
  });
2254
2538
  }
2255
- const apiUrl = config.apiUrl || DEFAULT_API34;
2539
+ const apiUrl = config.apiUrl || DEFAULT_API35;
2256
2540
  const writeKey = config.writeKey || "";
2257
2541
  const apiKey = config.apiKey || "";
2258
2542
  if (writeKey) {
@@ -2276,6 +2560,7 @@ var G8 = class {
2276
2560
  this._tasks = createTasksClient(apiKey, apiUrl);
2277
2561
  this._fields = createFieldsClient(apiKey, apiUrl);
2278
2562
  this._apps = createAppsClient(apiKey, apiUrl);
2563
+ this._appPlatform = createAppPlatformClient(apiKey, apiUrl);
2279
2564
  this._objects = createObjectsClient(apiKey, apiUrl);
2280
2565
  this._deals = createDealsClient(apiKey, apiUrl);
2281
2566
  this._inbox = createInboxClient(apiKey, apiUrl);
@@ -2402,6 +2687,18 @@ var G8 = class {
2402
2687
  this._assertKey("apps");
2403
2688
  return this._apps;
2404
2689
  }
2690
+ /**
2691
+ * Ship a hosted app: bind a source, deploy, promote, attach a hostname, read
2692
+ * build logs (requires API key). PREVIEW.
2693
+ *
2694
+ * Separate from `apps` on purpose. `apps` is the app's IDENTITY -- create it,
2695
+ * see who installed it, what it cost. This is its LIFECYCLE, and the two have
2696
+ * different blast radii: a mistake here takes a customer's app down.
2697
+ */
2698
+ get appPlatform() {
2699
+ this._assertKey("appPlatform");
2700
+ return this._appPlatform;
2701
+ }
2405
2702
  /** Custom object types, their schema, and their records (requires API key). PREVIEW. */
2406
2703
  get objects() {
2407
2704
  this._assertKey("objects");