@proteos/sdk 0.60.0 → 0.75.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 (40) hide show
  1. package/dist/{chunk-OOOTPEJK.js → chunk-3VQQEJV6.js} +71 -11
  2. package/dist/chunk-3VQQEJV6.js.map +1 -0
  3. package/dist/{chunk-25PD6TYH.cjs → chunk-C4CH6CEY.cjs} +75 -10
  4. package/dist/chunk-C4CH6CEY.cjs.map +1 -0
  5. package/dist/index.cjs +379 -130
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +813 -81
  8. package/dist/index.d.ts +813 -81
  9. package/dist/index.js +250 -13
  10. package/dist/index.js.map +1 -1
  11. package/dist/meta/index.cjs +109 -89
  12. package/dist/meta/index.d.cts +1 -1
  13. package/dist/meta/index.d.ts +1 -1
  14. package/dist/meta/index.js +1 -1
  15. package/dist/{types-DQmqR_G8.d.cts → types-Dp-AB2QZ.d.cts} +561 -48
  16. package/dist/{types-DQmqR_G8.d.ts → types-Dp-AB2QZ.d.ts} +561 -48
  17. package/package.json +1 -1
  18. package/src/agent/session-types.ts +8 -1
  19. package/src/agent/sessions.ts +6 -4
  20. package/src/agent/types.ts +9 -0
  21. package/src/auth/platform-entities.ts +6 -0
  22. package/src/client.ts +28 -4
  23. package/src/conversation/index.ts +327 -15
  24. package/src/conversation/types.ts +594 -5
  25. package/src/data/entity-indexes.ts +54 -0
  26. package/src/data/index.ts +12 -0
  27. package/src/data/types.ts +66 -0
  28. package/src/errors.ts +5 -0
  29. package/src/index.ts +57 -0
  30. package/src/meta/components.ts +23 -3
  31. package/src/meta/index.ts +8 -0
  32. package/src/meta/layout/common-props.ts +9 -0
  33. package/src/meta/layout/elements.ts +57 -0
  34. package/src/meta/layout/index.ts +5 -0
  35. package/src/meta/layout/page-layout.ts +15 -3
  36. package/src/meta/types.ts +206 -21
  37. package/src/scheduling/types.ts +5 -1
  38. package/src/workflow/types.ts +10 -2
  39. package/dist/chunk-25PD6TYH.cjs.map +0 -1
  40. package/dist/chunk-OOOTPEJK.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { AuditFieldsSchema, FileRefSchema, PrincipalRefSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-OOOTPEJK.js';
2
- export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, CURRENT_USER, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isCurrentUser, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-OOOTPEJK.js';
1
+ import { AuditFieldsSchema, FileRefSchema, PrincipalRefSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-3VQQEJV6.js';
2
+ export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, CURRENT_USER, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageSchema, RecordPageBindingSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, TriggerPageBindingSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, bundleVersionOf, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isCurrentUser, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-3VQQEJV6.js';
3
3
  import { z } from 'zod';
4
4
  import { fetchEventSource } from '@microsoft/fetch-event-source';
5
5
 
@@ -232,10 +232,11 @@ var SessionServiceImpl = class {
232
232
  for (const file of input.files ?? []) {
233
233
  content.push({ type: "file", ...file });
234
234
  }
235
+ const context = input.context?.trim();
235
236
  return this.appendEvent(id, {
236
237
  type: "user.message",
237
238
  ...input.turnId ? { turn_id: input.turnId } : {},
238
- payload: { content }
239
+ payload: { content, ...context ? { context } : {} }
239
240
  });
240
241
  }
241
242
  async interrupt(id) {
@@ -582,7 +583,12 @@ var ErrorCode = {
582
583
  CONFLICT: "conflict",
583
584
  INTERNAL_SERVER_ERROR: "internal_server_error",
584
585
  INVALID_PAYLOAD: "invalid_payload",
585
- INVALID_PERSONA: "invalid_persona"
586
+ INVALID_PERSONA: "invalid_persona",
587
+ /** The server was never reached: DNS, connection refused, network down.
588
+ * Carried with httpStatus 0. */
589
+ NETWORK_ERROR: "network_error",
590
+ /** The request timed out client-side. Carried with httpStatus 0. */
591
+ REQUEST_TIMEOUT: "request_timeout"
586
592
  };
587
593
  var ProteosError = class extends Error {
588
594
  /** HTTP status code of the response */
@@ -987,12 +993,18 @@ var PLATFORM_ENTITIES = [
987
993
  { slug: "channel-events", name: "Channel Events" },
988
994
  // Conversation briefs: guidance prepared ahead of a conversation (call, meeting) with a contact.
989
995
  { slug: "conversation-briefs", name: "Conversation Briefs" },
996
+ // Conversation notes: what a person recorded about a conversation (append log, author-stamped).
997
+ { slug: "conversation-notes", name: "Conversation Notes" },
990
998
  // Conversation intelligence: the typed questions asked of conversations
991
999
  // (definitions), where/when they are evaluated (sets), and the observations
992
1000
  // they produce incl. their evaluation history (tags).
993
1001
  { slug: "conversation-tag-definitions", name: "Conversation Tag Definitions" },
994
1002
  { slug: "conversation-tag-sets", name: "Conversation Tag Sets" },
995
1003
  { slug: "conversation-tags", name: "Conversation Tags" },
1004
+ // Conversation objectives: what a conversation should achieve (definitions)
1005
+ // and each definition's standing per conversation (objectives, read-only ledger).
1006
+ { slug: "conversation-objective-definitions", name: "Conversation Objective Definitions" },
1007
+ { slug: "conversation-objectives", name: "Conversation Objectives" },
996
1008
  // Connectors (connector-service). `connections` above is shared; this is the
997
1009
  // manifest catalog.
998
1010
  { slug: "connectors", name: "Connectors" },
@@ -1315,6 +1327,27 @@ var ProteosClient = class {
1315
1327
  }
1316
1328
  return AbortSignal.timeout(timeout);
1317
1329
  }
1330
+ /**
1331
+ * Runs fetch and turns a transport failure — DNS, connection refused, the
1332
+ * network being down, the timeout signal firing — into a ProteosError with
1333
+ * httpStatus 0, so callers can tell "the server said no" from "the server
1334
+ * was never reached" (the latter is worth retrying). An abort the caller
1335
+ * asked for is theirs and passes through untouched.
1336
+ */
1337
+ async send(url, init) {
1338
+ try {
1339
+ return await this.options.fetch(url, init);
1340
+ } catch (error) {
1341
+ if (error instanceof Error && error.name === "AbortError") throw error;
1342
+ const message = error instanceof Error ? error.message : "Network request failed";
1343
+ const isTimeout = error instanceof Error && (error.name === "TimeoutError" || error.message.startsWith("Request timeout"));
1344
+ throw new ProteosError(
1345
+ message,
1346
+ 0,
1347
+ isTimeout ? ErrorCode.REQUEST_TIMEOUT : ErrorCode.NETWORK_ERROR
1348
+ );
1349
+ }
1350
+ }
1318
1351
  /**
1319
1352
  * Performs an HTTP request and decodes the JSON response.
1320
1353
  *
@@ -1350,7 +1383,7 @@ var ProteosClient = class {
1350
1383
  }
1351
1384
  const headers = await this.buildHeaders(requestOptions);
1352
1385
  const signal = this.createTimeoutSignal(requestOptions);
1353
- const response = await this.options.fetch(url, {
1386
+ const response = await this.send(url, {
1354
1387
  method,
1355
1388
  headers,
1356
1389
  body: body !== void 0 ? JSON.stringify(body) : null,
@@ -1398,7 +1431,7 @@ var ProteosClient = class {
1398
1431
  headers.set("Authorization", `Bearer ${token}`);
1399
1432
  }
1400
1433
  const signal = this.createTimeoutSignal(requestOptions);
1401
- const response = await this.options.fetch(url, {
1434
+ const response = await this.send(url, {
1402
1435
  method,
1403
1436
  headers,
1404
1437
  body: formData,
@@ -1427,7 +1460,7 @@ var ProteosClient = class {
1427
1460
  const url = `${this.options.baseUrl}${path}`;
1428
1461
  const headers = await this.buildHeaders(requestOptions);
1429
1462
  const signal = this.createTimeoutSignal(requestOptions);
1430
- const response = await this.options.fetch(url, {
1463
+ const response = await this.send(url, {
1431
1464
  method,
1432
1465
  headers,
1433
1466
  body: body !== void 0 ? JSON.stringify(body) : null,
@@ -1696,6 +1729,10 @@ var ConversationClient = class {
1696
1729
  conversationTagSets;
1697
1730
  /** Conversation intelligence: the observations produced + their evaluation history. */
1698
1731
  conversationTags;
1732
+ /** Conversation objectives: WHAT a conversation should achieve (config, keyed, module-deployable). */
1733
+ conversationObjectiveDefinitions;
1734
+ /** Conversation objectives: the org-wide ledger of standings + grouped counts (read-only). */
1735
+ conversationObjectives;
1699
1736
  /** Generic audience taxonomy; membership lives on the contact. */
1700
1737
  contactGroups;
1701
1738
  /** Tone-of-voice synthesis: per-user setups + the generated profiles. */
@@ -1703,13 +1740,17 @@ var ConversationClient = class {
1703
1740
  transcriptions;
1704
1741
  /** Review-pass findings: likely misheard terms awaiting accept/reject. */
1705
1742
  mistranscribedTerms;
1706
- /** Meeting bots (Ava): dispatch into a meeting URL, remove from a meeting. */
1743
+ /** Meeting bots (Ava): dispatch into a meeting URL, summaries. */
1707
1744
  meetings;
1745
+ /** Ava's bots as remembered by the platform: list them, withdraw her from a meeting. */
1746
+ meetingBots;
1708
1747
  /** Realtime speech-to-text (dictation) — moved here from agent-service. */
1709
1748
  voice;
1710
1749
  calls;
1711
1750
  /** Conversation briefs: guidance prepared ahead of a conversation (call, meeting) with a contact. */
1712
1751
  conversationBriefs;
1752
+ /** Conversation notes: what a person recorded about a conversation (append log, author-stamped). */
1753
+ conversationNotes;
1713
1754
  constructor(client) {
1714
1755
  this.connections = new ConnectionServiceImpl(client);
1715
1756
  this.conversations = new ConversationServiceImpl(client);
@@ -1725,30 +1766,61 @@ var ConversationClient = class {
1725
1766
  this.conversationTagDefinitions = new ConversationTagDefinitionServiceImpl(client);
1726
1767
  this.conversationTagSets = new ConversationTagSetServiceImpl(client);
1727
1768
  this.conversationTags = new ConversationTagServiceImpl(client);
1769
+ this.conversationObjectiveDefinitions = new ConversationObjectiveDefinitionServiceImpl(client);
1770
+ this.conversationObjectives = new ConversationObjectiveServiceImpl(client);
1728
1771
  this.contactGroups = new ContactGroupServiceImpl(client);
1729
1772
  this.toneProfiles = new ToneProfileServiceImpl(client);
1730
1773
  this.transcriptions = new TranscriptionServiceImpl(client);
1731
1774
  this.mistranscribedTerms = new MistranscribedTermServiceImpl(client);
1732
1775
  this.meetings = new MeetingServiceImpl(client);
1776
+ this.meetingBots = new MeetingBotServiceImpl(client);
1733
1777
  this.voice = new VoiceServiceImpl(client);
1734
1778
  this.calls = new CallServiceImpl(client);
1735
1779
  this.conversationBriefs = new ConversationBriefServiceImpl(client);
1780
+ this.conversationNotes = new ConversationNoteServiceImpl(client);
1736
1781
  }
1737
1782
  };
1738
- var MeetingServiceImpl = class {
1783
+ var ConversationNoteServiceImpl = class {
1739
1784
  constructor(client) {
1740
1785
  this.client = client;
1741
1786
  }
1742
1787
  client;
1743
- dispatch(request) {
1744
- return this.client.request("POST", `${CONVERSATION_BASE_PATH}/meetings`, request);
1788
+ list(conversationId, query = {}) {
1789
+ return this.client.requestWithQuery(
1790
+ "GET",
1791
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/notes`,
1792
+ query
1793
+ );
1745
1794
  }
1746
- remove(conversationId) {
1795
+ create(conversationId, request) {
1796
+ return this.client.request(
1797
+ "POST",
1798
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/notes`,
1799
+ request
1800
+ );
1801
+ }
1802
+ update(id, request) {
1803
+ return this.client.request(
1804
+ "PATCH",
1805
+ `${CONVERSATION_BASE_PATH}/conversation-notes/${encodeURIComponent(id)}`,
1806
+ request
1807
+ );
1808
+ }
1809
+ delete(id) {
1747
1810
  return this.client.request(
1748
1811
  "DELETE",
1749
- `${CONVERSATION_BASE_PATH}/meetings/${encodeURIComponent(conversationId)}`
1812
+ `${CONVERSATION_BASE_PATH}/conversation-notes/${encodeURIComponent(id)}`
1750
1813
  );
1751
1814
  }
1815
+ };
1816
+ var MeetingServiceImpl = class {
1817
+ constructor(client) {
1818
+ this.client = client;
1819
+ }
1820
+ client;
1821
+ dispatch(request) {
1822
+ return this.client.request("POST", `${CONVERSATION_BASE_PATH}/meetings`, request);
1823
+ }
1752
1824
  summarize(conversationId) {
1753
1825
  return this.client.request(
1754
1826
  "POST",
@@ -1756,6 +1828,21 @@ var MeetingServiceImpl = class {
1756
1828
  );
1757
1829
  }
1758
1830
  };
1831
+ var MeetingBotServiceImpl = class {
1832
+ constructor(client) {
1833
+ this.client = client;
1834
+ }
1835
+ client;
1836
+ list(query = {}) {
1837
+ return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/meeting-bots`, query);
1838
+ }
1839
+ remove(id) {
1840
+ return this.client.request(
1841
+ "DELETE",
1842
+ `${CONVERSATION_BASE_PATH}/meeting-bots/${encodeURIComponent(id)}`
1843
+ );
1844
+ }
1845
+ };
1759
1846
  var ConnectionServiceImpl = class {
1760
1847
  constructor(client) {
1761
1848
  this.client = client;
@@ -2010,6 +2097,19 @@ var ConversationServiceImpl = class {
2010
2097
  `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(id)}`
2011
2098
  );
2012
2099
  }
2100
+ listOutcomes(id) {
2101
+ return this.client.request(
2102
+ "GET",
2103
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(id)}/outcomes`
2104
+ );
2105
+ }
2106
+ async getObjectiveProgress(id) {
2107
+ const response = await this.client.request(
2108
+ "GET",
2109
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(id)}/objective-progress`
2110
+ );
2111
+ return response.data;
2112
+ }
2013
2113
  update(id, request) {
2014
2114
  return this.client.request(
2015
2115
  "PATCH",
@@ -2371,6 +2471,12 @@ var ConversationTagServiceImpl = class {
2371
2471
  request
2372
2472
  );
2373
2473
  }
2474
+ listApplicableDefinitions(conversationId) {
2475
+ return this.client.request(
2476
+ "GET",
2477
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/tag-definitions`
2478
+ );
2479
+ }
2374
2480
  evaluate(conversationId, request = {}) {
2375
2481
  return this.client.request(
2376
2482
  "POST",
@@ -2409,6 +2515,75 @@ var ConversationTagServiceImpl = class {
2409
2515
  );
2410
2516
  }
2411
2517
  };
2518
+ var ConversationObjectiveDefinitionServiceImpl = class {
2519
+ constructor(client) {
2520
+ this.client = client;
2521
+ }
2522
+ client;
2523
+ list(query = {}) {
2524
+ return this.listPage(query);
2525
+ }
2526
+ listPage(query = {}) {
2527
+ return this.client.requestWithQuery(
2528
+ "GET",
2529
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions`,
2530
+ query
2531
+ );
2532
+ }
2533
+ get(key) {
2534
+ return this.client.request(
2535
+ "GET",
2536
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`
2537
+ );
2538
+ }
2539
+ create(request) {
2540
+ return this.client.request(
2541
+ "POST",
2542
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions`,
2543
+ request
2544
+ );
2545
+ }
2546
+ update(key, request) {
2547
+ return this.client.request(
2548
+ "PATCH",
2549
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`,
2550
+ request
2551
+ );
2552
+ }
2553
+ upsert(key, request) {
2554
+ return this.client.request(
2555
+ "PUT",
2556
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`,
2557
+ { ...request, key }
2558
+ );
2559
+ }
2560
+ async delete(key) {
2561
+ await this.client.request(
2562
+ "DELETE",
2563
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`
2564
+ );
2565
+ }
2566
+ };
2567
+ var ConversationObjectiveServiceImpl = class {
2568
+ constructor(client) {
2569
+ this.client = client;
2570
+ }
2571
+ client;
2572
+ list(query = {}) {
2573
+ return this.client.requestWithQuery(
2574
+ "GET",
2575
+ `${CONVERSATION_BASE_PATH}/conversation-objectives`,
2576
+ query
2577
+ );
2578
+ }
2579
+ counts(query = {}) {
2580
+ return this.client.requestWithQuery(
2581
+ "GET",
2582
+ `${CONVERSATION_BASE_PATH}/conversation-objectives/counts`,
2583
+ query
2584
+ );
2585
+ }
2586
+ };
2412
2587
  var ContactGroupServiceImpl = class {
2413
2588
  constructor(client) {
2414
2589
  this.client = client;
@@ -2583,6 +2758,19 @@ var CallServiceImpl = class {
2583
2758
  mintToken(request) {
2584
2759
  return this.client.request("POST", `${CONVERSATION_BASE_PATH}/calls/token`, request);
2585
2760
  }
2761
+ getCallConversation(connectionId, externalCallId) {
2762
+ return this.client.request(
2763
+ "GET",
2764
+ `${CONVERSATION_BASE_PATH}/connections/${encodeURIComponent(connectionId)}/calls/${encodeURIComponent(externalCallId)}`
2765
+ );
2766
+ }
2767
+ setRecording(conversationId, request) {
2768
+ return this.client.request(
2769
+ "PUT",
2770
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/recording`,
2771
+ request
2772
+ );
2773
+ }
2586
2774
  listPhoneNumbers(connectionId) {
2587
2775
  return this.client.request(
2588
2776
  "GET",
@@ -2755,6 +2943,42 @@ var ChannelEventServiceImpl = class {
2755
2943
  }
2756
2944
  };
2757
2945
 
2946
+ // src/data/entity-indexes.ts
2947
+ var ENTITIES_BASE_PATH = "/data/v1/entities";
2948
+ var EntityIndexServiceImpl = class {
2949
+ constructor(client) {
2950
+ this.client = client;
2951
+ }
2952
+ client;
2953
+ async list(entitySlug) {
2954
+ const response = await this.client.request(
2955
+ "GET",
2956
+ `${ENTITIES_BASE_PATH}/${encodeURIComponent(entitySlug)}/indexes`
2957
+ );
2958
+ return response.data;
2959
+ }
2960
+ async recommendations(entitySlug) {
2961
+ const response = await this.client.request(
2962
+ "GET",
2963
+ `${ENTITIES_BASE_PATH}/${encodeURIComponent(entitySlug)}/index-recommendations`
2964
+ );
2965
+ return response.data;
2966
+ }
2967
+ async create(entitySlug, request) {
2968
+ return this.client.request(
2969
+ "POST",
2970
+ `${ENTITIES_BASE_PATH}/${encodeURIComponent(entitySlug)}/indexes`,
2971
+ request
2972
+ );
2973
+ }
2974
+ async delete(entitySlug, name) {
2975
+ await this.client.request(
2976
+ "DELETE",
2977
+ `${ENTITIES_BASE_PATH}/${encodeURIComponent(entitySlug)}/indexes/${encodeURIComponent(name)}`
2978
+ );
2979
+ }
2980
+ };
2981
+
2758
2982
  // src/data/queries.ts
2759
2983
  var QUERY_BASE_PATH = "/data/v1/query";
2760
2984
  var QueryServiceImpl = class {
@@ -2884,6 +3108,16 @@ var BatchUpsertTransactionResultSchema = z.object({
2884
3108
  var BatchUpsertRecordsResponseSchema = z.object({
2885
3109
  results: z.array(BatchUpsertTransactionResultSchema)
2886
3110
  });
3111
+ z.object({
3112
+ name: z.string(),
3113
+ type: z.enum(["lookup", "unique", "search"]),
3114
+ attributes: z.array(z.string()),
3115
+ source: z.enum(["declared", "automatic", "applied"]),
3116
+ state: z.enum(["ready", "building", "invalid", "missing"]).optional(),
3117
+ size_bytes: z.number().optional(),
3118
+ scans: z.number().optional(),
3119
+ created_at: z.string().optional()
3120
+ });
2887
3121
 
2888
3122
  // src/data/index.ts
2889
3123
  var DataClient = class {
@@ -2891,10 +3125,13 @@ var DataClient = class {
2891
3125
  queries;
2892
3126
  /** Duplicate pairs of an entity's records (raised by contact binding). */
2893
3127
  recordDuplicates;
3128
+ /** Per-entity indexes on the record table + the advisor's recommendations. */
3129
+ entityIndexes;
2894
3130
  constructor(client) {
2895
3131
  this.records = new RecordServiceImpl(client);
2896
3132
  this.queries = new QueryServiceImpl(client);
2897
3133
  this.recordDuplicates = new RecordDuplicateServiceImpl(client);
3134
+ this.entityIndexes = new EntityIndexServiceImpl(client);
2898
3135
  }
2899
3136
  };
2900
3137