@gleanwork/api-client 0.13.4 → 0.13.6

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 (166) hide show
  1. package/dist/commonjs/__tests__/summarize.test.js +3 -4
  2. package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
  3. package/dist/commonjs/lib/config.d.ts +3 -3
  4. package/dist/commonjs/lib/config.js +3 -3
  5. package/dist/commonjs/models/components/activityevent.d.ts +21 -0
  6. package/dist/commonjs/models/components/activityevent.d.ts.map +1 -1
  7. package/dist/commonjs/models/components/activityevent.js +21 -0
  8. package/dist/commonjs/models/components/activityevent.js.map +1 -1
  9. package/dist/commonjs/models/components/agentconfig.d.ts +21 -0
  10. package/dist/commonjs/models/components/agentconfig.d.ts.map +1 -1
  11. package/dist/commonjs/models/components/agentconfig.js +21 -0
  12. package/dist/commonjs/models/components/agentconfig.js.map +1 -1
  13. package/dist/commonjs/models/components/chatmessage.d.ts +27 -0
  14. package/dist/commonjs/models/components/chatmessage.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/chatmessage.js +27 -0
  16. package/dist/commonjs/models/components/chatmessage.js.map +1 -1
  17. package/dist/commonjs/models/components/documentvisibility.d.ts +18 -0
  18. package/dist/commonjs/models/components/documentvisibility.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/documentvisibility.js +18 -0
  20. package/dist/commonjs/models/components/documentvisibility.js.map +1 -1
  21. package/dist/commonjs/models/components/facetfiltervalue.d.ts +15 -0
  22. package/dist/commonjs/models/components/facetfiltervalue.d.ts.map +1 -1
  23. package/dist/commonjs/models/components/facetfiltervalue.js +15 -0
  24. package/dist/commonjs/models/components/facetfiltervalue.js.map +1 -1
  25. package/dist/commonjs/models/components/feedback.d.ts +90 -0
  26. package/dist/commonjs/models/components/feedback.d.ts.map +1 -1
  27. package/dist/commonjs/models/components/feedback.js +90 -0
  28. package/dist/commonjs/models/components/feedback.js.map +1 -1
  29. package/dist/commonjs/models/components/listentitiesrequest.d.ts +6 -0
  30. package/dist/commonjs/models/components/listentitiesrequest.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/listentitiesrequest.js +6 -0
  32. package/dist/commonjs/models/components/listentitiesrequest.js.map +1 -1
  33. package/dist/commonjs/models/components/personmetadata.d.ts +12 -0
  34. package/dist/commonjs/models/components/personmetadata.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/personmetadata.js +12 -0
  36. package/dist/commonjs/models/components/personmetadata.js.map +1 -1
  37. package/dist/commonjs/models/components/relateddocuments.d.ts +3 -0
  38. package/dist/commonjs/models/components/relateddocuments.d.ts.map +1 -1
  39. package/dist/commonjs/models/components/relateddocuments.js +3 -0
  40. package/dist/commonjs/models/components/relateddocuments.js.map +1 -1
  41. package/dist/commonjs/models/components/searchrequestoptions.d.ts +15 -0
  42. package/dist/commonjs/models/components/searchrequestoptions.d.ts.map +1 -1
  43. package/dist/commonjs/models/components/searchrequestoptions.js +15 -0
  44. package/dist/commonjs/models/components/searchrequestoptions.js.map +1 -1
  45. package/dist/commonjs/models/components/searchresultprominenceenum.d.ts +9 -0
  46. package/dist/commonjs/models/components/searchresultprominenceenum.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/searchresultprominenceenum.js +9 -0
  48. package/dist/commonjs/models/components/searchresultprominenceenum.js.map +1 -1
  49. package/dist/commonjs/models/components/sectiontype.d.ts +9 -0
  50. package/dist/commonjs/models/components/sectiontype.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/sectiontype.js +9 -0
  52. package/dist/commonjs/models/components/sectiontype.js.map +1 -1
  53. package/dist/commonjs/models/components/structuredresult.d.ts +9 -0
  54. package/dist/commonjs/models/components/structuredresult.d.ts.map +1 -1
  55. package/dist/commonjs/models/components/structuredresult.js +9 -0
  56. package/dist/commonjs/models/components/structuredresult.js.map +1 -1
  57. package/dist/commonjs/models/components/toolmetadata.d.ts +4 -3
  58. package/dist/commonjs/models/components/toolmetadata.d.ts.map +1 -1
  59. package/dist/commonjs/models/components/toolmetadata.js +2 -1
  60. package/dist/commonjs/models/components/toolmetadata.js.map +1 -1
  61. package/dist/commonjs/models/components/updatetype.d.ts +6 -0
  62. package/dist/commonjs/models/components/updatetype.d.ts.map +1 -1
  63. package/dist/commonjs/models/components/updatetype.js +6 -0
  64. package/dist/commonjs/models/components/updatetype.js.map +1 -1
  65. package/dist/commonjs/types/enums.d.ts +10 -6
  66. package/dist/commonjs/types/enums.d.ts.map +1 -1
  67. package/dist/commonjs/types/enums.js +76 -2
  68. package/dist/commonjs/types/enums.js.map +1 -1
  69. package/dist/commonjs/types/index.d.ts +0 -1
  70. package/dist/commonjs/types/index.d.ts.map +1 -1
  71. package/dist/commonjs/types/index.js +1 -3
  72. package/dist/commonjs/types/index.js.map +1 -1
  73. package/dist/esm/__tests__/summarize.test.js +3 -4
  74. package/dist/esm/__tests__/summarize.test.js.map +1 -1
  75. package/dist/esm/lib/config.d.ts +3 -3
  76. package/dist/esm/lib/config.js +3 -3
  77. package/dist/esm/models/components/activityevent.d.ts +21 -0
  78. package/dist/esm/models/components/activityevent.d.ts.map +1 -1
  79. package/dist/esm/models/components/activityevent.js +21 -0
  80. package/dist/esm/models/components/activityevent.js.map +1 -1
  81. package/dist/esm/models/components/agentconfig.d.ts +21 -0
  82. package/dist/esm/models/components/agentconfig.d.ts.map +1 -1
  83. package/dist/esm/models/components/agentconfig.js +21 -0
  84. package/dist/esm/models/components/agentconfig.js.map +1 -1
  85. package/dist/esm/models/components/chatmessage.d.ts +27 -0
  86. package/dist/esm/models/components/chatmessage.d.ts.map +1 -1
  87. package/dist/esm/models/components/chatmessage.js +27 -0
  88. package/dist/esm/models/components/chatmessage.js.map +1 -1
  89. package/dist/esm/models/components/documentvisibility.d.ts +18 -0
  90. package/dist/esm/models/components/documentvisibility.d.ts.map +1 -1
  91. package/dist/esm/models/components/documentvisibility.js +18 -0
  92. package/dist/esm/models/components/documentvisibility.js.map +1 -1
  93. package/dist/esm/models/components/facetfiltervalue.d.ts +15 -0
  94. package/dist/esm/models/components/facetfiltervalue.d.ts.map +1 -1
  95. package/dist/esm/models/components/facetfiltervalue.js +15 -0
  96. package/dist/esm/models/components/facetfiltervalue.js.map +1 -1
  97. package/dist/esm/models/components/feedback.d.ts +90 -0
  98. package/dist/esm/models/components/feedback.d.ts.map +1 -1
  99. package/dist/esm/models/components/feedback.js +90 -0
  100. package/dist/esm/models/components/feedback.js.map +1 -1
  101. package/dist/esm/models/components/listentitiesrequest.d.ts +6 -0
  102. package/dist/esm/models/components/listentitiesrequest.d.ts.map +1 -1
  103. package/dist/esm/models/components/listentitiesrequest.js +6 -0
  104. package/dist/esm/models/components/listentitiesrequest.js.map +1 -1
  105. package/dist/esm/models/components/personmetadata.d.ts +12 -0
  106. package/dist/esm/models/components/personmetadata.d.ts.map +1 -1
  107. package/dist/esm/models/components/personmetadata.js +12 -0
  108. package/dist/esm/models/components/personmetadata.js.map +1 -1
  109. package/dist/esm/models/components/relateddocuments.d.ts +3 -0
  110. package/dist/esm/models/components/relateddocuments.d.ts.map +1 -1
  111. package/dist/esm/models/components/relateddocuments.js +3 -0
  112. package/dist/esm/models/components/relateddocuments.js.map +1 -1
  113. package/dist/esm/models/components/searchrequestoptions.d.ts +15 -0
  114. package/dist/esm/models/components/searchrequestoptions.d.ts.map +1 -1
  115. package/dist/esm/models/components/searchrequestoptions.js +15 -0
  116. package/dist/esm/models/components/searchrequestoptions.js.map +1 -1
  117. package/dist/esm/models/components/searchresultprominenceenum.d.ts +9 -0
  118. package/dist/esm/models/components/searchresultprominenceenum.d.ts.map +1 -1
  119. package/dist/esm/models/components/searchresultprominenceenum.js +9 -0
  120. package/dist/esm/models/components/searchresultprominenceenum.js.map +1 -1
  121. package/dist/esm/models/components/sectiontype.d.ts +9 -0
  122. package/dist/esm/models/components/sectiontype.d.ts.map +1 -1
  123. package/dist/esm/models/components/sectiontype.js +9 -0
  124. package/dist/esm/models/components/sectiontype.js.map +1 -1
  125. package/dist/esm/models/components/structuredresult.d.ts +9 -0
  126. package/dist/esm/models/components/structuredresult.d.ts.map +1 -1
  127. package/dist/esm/models/components/structuredresult.js +9 -0
  128. package/dist/esm/models/components/structuredresult.js.map +1 -1
  129. package/dist/esm/models/components/toolmetadata.d.ts +4 -3
  130. package/dist/esm/models/components/toolmetadata.d.ts.map +1 -1
  131. package/dist/esm/models/components/toolmetadata.js +2 -1
  132. package/dist/esm/models/components/toolmetadata.js.map +1 -1
  133. package/dist/esm/models/components/updatetype.d.ts +6 -0
  134. package/dist/esm/models/components/updatetype.d.ts.map +1 -1
  135. package/dist/esm/models/components/updatetype.js +6 -0
  136. package/dist/esm/models/components/updatetype.js.map +1 -1
  137. package/dist/esm/types/enums.d.ts +10 -6
  138. package/dist/esm/types/enums.d.ts.map +1 -1
  139. package/dist/esm/types/enums.js +38 -1
  140. package/dist/esm/types/enums.js.map +1 -1
  141. package/dist/esm/types/index.d.ts +0 -1
  142. package/dist/esm/types/index.d.ts.map +1 -1
  143. package/dist/esm/types/index.js +0 -1
  144. package/dist/esm/types/index.js.map +1 -1
  145. package/examples/package-lock.json +1 -1
  146. package/jsr.json +1 -1
  147. package/package.json +1 -1
  148. package/src/__tests__/summarize.test.ts +3 -4
  149. package/src/lib/config.ts +3 -3
  150. package/src/models/components/activityevent.ts +21 -0
  151. package/src/models/components/agentconfig.ts +21 -0
  152. package/src/models/components/chatmessage.ts +27 -0
  153. package/src/models/components/documentvisibility.ts +18 -0
  154. package/src/models/components/facetfiltervalue.ts +15 -0
  155. package/src/models/components/feedback.ts +90 -0
  156. package/src/models/components/listentitiesrequest.ts +6 -0
  157. package/src/models/components/personmetadata.ts +12 -0
  158. package/src/models/components/relateddocuments.ts +3 -0
  159. package/src/models/components/searchrequestoptions.ts +15 -0
  160. package/src/models/components/searchresultprominenceenum.ts +9 -0
  161. package/src/models/components/sectiontype.ts +9 -0
  162. package/src/models/components/structuredresult.ts +9 -0
  163. package/src/models/components/toolmetadata.ts +4 -3
  164. package/src/models/components/updatetype.ts +6 -0
  165. package/src/types/enums.ts +55 -6
  166. package/src/types/index.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAInD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "@gleanwork/api-client",
21
- "version": "0.13.4",
21
+ "version": "0.13.6",
22
22
  "dependencies": {
23
23
  "zod": "^3.25.0 || ^4.0.0"
24
24
  },
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gleanwork/api-client",
5
- "version": "0.13.4",
5
+ "version": "0.13.6",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gleanwork/api-client",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "author": "Speakeasy",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -18,12 +18,11 @@ test("Summarize Summarize", async () => {
18
18
  const result = await glean.client.documents.summarize({
19
19
  documentSpecs: [
20
20
  {
21
- ugcType: "SHORTCUTS",
22
- contentId: 602763,
21
+ ugcType: "ANNOUNCEMENTS",
22
+ contentId: 936916,
23
23
  },
24
24
  {
25
- ugcType: "SHORTCUTS",
26
- contentId: 602763,
25
+ url: "https://ruddy-massage.net",
27
26
  },
28
27
  ],
29
28
  });
package/src/lib/config.ts CHANGED
@@ -68,8 +68,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "0.9.0",
71
- sdkVersion: "0.13.4",
72
- genVersion: "2.743.2",
71
+ sdkVersion: "0.13.6",
72
+ genVersion: "2.753.1",
73
73
  userAgent:
74
- "speakeasy-sdk/typescript 0.13.4 2.743.2 0.9.0 @gleanwork/api-client",
74
+ "speakeasy-sdk/typescript 0.13.6 2.753.1 0.9.0 @gleanwork/api-client",
75
75
  } as const;
@@ -14,12 +14,33 @@ import {
14
14
  * The type of activity this represents.
15
15
  */
16
16
  export const ActivityEventAction = {
17
+ /**
18
+ * Represents a visit to the given `url`.
19
+ */
17
20
  View: "VIEW",
21
+ /**
22
+ * Represents an edit of the document represented by the `url`.
23
+ */
18
24
  Edit: "EDIT",
25
+ /**
26
+ * Represents a search performed at the given `url`.
27
+ */
19
28
  Search: "SEARCH",
29
+ /**
30
+ * Represents a comment on the document represented by the `url`.
31
+ */
20
32
  Comment: "COMMENT",
33
+ /**
34
+ * Represents an explicit request to index the given `url` along with associated attributes in this payload.
35
+ */
21
36
  Crawl: "CRAWL",
37
+ /**
38
+ * Represents a search performed at the given `url` as indicated by the user's history.
39
+ */
22
40
  HistoricalSearch: "HISTORICAL_SEARCH",
41
+ /**
42
+ * Represents a visit to the given `url` as indicated by the user's history.
43
+ */
23
44
  HistoricalView: "HISTORICAL_VIEW",
24
45
  } as const;
25
46
  /**
@@ -18,10 +18,25 @@ import {
18
18
  * Name of the agent.
19
19
  */
20
20
  export const AgentEnum = {
21
+ /**
22
+ * Integrates with your company's knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values
23
+ */
21
24
  Default: "DEFAULT",
25
+ /**
26
+ * Communicates directly with the LLM. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values
27
+ */
22
28
  Gpt: "GPT",
29
+ /**
30
+ * Uses both company and web knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values
31
+ */
23
32
  Universal: "UNIVERSAL",
33
+ /**
34
+ * Uses an agent powered by the agentic engine that responds faster but may have lower quality results. Requires the agentic engine to be enabled in the deployment.
35
+ */
24
36
  Fast: "FAST",
37
+ /**
38
+ * Uses an agent powered by the agentic engine that thinks for longer and potentially makes more LLM calls to return higher quality results. Requires the agentic engine to be enabled in the deployment.
39
+ */
25
40
  Advanced: "ADVANCED",
26
41
  } as const;
27
42
  /**
@@ -33,7 +48,13 @@ export type AgentEnum = ClosedEnum<typeof AgentEnum>;
33
48
  * Top level modes to run GleanChat in.
34
49
  */
35
50
  export const Mode = {
51
+ /**
52
+ * Used if no mode supplied.
53
+ */
36
54
  Default: "DEFAULT",
55
+ /**
56
+ * Deprecated.
57
+ */
37
58
  Quick: "QUICK",
38
59
  } as const;
39
60
  /**
@@ -36,14 +36,41 @@ export type Author = ClosedEnum<typeof Author>;
36
36
  * Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified.
37
37
  */
38
38
  export const MessageType = {
39
+ /**
40
+ * An intermediate state message for progress updates.
41
+ */
39
42
  Update: "UPDATE",
43
+ /**
44
+ * A user query or response message.
45
+ */
40
46
  Content: "CONTENT",
47
+ /**
48
+ * A message providing context in addition to the user query.
49
+ */
41
50
  Context: "CONTEXT",
51
+ /**
52
+ * A debug message. Strictly used internally.
53
+ */
42
54
  Debug: "DEBUG",
55
+ /**
56
+ * A debug message to be used while debugging Action creation.
57
+ */
43
58
  DebugExternal: "DEBUG_EXTERNAL",
59
+ /**
60
+ * A message that describes an error while processing the request.
61
+ */
44
62
  Error: "ERROR",
63
+ /**
64
+ * A heading message used to distinguish different sections of the holistic response.
65
+ */
45
66
  Heading: "HEADING",
67
+ /**
68
+ * A warning message to be shown to the user.
69
+ */
46
70
  Warning: "WARNING",
71
+ /**
72
+ * A message used to for server-side tool auth/use, for request and response.
73
+ */
47
74
  ServerTool: "SERVER_TOOL",
48
75
  } as const;
49
76
  /**
@@ -9,11 +9,29 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  * The level of visibility of the document as understood by our system.
10
10
  */
11
11
  export const DocumentVisibility = {
12
+ /**
13
+ * Only one person is able to see the document.
14
+ */
12
15
  Private: "PRIVATE",
16
+ /**
17
+ * Only specific people and/or groups can see the document.
18
+ */
13
19
  SpecificPeopleAndGroups: "SPECIFIC_PEOPLE_AND_GROUPS",
20
+ /**
21
+ * Anyone in the domain with the link can see the document.
22
+ */
14
23
  DomainLink: "DOMAIN_LINK",
24
+ /**
25
+ * Anyone in the domain can search for the document.
26
+ */
15
27
  DomainVisible: "DOMAIN_VISIBLE",
28
+ /**
29
+ * Anyone with the link can see the document.
30
+ */
16
31
  PublicLink: "PUBLIC_LINK",
32
+ /**
33
+ * Anyone on the internet can search for the document.
34
+ */
17
35
  PublicVisible: "PUBLIC_VISIBLE",
18
36
  } as const;
19
37
  /**
@@ -9,10 +9,25 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export const RelationType = {
12
+ /**
13
+ * The value is equal to the specified value.
14
+ */
12
15
  Equals: "EQUALS",
16
+ /**
17
+ * The value is equal to the specified ID.
18
+ */
13
19
  IdEquals: "ID_EQUALS",
20
+ /**
21
+ * The value is less than the specified value.
22
+ */
14
23
  Lt: "LT",
24
+ /**
25
+ * The value is greater than the specified value.
26
+ */
15
27
  Gt: "GT",
28
+ /**
29
+ * The value is not equal to the specified value.
30
+ */
16
31
  NotEquals: "NOT_EQUALS",
17
32
  } as const;
18
33
  export type RelationType = ClosedEnum<typeof RelationType>;
@@ -62,36 +62,126 @@ export type FeedbackCategory = ClosedEnum<typeof FeedbackCategory>;
62
62
  * The action the user took within a Glean client with respect to the object referred to by the given `trackingToken`.
63
63
  */
64
64
  export const Event = {
65
+ /**
66
+ * The object's primary link was clicked with the intent to view its full representation. Depending on the object type, this may imply an external navigation or navigating to a new page or view within the Glean app.
67
+ */
65
68
  Click: "CLICK",
69
+ /**
70
+ * A link to the object's parent container (e.g. the folder in which it's located) was clicked.
71
+ */
66
72
  ContainerClick: "CONTAINER_CLICK",
73
+ /**
74
+ * The user copied a link to the primary link.
75
+ */
67
76
  CopyLink: "COPY_LINK",
77
+ /**
78
+ * The user creates a document.
79
+ */
68
80
  Create: "CREATE",
81
+ /**
82
+ * The user dismissed the object such that it was hidden from view.
83
+ */
69
84
  Dismiss: "DISMISS",
85
+ /**
86
+ * The user gave feedback that the object was not useful.
87
+ */
70
88
  Downvote: "DOWNVOTE",
89
+ /**
90
+ * The user attempted to send an email.
91
+ */
71
92
  Email: "EMAIL",
93
+ /**
94
+ * The user executed the object (e.g. ran a workflow).
95
+ */
72
96
  Execute: "EXECUTE",
97
+ /**
98
+ * The user applied a filter.
99
+ */
73
100
  Filter: "FILTER",
101
+ /**
102
+ * The first token of a streaming response is received.
103
+ */
74
104
  FirstToken: "FIRST_TOKEN",
105
+ /**
106
+ * The user clicked into an interactive element, e.g. the search box.
107
+ */
75
108
  FocusIn: "FOCUS_IN",
109
+ /**
110
+ * The final token of a streaming response is received.
111
+ */
76
112
  LastToken: "LAST_TOKEN",
113
+ /**
114
+ * The user submitted textual manual feedback regarding the object.
115
+ */
77
116
  ManualFeedback: "MANUAL_FEEDBACK",
117
+ /**
118
+ * The user submitted comparative feedback for multiple side-by-side implementations.
119
+ */
78
120
  ManualFeedbackSideBySide: "MANUAL_FEEDBACK_SIDE_BY_SIDE",
121
+ /**
122
+ * The user explicitly marked the content as read.
123
+ */
79
124
  MarkAsRead: "MARK_AS_READ",
125
+ /**
126
+ * The user attempted to send a message using their default messaing app.
127
+ */
80
128
  Message: "MESSAGE",
129
+ /**
130
+ * The user middle clicked the object's primary link with the intent to open its full representation in a new tab.
131
+ */
81
132
  MiddleClick: "MIDDLE_CLICK",
133
+ /**
134
+ * The user puts a page out of focus but keeps it in the background.
135
+ */
82
136
  PageBlur: "PAGE_BLUR",
137
+ /**
138
+ * The user puts a page in focus, meaning it is the first to receive keyboard events.
139
+ */
83
140
  PageFocus: "PAGE_FOCUS",
141
+ /**
142
+ * The user leaves a page and it is unloaded (by clicking a link, closing the tab/window, etc).
143
+ */
84
144
  PageLeave: "PAGE_LEAVE",
145
+ /**
146
+ * The user clicked the object's inline preview affordance.
147
+ */
85
148
  Preview: "PREVIEW",
86
149
  RelatedClick: "RELATED_CLICK",
150
+ /**
151
+ * The user right clicked the object's primary link. This may indicate an intent to open it in a new tab or copy it.
152
+ */
87
153
  RightClick: "RIGHT_CLICK",
154
+ /**
155
+ * The user clicked a link to a subsection of the primary object.
156
+ */
88
157
  SectionClick: "SECTION_CLICK",
158
+ /**
159
+ * The user has likely seen the object (e.g. took action to make the object visible within the user's viewport).
160
+ */
89
161
  Seen: "SEEN",
162
+ /**
163
+ * The user explicitly selected something, eg. a chat response variant they prefer.
164
+ */
90
165
  Select: "SELECT",
166
+ /**
167
+ * The user shared the object with another user.
168
+ */
91
169
  Share: "SHARE",
170
+ /**
171
+ * The user clicked the object's show more affordance.
172
+ */
92
173
  ShowMore: "SHOW_MORE",
174
+ /**
175
+ * The user gave feedback that the object was useful.
176
+ */
93
177
  Upvote: "UPVOTE",
178
+ /**
179
+ * The object was visible within the user's viewport.
180
+ */
94
181
  View: "VIEW",
182
+ /**
183
+ * The object was visible within the user's viewport.
184
+ */
95
185
  Visible: "VISIBLE",
96
186
  } as const;
97
187
  /**
@@ -43,7 +43,13 @@ export type ListEntitiesRequestIncludeField = ClosedEnum<
43
43
  * The type of request being made.
44
44
  */
45
45
  export const RequestType = {
46
+ /**
47
+ * Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities.
48
+ */
46
49
  Standard: "STANDARD",
50
+ /**
51
+ * Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations.
52
+ */
47
53
  FullDirectory: "FULL_DIRECTORY",
48
54
  } as const;
49
55
  /**
@@ -82,9 +82,21 @@ import {
82
82
  } from "./structuredlocation.js";
83
83
 
84
84
  export const PersonMetadataType = {
85
+ /**
86
+ * The person is a current full-time employee of the company.
87
+ */
85
88
  FullTime: "FULL_TIME",
89
+ /**
90
+ * The person is a current contractor of the company.
91
+ */
86
92
  Contractor: "CONTRACTOR",
93
+ /**
94
+ * The person object represents a non-human actor such as a service or admin account.
95
+ */
87
96
  NonEmployee: "NON_EMPLOYEE",
97
+ /**
98
+ * The person is a previous employee of the company.
99
+ */
88
100
  FormerEmployee: "FORMER_EMPLOYEE",
89
101
  } as const;
90
102
  export type PersonMetadataType = ClosedEnum<typeof PersonMetadataType>;
@@ -31,6 +31,9 @@ import {
31
31
  */
32
32
  export const Relation = {
33
33
  Attachment: "ATTACHMENT",
34
+ /**
35
+ * Canonical documents for the entity, such as overview docs, architecture docs elastic.
36
+ */
34
37
  Canonical: "CANONICAL",
35
38
  Case: "CASE",
36
39
  ContactLower: "contact",
@@ -42,10 +42,25 @@ import {
42
42
  * Hints for the response content.
43
43
  */
44
44
  export const ResponseHint = {
45
+ /**
46
+ * Return result counts for each result set which has non-zero results, even when the request itself is limited to a subset.
47
+ */
45
48
  AllResultCounts: "ALL_RESULT_COUNTS",
49
+ /**
50
+ * Return only facet results.
51
+ */
46
52
  FacetResults: "FACET_RESULTS",
53
+ /**
54
+ * Returns result counts for each result set which has non-zero results, as well as other information about the search such as suggested spelling corrections.
55
+ */
47
56
  QueryMetadata: "QUERY_METADATA",
57
+ /**
58
+ * Return search result documents.
59
+ */
48
60
  Results: "RESULTS",
61
+ /**
62
+ * Return metadata pertaining to spellcheck results.
63
+ */
49
64
  SpellcheckMetadata: "SPELLCHECK_METADATA",
50
65
  } as const;
51
66
  /**
@@ -11,8 +11,17 @@ import { ClosedEnum } from "../../types/enums.js";
11
11
  * @remarks
12
12
  */
13
13
  export const SearchResultProminenceEnum = {
14
+ /**
15
+ * A high-confidence result that should feature prominently on the page.
16
+ */
14
17
  Hero: "HERO",
18
+ /**
19
+ * May not be the best result but should be given additional visual distinction.
20
+ */
15
21
  Promoted: "PROMOTED",
22
+ /**
23
+ * Should not be distinct from any other results.
24
+ */
16
25
  Standard: "STANDARD",
17
26
  } as const;
18
27
  /**
@@ -9,8 +9,17 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  * Type of the section. This defines how the section should be interpreted and rendered in the digest.
10
10
  */
11
11
  export const SectionType = {
12
+ /**
13
+ * A standard section for channel-based digests (e.g. from Slack, Teams).
14
+ */
12
15
  Channel: "CHANNEL",
16
+ /**
17
+ * A dedicated section that surfaces user mentions (actionable, informative, or all).
18
+ */
13
19
  Mentions: "MENTIONS",
20
+ /**
21
+ * A section driven by a generic topic, not tied to any specific channel or instance.
22
+ */
14
23
  Topic: "TOPIC",
15
24
  } as const;
16
25
  /**
@@ -132,8 +132,17 @@ import {
132
132
  * The level of visual distinction that should be given to a result.
133
133
  */
134
134
  export const Prominence = {
135
+ /**
136
+ * A high-confidence result that should feature prominently on the page.
137
+ */
135
138
  Hero: "HERO",
139
+ /**
140
+ * May not be the best result but should be given additional visual distinction.
141
+ */
136
142
  Promoted: "PROMOTED",
143
+ /**
144
+ * Should not be distinct from any other results.
145
+ */
137
146
  Standard: "STANDARD",
138
147
  } as const;
139
148
  /**
@@ -52,14 +52,15 @@ export const KnowledgeType = {
52
52
  export type KnowledgeType = ClosedEnum<typeof KnowledgeType>;
53
53
 
54
54
  /**
55
- * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action.
55
+ * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action.
56
56
  */
57
57
  export const WriteActionType = {
58
58
  Redirect: "REDIRECT",
59
59
  Execution: "EXECUTION",
60
+ Mcp: "MCP",
60
61
  } as const;
61
62
  /**
62
- * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action.
63
+ * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action.
63
64
  */
64
65
  export type WriteActionType = ClosedEnum<typeof WriteActionType>;
65
66
 
@@ -138,7 +139,7 @@ export type ToolMetadata = {
138
139
  */
139
140
  lastUpdatedAt?: Date | undefined;
140
141
  /**
141
- * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action.
142
+ * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action.
142
143
  */
143
144
  writeActionType?: WriteActionType | undefined;
144
145
  /**
@@ -9,7 +9,13 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  * Optional type classification for the update.
10
10
  */
11
11
  export const UpdateType = {
12
+ /**
13
+ * Updates that require user attention or action
14
+ */
12
15
  Actionable: "ACTIONABLE",
16
+ /**
17
+ * Updates that are purely informational
18
+ */
13
19
  Informative: "INFORMATIVE",
14
20
  } as const;
15
21
  /**
@@ -2,15 +2,64 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
6
+
5
7
  declare const __brand: unique symbol;
6
8
  export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
9
+ export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
10
+ T[keyof T];
11
+ export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
12
+ | T[keyof T]
13
+ | Unrecognized<T[keyof T] extends number ? number : string>;
7
14
 
8
- export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
15
+ function unrecognized<T>(value: T): Unrecognized<T> {
16
+ unrecognizedCount++;
9
17
  return value as Unrecognized<T>;
10
18
  }
11
19
 
12
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
13
- export type ClosedEnum<T> = T[keyof T];
14
- export type OpenEnum<T> =
15
- | Prettify<T[keyof T]>
16
- | Unrecognized<T[keyof T] extends number ? number : string>;
20
+ let unrecognizedCount = 0;
21
+ let refCount = 0;
22
+ export function unrecognizedCounter() {
23
+ refCount++;
24
+ const start = unrecognizedCount;
25
+ return {
26
+ count: () => {
27
+ const count = unrecognizedCount - start;
28
+ if (--refCount === 0) unrecognizedCount = 0;
29
+ return count;
30
+ },
31
+ };
32
+ }
33
+
34
+ export function inboundSchema<T extends Record<string, string>>(
35
+ enumObj: T,
36
+ ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
37
+ const options = Object.values(enumObj);
38
+ return z.union([
39
+ ...options.map(x => z.literal(x)),
40
+ z.string().transform(x => unrecognized(x)),
41
+ ] as any);
42
+ }
43
+
44
+ export function inboundSchemaInt<T extends Record<string, number | string>>(
45
+ enumObj: T,
46
+ ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
47
+ // For numeric enums, Object.values returns both numbers and string keys
48
+ const options = Object.values(enumObj).filter(v => typeof v === "number");
49
+ return z.union([
50
+ ...options.map(x => z.literal(x)),
51
+ z.number().int().transform(x => unrecognized(x)),
52
+ ] as any);
53
+ }
54
+
55
+ export function outboundSchema<T extends Record<string, string>>(
56
+ _: T,
57
+ ): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>> {
58
+ return z.string() as any;
59
+ }
60
+
61
+ export function outboundSchemaInt<T extends Record<string, number | string>>(
62
+ _: T,
63
+ ): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>> {
64
+ return z.number().int() as any;
65
+ }
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
- export { catchUnrecognizedEnum } from "./enums.js";
7
6
  export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
8
7
  export type { Result } from "./fp.js";
9
8
  export type { PageIterator, Paginator } from "./operations.js";