@graph8/sdk 0.12.0 → 0.13.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/index.d.mts +408 -19
- package/dist/index.d.ts +408 -19
- package/dist/index.js +244 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +244 -38
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +400 -15
- package/dist/react.d.ts +400 -15
- package/dist/react.js +244 -38
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +244 -38
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -1153,10 +1153,92 @@ var createTasksClient = (apiKey, apiUrl) => {
|
|
|
1153
1153
|
};
|
|
1154
1154
|
};
|
|
1155
1155
|
|
|
1156
|
-
// src/
|
|
1156
|
+
// src/apps.ts
|
|
1157
1157
|
var DEFAULT_API17 = "https://be.graph8.com";
|
|
1158
|
-
var
|
|
1158
|
+
var createAppsClient = (apiKey, apiUrl) => {
|
|
1159
1159
|
const baseUrl = apiUrl || DEFAULT_API17;
|
|
1160
|
+
return {
|
|
1161
|
+
/** List your organization's apps, newest first. */
|
|
1162
|
+
async list() {
|
|
1163
|
+
return request(baseUrl, "/api/v1/apps", apiKey);
|
|
1164
|
+
},
|
|
1165
|
+
/** Fetch one of your apps. Throws `G8Error` (404) if it is not yours. */
|
|
1166
|
+
async get(appId) {
|
|
1167
|
+
const resp = await request(baseUrl, `/api/v1/apps/${appId}`, apiKey);
|
|
1168
|
+
return resp.data ?? resp;
|
|
1169
|
+
},
|
|
1170
|
+
/**
|
|
1171
|
+
* Create an app. It starts in `draft` and serves no traffic until published.
|
|
1172
|
+
* Throws `G8Error` (409) when the slug is already taken in your org.
|
|
1173
|
+
*/
|
|
1174
|
+
async create(params) {
|
|
1175
|
+
const resp = await request(baseUrl, "/api/v1/apps", apiKey, {
|
|
1176
|
+
method: "POST",
|
|
1177
|
+
body: {
|
|
1178
|
+
name: params.name,
|
|
1179
|
+
slug: params.slug,
|
|
1180
|
+
registered_origins: params.registered_origins ?? []
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
return resp.data ?? resp;
|
|
1184
|
+
},
|
|
1185
|
+
/**
|
|
1186
|
+
* Move an app through its lifecycle: `draft` → `published` → `archived`.
|
|
1187
|
+
*
|
|
1188
|
+
* `suspended` is excluded from the parameter type on purpose: it is the
|
|
1189
|
+
* platform's kill switch for an abusive app, the backend refuses it with a
|
|
1190
|
+
* 403, and a builder who could set it could also unset it.
|
|
1191
|
+
*/
|
|
1192
|
+
async setStatus(appId, status) {
|
|
1193
|
+
const resp = await request(baseUrl, `/api/v1/apps/${appId}/status`, apiKey, {
|
|
1194
|
+
method: "POST",
|
|
1195
|
+
body: { status }
|
|
1196
|
+
});
|
|
1197
|
+
return resp.data ?? resp;
|
|
1198
|
+
},
|
|
1199
|
+
/**
|
|
1200
|
+
* The client organizations that installed this app, and their consent state.
|
|
1201
|
+
* Includes `pending` and `revoked` installs — if your app cannot reach a
|
|
1202
|
+
* tenant, this is where you see why.
|
|
1203
|
+
*/
|
|
1204
|
+
async listInstalls(appId) {
|
|
1205
|
+
return request(baseUrl, `/api/v1/apps/${appId}/installs`, apiKey);
|
|
1206
|
+
},
|
|
1207
|
+
/**
|
|
1208
|
+
* Credits this app consumed in a calendar month, broken down per client org.
|
|
1209
|
+
* Defaults to the current month. A month with no usage returns zeroes, not a
|
|
1210
|
+
* 404 — "nothing happened" is an answer.
|
|
1211
|
+
*/
|
|
1212
|
+
async usage(appId, period) {
|
|
1213
|
+
const resp = await request(
|
|
1214
|
+
baseUrl,
|
|
1215
|
+
`/api/v1/apps/${appId}/usage`,
|
|
1216
|
+
apiKey,
|
|
1217
|
+
{ query: period ? { period } : void 0 }
|
|
1218
|
+
);
|
|
1219
|
+
return resp.data ?? resp;
|
|
1220
|
+
},
|
|
1221
|
+
/**
|
|
1222
|
+
* This app's hard credit cap, or `null` when it is uncapped.
|
|
1223
|
+
*
|
|
1224
|
+
* `null` is the real answer, not an empty object: there is no "unlimited"
|
|
1225
|
+
* sentinel, so an accidental zero can never read as "no limit".
|
|
1226
|
+
*/
|
|
1227
|
+
async getLimit(appId) {
|
|
1228
|
+
const resp = await request(
|
|
1229
|
+
baseUrl,
|
|
1230
|
+
`/api/v1/apps/${appId}/limit`,
|
|
1231
|
+
apiKey
|
|
1232
|
+
);
|
|
1233
|
+
return resp.data ?? null;
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
// src/fields.ts
|
|
1239
|
+
var DEFAULT_API18 = "https://be.graph8.com";
|
|
1240
|
+
var createFieldsClient = (apiKey, apiUrl) => {
|
|
1241
|
+
const baseUrl = apiUrl || DEFAULT_API18;
|
|
1160
1242
|
return {
|
|
1161
1243
|
/** List contact fields (base + custom). Pass listId to include list-specific custom fields. */
|
|
1162
1244
|
async listContactFields(listId) {
|
|
@@ -1197,10 +1279,112 @@ var createFieldsClient = (apiKey, apiUrl) => {
|
|
|
1197
1279
|
};
|
|
1198
1280
|
};
|
|
1199
1281
|
|
|
1282
|
+
// src/objects.ts
|
|
1283
|
+
var DEFAULT_API19 = "https://be.graph8.com";
|
|
1284
|
+
var createObjectsClient = (apiKey, apiUrl) => {
|
|
1285
|
+
const baseUrl = apiUrl || DEFAULT_API19;
|
|
1286
|
+
const encode = (value) => encodeURIComponent(value);
|
|
1287
|
+
return {
|
|
1288
|
+
/** List the custom object types in your workspace. */
|
|
1289
|
+
async list() {
|
|
1290
|
+
return request(baseUrl, "/api/v1/objects", apiKey);
|
|
1291
|
+
},
|
|
1292
|
+
/** Fetch one object type by slug. */
|
|
1293
|
+
async get(objectSlug) {
|
|
1294
|
+
const resp = await request(
|
|
1295
|
+
baseUrl,
|
|
1296
|
+
`/api/v1/objects/${encode(objectSlug)}`,
|
|
1297
|
+
apiKey
|
|
1298
|
+
);
|
|
1299
|
+
return resp.data ?? resp;
|
|
1300
|
+
},
|
|
1301
|
+
/** The object's attributes — the schema its records must satisfy. */
|
|
1302
|
+
async listAttributes(objectSlug) {
|
|
1303
|
+
return request(baseUrl, `/api/v1/objects/${encode(objectSlug)}/attributes`, apiKey);
|
|
1304
|
+
},
|
|
1305
|
+
/** Paginated records with their current values. Archived records are excluded. */
|
|
1306
|
+
async listRecords(objectSlug, params = {}) {
|
|
1307
|
+
const query = {};
|
|
1308
|
+
if (params.page != null) query.page = params.page;
|
|
1309
|
+
if (params.limit != null) query.limit = params.limit;
|
|
1310
|
+
if (params.cursor != null) query.cursor = params.cursor;
|
|
1311
|
+
return request(baseUrl, `/api/v1/objects/${encode(objectSlug)}/records`, apiKey, {
|
|
1312
|
+
query: Object.keys(query).length ? query : void 0
|
|
1313
|
+
});
|
|
1314
|
+
},
|
|
1315
|
+
/**
|
|
1316
|
+
* Create a record. Every field is validated against the object's attributes;
|
|
1317
|
+
* an unknown one is a 422 listing every problem at once, and a collision on a
|
|
1318
|
+
* unique attribute is a 409.
|
|
1319
|
+
*/
|
|
1320
|
+
async createRecord(objectSlug, values) {
|
|
1321
|
+
const resp = await request(
|
|
1322
|
+
baseUrl,
|
|
1323
|
+
`/api/v1/objects/${encode(objectSlug)}/records`,
|
|
1324
|
+
apiKey,
|
|
1325
|
+
{ method: "POST", body: { values } }
|
|
1326
|
+
);
|
|
1327
|
+
return resp.data ?? resp;
|
|
1328
|
+
},
|
|
1329
|
+
/** Fetch one record with its currently active values. */
|
|
1330
|
+
async getRecord(objectSlug, recordId) {
|
|
1331
|
+
const resp = await request(
|
|
1332
|
+
baseUrl,
|
|
1333
|
+
`/api/v1/objects/${encode(objectSlug)}/records/${encode(recordId)}`,
|
|
1334
|
+
apiKey
|
|
1335
|
+
);
|
|
1336
|
+
return resp.data ?? resp;
|
|
1337
|
+
},
|
|
1338
|
+
/**
|
|
1339
|
+
* Update a record. PARTIAL: only the attributes you send are touched, so
|
|
1340
|
+
* required attributes you omit are left alone rather than reported missing.
|
|
1341
|
+
* Sending an explicit `null` CLEARS that attribute.
|
|
1342
|
+
*
|
|
1343
|
+
* Values are versioned rather than overwritten, so the previous value stays
|
|
1344
|
+
* readable through `history`.
|
|
1345
|
+
*/
|
|
1346
|
+
async updateRecord(objectSlug, recordId, values) {
|
|
1347
|
+
const resp = await request(
|
|
1348
|
+
baseUrl,
|
|
1349
|
+
`/api/v1/objects/${encode(objectSlug)}/records/${encode(recordId)}`,
|
|
1350
|
+
apiKey,
|
|
1351
|
+
{ method: "PATCH", body: { values } }
|
|
1352
|
+
);
|
|
1353
|
+
return resp.data ?? resp;
|
|
1354
|
+
},
|
|
1355
|
+
/**
|
|
1356
|
+
* Archive a record. It leaves listings, stays readable by id, and keeps its
|
|
1357
|
+
* history and associations. Nothing is destroyed.
|
|
1358
|
+
*/
|
|
1359
|
+
async archiveRecord(objectSlug, recordId) {
|
|
1360
|
+
const resp = await request(
|
|
1361
|
+
baseUrl,
|
|
1362
|
+
`/api/v1/objects/${encode(objectSlug)}/records/${encode(recordId)}`,
|
|
1363
|
+
apiKey,
|
|
1364
|
+
{ method: "DELETE" }
|
|
1365
|
+
);
|
|
1366
|
+
return resp.data ?? resp;
|
|
1367
|
+
},
|
|
1368
|
+
/**
|
|
1369
|
+
* A record's value timeline, newest first. An entry whose `active_until` is
|
|
1370
|
+
* null is the value currently in force.
|
|
1371
|
+
*/
|
|
1372
|
+
async history(objectSlug, recordId, limit) {
|
|
1373
|
+
const resp = await request(
|
|
1374
|
+
baseUrl,
|
|
1375
|
+
`/api/v1/objects/${encode(objectSlug)}/records/${encode(recordId)}/history`,
|
|
1376
|
+
apiKey,
|
|
1377
|
+
{ query: limit != null ? { limit } : void 0 }
|
|
1378
|
+
);
|
|
1379
|
+
return resp.data ?? resp;
|
|
1380
|
+
}
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1200
1384
|
// src/deals.ts
|
|
1201
|
-
var
|
|
1385
|
+
var DEFAULT_API20 = "https://be.graph8.com";
|
|
1202
1386
|
var createDealsClient = (apiKey, apiUrl) => {
|
|
1203
|
-
const baseUrl = apiUrl ||
|
|
1387
|
+
const baseUrl = apiUrl || DEFAULT_API20;
|
|
1204
1388
|
return {
|
|
1205
1389
|
/** List all deal pipelines and their stages. */
|
|
1206
1390
|
async pipelines() {
|
|
@@ -1244,9 +1428,9 @@ var createDealsClient = (apiKey, apiUrl) => {
|
|
|
1244
1428
|
};
|
|
1245
1429
|
|
|
1246
1430
|
// src/inbox.ts
|
|
1247
|
-
var
|
|
1431
|
+
var DEFAULT_API21 = "https://be.graph8.com";
|
|
1248
1432
|
var createInboxClient = (apiKey, apiUrl) => {
|
|
1249
|
-
const baseUrl = apiUrl ||
|
|
1433
|
+
const baseUrl = apiUrl || DEFAULT_API21;
|
|
1250
1434
|
return {
|
|
1251
1435
|
/** List inbox threads across email, SMS, and LinkedIn. */
|
|
1252
1436
|
async list(params = {}) {
|
|
@@ -1299,9 +1483,9 @@ var createInboxClient = (apiKey, apiUrl) => {
|
|
|
1299
1483
|
};
|
|
1300
1484
|
|
|
1301
1485
|
// src/quotes.ts
|
|
1302
|
-
var
|
|
1486
|
+
var DEFAULT_API22 = "https://be.graph8.com";
|
|
1303
1487
|
var createQuotesClient = (apiKey, apiUrl) => {
|
|
1304
|
-
const baseUrl = apiUrl ||
|
|
1488
|
+
const baseUrl = apiUrl || DEFAULT_API22;
|
|
1305
1489
|
return {
|
|
1306
1490
|
/** List quotes org-wide with optional filters and pagination. */
|
|
1307
1491
|
async list(params = {}) {
|
|
@@ -1373,9 +1557,9 @@ var createQuotesClient = (apiKey, apiUrl) => {
|
|
|
1373
1557
|
};
|
|
1374
1558
|
|
|
1375
1559
|
// src/pipelines.ts
|
|
1376
|
-
var
|
|
1560
|
+
var DEFAULT_API23 = "https://be.graph8.com";
|
|
1377
1561
|
var createPipelinesClient = (apiKey, apiUrl) => {
|
|
1378
|
-
const baseUrl = apiUrl ||
|
|
1562
|
+
const baseUrl = apiUrl || DEFAULT_API23;
|
|
1379
1563
|
return {
|
|
1380
1564
|
/** List all stage-checklist pipelines with stages, evidence, scripts. */
|
|
1381
1565
|
async list() {
|
|
@@ -1457,9 +1641,9 @@ var createPipelinesClient = (apiKey, apiUrl) => {
|
|
|
1457
1641
|
};
|
|
1458
1642
|
|
|
1459
1643
|
// src/workflows.ts
|
|
1460
|
-
var
|
|
1644
|
+
var DEFAULT_API24 = "https://be.graph8.com";
|
|
1461
1645
|
var createWorkflowsClient = (apiKey, apiUrl) => {
|
|
1462
|
-
const baseUrl = apiUrl ||
|
|
1646
|
+
const baseUrl = apiUrl || DEFAULT_API24;
|
|
1463
1647
|
return {
|
|
1464
1648
|
/** List workflows org-wide. */
|
|
1465
1649
|
async list(params = {}) {
|
|
@@ -1575,9 +1759,9 @@ var createWorkflowsClient = (apiKey, apiUrl) => {
|
|
|
1575
1759
|
};
|
|
1576
1760
|
|
|
1577
1761
|
// src/skills.ts
|
|
1578
|
-
var
|
|
1762
|
+
var DEFAULT_API25 = "https://be.graph8.com";
|
|
1579
1763
|
var createSkillsClient = (apiKey, apiUrl) => {
|
|
1580
|
-
const baseUrl = apiUrl ||
|
|
1764
|
+
const baseUrl = apiUrl || DEFAULT_API25;
|
|
1581
1765
|
return {
|
|
1582
1766
|
/** List skills. */
|
|
1583
1767
|
async list(params = {}) {
|
|
@@ -1664,9 +1848,9 @@ var createSkillsClient = (apiKey, apiUrl) => {
|
|
|
1664
1848
|
};
|
|
1665
1849
|
|
|
1666
1850
|
// src/intent.ts
|
|
1667
|
-
var
|
|
1851
|
+
var DEFAULT_API26 = "https://be.graph8.com";
|
|
1668
1852
|
var createIntentClient = (apiKey, apiUrl) => {
|
|
1669
|
-
const baseUrl = apiUrl ||
|
|
1853
|
+
const baseUrl = apiUrl || DEFAULT_API26;
|
|
1670
1854
|
const get = (path) => request(baseUrl, `/api/v1${path}`, apiKey);
|
|
1671
1855
|
const post = (path, body = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "POST", body });
|
|
1672
1856
|
const del = (path) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "DELETE" });
|
|
@@ -1722,22 +1906,28 @@ var createIntentClient = (apiKey, apiUrl) => {
|
|
|
1722
1906
|
/**
|
|
1723
1907
|
* Find companies whose users visited a specific URL (intent search).
|
|
1724
1908
|
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1909
|
+
* Previously posted to the bare-host `/intent-search/url-companies`, bypassing
|
|
1910
|
+
* the shared `post()` helper. That route is JWT-only, so this method could
|
|
1911
|
+
* never actually work with an API key. It now goes through
|
|
1912
|
+
* `/api/v1/intent/url-companies` like the rest of the intent surface (g8 issue
|
|
1913
|
+
* #16536).
|
|
1914
|
+
*
|
|
1915
|
+
* Returns a bare aggregate, NOT the `{ data }` envelope — the previous
|
|
1916
|
+
* `{ data: IntentCompany[] }` signature never matched what the API sends.
|
|
1917
|
+
*
|
|
1918
|
+
* `date_from` / `date_to` are accepted for backwards compatibility but have
|
|
1919
|
+
* never been read by this endpoint; use `days` to set the lookback window.
|
|
1727
1920
|
*/
|
|
1728
1921
|
async urlCompanies(url, params = {}) {
|
|
1729
|
-
return
|
|
1730
|
-
method: "POST",
|
|
1731
|
-
body: { url, ...params }
|
|
1732
|
-
});
|
|
1922
|
+
return post("/intent/url-companies", { url, ...params });
|
|
1733
1923
|
}
|
|
1734
1924
|
};
|
|
1735
1925
|
};
|
|
1736
1926
|
|
|
1737
1927
|
// src/studio.ts
|
|
1738
|
-
var
|
|
1928
|
+
var DEFAULT_API27 = "https://be.graph8.com";
|
|
1739
1929
|
var createStudioClient = (apiKey, apiUrl) => {
|
|
1740
|
-
const baseUrl = apiUrl ||
|
|
1930
|
+
const baseUrl = apiUrl || DEFAULT_API27;
|
|
1741
1931
|
const get = (path, params = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { query: params });
|
|
1742
1932
|
const post = (path, body = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "POST", body });
|
|
1743
1933
|
const patch = (path, body = {}) => request(baseUrl, `/api/v1${path}`, apiKey, { method: "PATCH", body });
|
|
@@ -1792,9 +1982,9 @@ var createStudioClient = (apiKey, apiUrl) => {
|
|
|
1792
1982
|
};
|
|
1793
1983
|
|
|
1794
1984
|
// src/meetings.ts
|
|
1795
|
-
var
|
|
1985
|
+
var DEFAULT_API28 = "https://be.graph8.com";
|
|
1796
1986
|
var createMeetingsClient = (apiKey, apiUrl) => {
|
|
1797
|
-
const baseUrl = apiUrl ||
|
|
1987
|
+
const baseUrl = apiUrl || DEFAULT_API28;
|
|
1798
1988
|
return {
|
|
1799
1989
|
/** List meetings with optional filters. Returns summary rows without transcript / analysis. */
|
|
1800
1990
|
async list(params = {}) {
|
|
@@ -1809,9 +1999,9 @@ var createMeetingsClient = (apiKey, apiUrl) => {
|
|
|
1809
1999
|
};
|
|
1810
2000
|
|
|
1811
2001
|
// src/audiences.ts
|
|
1812
|
-
var
|
|
2002
|
+
var DEFAULT_API29 = "https://be.graph8.com";
|
|
1813
2003
|
var createAudiencesClient = (apiKey, apiUrl) => {
|
|
1814
|
-
const baseUrl = apiUrl ||
|
|
2004
|
+
const baseUrl = apiUrl || DEFAULT_API29;
|
|
1815
2005
|
const base = "/api/v1/audience-syncs";
|
|
1816
2006
|
return {
|
|
1817
2007
|
/** List all audience syncs for the organization. */
|
|
@@ -1859,9 +2049,9 @@ var createAudiencesClient = (apiKey, apiUrl) => {
|
|
|
1859
2049
|
};
|
|
1860
2050
|
|
|
1861
2051
|
// src/search.ts
|
|
1862
|
-
var
|
|
2052
|
+
var DEFAULT_API30 = "https://be.graph8.com";
|
|
1863
2053
|
var createSearchClient = (apiKey, apiUrl) => {
|
|
1864
|
-
const baseUrl = apiUrl ||
|
|
2054
|
+
const baseUrl = apiUrl || DEFAULT_API30;
|
|
1865
2055
|
const body = (p) => ({ filters: [], page: 1, limit: 25, ...p });
|
|
1866
2056
|
return {
|
|
1867
2057
|
/** Search open-data contacts by filter. */
|
|
@@ -1892,9 +2082,9 @@ var createSearchClient = (apiKey, apiUrl) => {
|
|
|
1892
2082
|
};
|
|
1893
2083
|
|
|
1894
2084
|
// src/agency.ts
|
|
1895
|
-
var
|
|
2085
|
+
var DEFAULT_API31 = "https://be.graph8.com";
|
|
1896
2086
|
var createAgencyClient = (apiKey, apiUrl) => {
|
|
1897
|
-
const baseUrl = apiUrl ||
|
|
2087
|
+
const baseUrl = apiUrl || DEFAULT_API31;
|
|
1898
2088
|
return {
|
|
1899
2089
|
/** Describe the agency credential: agency org + authorized client count. */
|
|
1900
2090
|
async me() {
|
|
@@ -1909,9 +2099,9 @@ var createAgencyClient = (apiKey, apiUrl) => {
|
|
|
1909
2099
|
};
|
|
1910
2100
|
|
|
1911
2101
|
// src/marketplace.ts
|
|
1912
|
-
var
|
|
2102
|
+
var DEFAULT_API32 = "https://be.graph8.com";
|
|
1913
2103
|
var createMarketplaceClient = (apiKey, apiUrl) => {
|
|
1914
|
-
const baseUrl = apiUrl ||
|
|
2104
|
+
const baseUrl = apiUrl || DEFAULT_API32;
|
|
1915
2105
|
const base = "/api/v1/marketplace";
|
|
1916
2106
|
return {
|
|
1917
2107
|
/** Your own marketplace SDR profile. */
|
|
@@ -1961,9 +2151,9 @@ var createMarketplaceClient = (apiKey, apiUrl) => {
|
|
|
1961
2151
|
};
|
|
1962
2152
|
|
|
1963
2153
|
// src/snippet.ts
|
|
1964
|
-
var
|
|
2154
|
+
var DEFAULT_API33 = "https://be.graph8.com";
|
|
1965
2155
|
var createSnippetClient = (apiKey, apiUrl) => {
|
|
1966
|
-
const baseUrl = apiUrl ||
|
|
2156
|
+
const baseUrl = apiUrl || DEFAULT_API33;
|
|
1967
2157
|
return {
|
|
1968
2158
|
/** Get your org's tracking snippet (write key + React/script-tag embeds + config). */
|
|
1969
2159
|
async get() {
|
|
@@ -1975,7 +2165,7 @@ var createSnippetClient = (apiKey, apiUrl) => {
|
|
|
1975
2165
|
|
|
1976
2166
|
// src/core.ts
|
|
1977
2167
|
var DEFAULT_HOST = "https://t.graph8.com";
|
|
1978
|
-
var
|
|
2168
|
+
var DEFAULT_API34 = "https://be.graph8.com";
|
|
1979
2169
|
var G8 = class {
|
|
1980
2170
|
constructor() {
|
|
1981
2171
|
/** @internal */
|
|
@@ -2017,6 +2207,10 @@ var G8 = class {
|
|
|
2017
2207
|
/** @internal */
|
|
2018
2208
|
this._fields = null;
|
|
2019
2209
|
/** @internal */
|
|
2210
|
+
this._apps = null;
|
|
2211
|
+
/** @internal */
|
|
2212
|
+
this._objects = null;
|
|
2213
|
+
/** @internal */
|
|
2020
2214
|
this._deals = null;
|
|
2021
2215
|
/** @internal */
|
|
2022
2216
|
this._inbox = null;
|
|
@@ -2058,7 +2252,7 @@ var G8 = class {
|
|
|
2058
2252
|
debug: config.debug
|
|
2059
2253
|
});
|
|
2060
2254
|
}
|
|
2061
|
-
const apiUrl = config.apiUrl ||
|
|
2255
|
+
const apiUrl = config.apiUrl || DEFAULT_API34;
|
|
2062
2256
|
const writeKey = config.writeKey || "";
|
|
2063
2257
|
const apiKey = config.apiKey || "";
|
|
2064
2258
|
if (writeKey) {
|
|
@@ -2081,6 +2275,8 @@ var G8 = class {
|
|
|
2081
2275
|
this._notes = createNotesClient(apiKey, apiUrl);
|
|
2082
2276
|
this._tasks = createTasksClient(apiKey, apiUrl);
|
|
2083
2277
|
this._fields = createFieldsClient(apiKey, apiUrl);
|
|
2278
|
+
this._apps = createAppsClient(apiKey, apiUrl);
|
|
2279
|
+
this._objects = createObjectsClient(apiKey, apiUrl);
|
|
2084
2280
|
this._deals = createDealsClient(apiKey, apiUrl);
|
|
2085
2281
|
this._inbox = createInboxClient(apiKey, apiUrl);
|
|
2086
2282
|
this._quotes = createQuotesClient(apiKey, apiUrl);
|
|
@@ -2201,6 +2397,16 @@ var G8 = class {
|
|
|
2201
2397
|
this._assertKey("fields");
|
|
2202
2398
|
return this._fields;
|
|
2203
2399
|
}
|
|
2400
|
+
/** Apps you build on graph8 — lifecycle, installs, usage, limits (requires API key). PREVIEW. */
|
|
2401
|
+
get apps() {
|
|
2402
|
+
this._assertKey("apps");
|
|
2403
|
+
return this._apps;
|
|
2404
|
+
}
|
|
2405
|
+
/** Custom object types, their schema, and their records (requires API key). PREVIEW. */
|
|
2406
|
+
get objects() {
|
|
2407
|
+
this._assertKey("objects");
|
|
2408
|
+
return this._objects;
|
|
2409
|
+
}
|
|
2204
2410
|
/** Deals and pipelines (requires API key). */
|
|
2205
2411
|
get deals() {
|
|
2206
2412
|
this._assertKey("deals");
|