@gleanwork/api-client 0.1.0-beta.7 → 0.1.0-beta.9

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 (224) hide show
  1. package/README.md +46 -61
  2. package/dist/commonjs/__tests__/adminsearch.test.js +1 -1
  3. package/dist/commonjs/__tests__/adminsearch.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/search.test.js +1 -1
  5. package/dist/commonjs/__tests__/search.test.js.map +1 -1
  6. package/dist/{esm/funcs/searchAutocomplete.d.ts → commonjs/funcs/clientSearchAutocomplete.d.ts} +2 -2
  7. package/dist/commonjs/funcs/clientSearchAutocomplete.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/{searchAutocomplete.js → clientSearchAutocomplete.js} +3 -3
  9. package/dist/commonjs/funcs/clientSearchAutocomplete.js.map +1 -0
  10. package/dist/commonjs/funcs/{clientAdminSearchQuery.d.ts → clientSearchQueryAsAdmin.d.ts} +2 -2
  11. package/dist/commonjs/funcs/clientSearchQueryAsAdmin.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +3 -3
  13. package/dist/commonjs/funcs/clientSearchQueryAsAdmin.js.map +1 -0
  14. package/dist/commonjs/funcs/indexingPeopleBulkIndex.d.ts +2 -4
  15. package/dist/commonjs/funcs/indexingPeopleBulkIndex.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/indexingPeopleBulkIndex.js +4 -6
  17. package/dist/commonjs/funcs/indexingPeopleBulkIndex.js.map +1 -1
  18. package/dist/commonjs/lib/config.d.ts +2 -2
  19. package/dist/commonjs/lib/config.js +2 -2
  20. package/dist/commonjs/models/components/index.d.ts +0 -1
  21. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/index.js +0 -1
  23. package/dist/commonjs/models/components/index.js.map +1 -1
  24. package/dist/commonjs/react-query/clientSearchAutocomplete.d.ts +23 -0
  25. package/dist/commonjs/react-query/clientSearchAutocomplete.d.ts.map +1 -0
  26. package/dist/commonjs/react-query/{searchAutocomplete.js → clientSearchAutocomplete.js} +13 -13
  27. package/dist/commonjs/react-query/clientSearchAutocomplete.js.map +1 -0
  28. package/dist/commonjs/react-query/clientSearchQueryAsAdmin.d.ts +23 -0
  29. package/dist/commonjs/react-query/clientSearchQueryAsAdmin.d.ts.map +1 -0
  30. package/dist/commonjs/react-query/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +13 -13
  31. package/dist/commonjs/react-query/clientSearchQueryAsAdmin.js.map +1 -0
  32. package/dist/commonjs/react-query/index.d.ts +2 -3
  33. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  34. package/dist/commonjs/react-query/index.js +2 -3
  35. package/dist/commonjs/react-query/index.js.map +1 -1
  36. package/dist/commonjs/react-query/indexingPeopleBulkIndex.d.ts +2 -4
  37. package/dist/commonjs/react-query/indexingPeopleBulkIndex.d.ts.map +1 -1
  38. package/dist/commonjs/react-query/indexingPeopleBulkIndex.js +1 -3
  39. package/dist/commonjs/react-query/indexingPeopleBulkIndex.js.map +1 -1
  40. package/dist/commonjs/sdk/client.d.ts +2 -5
  41. package/dist/commonjs/sdk/client.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/client.js +2 -6
  43. package/dist/commonjs/sdk/client.js.map +1 -1
  44. package/dist/commonjs/sdk/indexing.d.ts +2 -2
  45. package/dist/commonjs/sdk/indexing.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/indexing.js +2 -2
  47. package/dist/commonjs/sdk/indexing.js.map +1 -1
  48. package/dist/commonjs/sdk/people.d.ts +63 -1
  49. package/dist/commonjs/sdk/people.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/people.js +89 -3
  51. package/dist/commonjs/sdk/people.js.map +1 -1
  52. package/dist/commonjs/sdk/sdk.d.ts +0 -6
  53. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/sdk.js +0 -8
  55. package/dist/commonjs/sdk/sdk.js.map +1 -1
  56. package/dist/commonjs/sdk/search.d.ts +28 -0
  57. package/dist/commonjs/sdk/search.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/search.js +42 -2
  59. package/dist/commonjs/sdk/search.js.map +1 -1
  60. package/dist/esm/__tests__/adminsearch.test.js +1 -1
  61. package/dist/esm/__tests__/adminsearch.test.js.map +1 -1
  62. package/dist/esm/__tests__/search.test.js +1 -1
  63. package/dist/esm/__tests__/search.test.js.map +1 -1
  64. package/dist/{commonjs/funcs/searchAutocomplete.d.ts → esm/funcs/clientSearchAutocomplete.d.ts} +2 -2
  65. package/dist/esm/funcs/clientSearchAutocomplete.d.ts.map +1 -0
  66. package/dist/esm/funcs/{searchAutocomplete.js → clientSearchAutocomplete.js} +2 -2
  67. package/dist/esm/funcs/clientSearchAutocomplete.js.map +1 -0
  68. package/dist/esm/funcs/{clientAdminSearchQuery.d.ts → clientSearchQueryAsAdmin.d.ts} +2 -2
  69. package/dist/esm/funcs/clientSearchQueryAsAdmin.d.ts.map +1 -0
  70. package/dist/esm/funcs/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +2 -2
  71. package/dist/esm/funcs/clientSearchQueryAsAdmin.js.map +1 -0
  72. package/dist/esm/funcs/indexingPeopleBulkIndex.d.ts +2 -4
  73. package/dist/esm/funcs/indexingPeopleBulkIndex.d.ts.map +1 -1
  74. package/dist/esm/funcs/indexingPeopleBulkIndex.js +4 -6
  75. package/dist/esm/funcs/indexingPeopleBulkIndex.js.map +1 -1
  76. package/dist/esm/lib/config.d.ts +2 -2
  77. package/dist/esm/lib/config.js +2 -2
  78. package/dist/esm/models/components/index.d.ts +0 -1
  79. package/dist/esm/models/components/index.d.ts.map +1 -1
  80. package/dist/esm/models/components/index.js +0 -1
  81. package/dist/esm/models/components/index.js.map +1 -1
  82. package/dist/esm/react-query/clientSearchAutocomplete.d.ts +23 -0
  83. package/dist/esm/react-query/clientSearchAutocomplete.d.ts.map +1 -0
  84. package/dist/esm/react-query/{searchAutocomplete.js → clientSearchAutocomplete.js} +10 -10
  85. package/dist/esm/react-query/clientSearchAutocomplete.js.map +1 -0
  86. package/dist/esm/react-query/clientSearchQueryAsAdmin.d.ts +23 -0
  87. package/dist/esm/react-query/clientSearchQueryAsAdmin.d.ts.map +1 -0
  88. package/dist/esm/react-query/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +10 -10
  89. package/dist/esm/react-query/clientSearchQueryAsAdmin.js.map +1 -0
  90. package/dist/esm/react-query/index.d.ts +2 -3
  91. package/dist/esm/react-query/index.d.ts.map +1 -1
  92. package/dist/esm/react-query/index.js +2 -3
  93. package/dist/esm/react-query/index.js.map +1 -1
  94. package/dist/esm/react-query/indexingPeopleBulkIndex.d.ts +2 -4
  95. package/dist/esm/react-query/indexingPeopleBulkIndex.d.ts.map +1 -1
  96. package/dist/esm/react-query/indexingPeopleBulkIndex.js +1 -3
  97. package/dist/esm/react-query/indexingPeopleBulkIndex.js.map +1 -1
  98. package/dist/esm/sdk/client.d.ts +2 -5
  99. package/dist/esm/sdk/client.d.ts.map +1 -1
  100. package/dist/esm/sdk/client.js +2 -6
  101. package/dist/esm/sdk/client.js.map +1 -1
  102. package/dist/esm/sdk/indexing.d.ts +2 -2
  103. package/dist/esm/sdk/indexing.d.ts.map +1 -1
  104. package/dist/esm/sdk/indexing.js +2 -2
  105. package/dist/esm/sdk/indexing.js.map +1 -1
  106. package/dist/esm/sdk/people.d.ts +63 -1
  107. package/dist/esm/sdk/people.d.ts.map +1 -1
  108. package/dist/esm/sdk/people.js +89 -3
  109. package/dist/esm/sdk/people.js.map +1 -1
  110. package/dist/esm/sdk/sdk.d.ts +0 -6
  111. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  112. package/dist/esm/sdk/sdk.js +0 -8
  113. package/dist/esm/sdk/sdk.js.map +1 -1
  114. package/dist/esm/sdk/search.d.ts +28 -0
  115. package/dist/esm/sdk/search.d.ts.map +1 -1
  116. package/dist/esm/sdk/search.js +42 -2
  117. package/dist/esm/sdk/search.js.map +1 -1
  118. package/docs/sdks/people/README.md +838 -10
  119. package/docs/sdks/search/README.md +1489 -7
  120. package/jsr.json +1 -1
  121. package/package.json +1 -1
  122. package/src/__tests__/adminsearch.test.ts +1 -1
  123. package/src/__tests__/search.test.ts +1 -1
  124. package/src/funcs/{searchAutocomplete.ts → clientSearchAutocomplete.ts} +1 -1
  125. package/src/funcs/{clientAdminSearchQuery.ts → clientSearchQueryAsAdmin.ts} +1 -1
  126. package/src/funcs/indexingPeopleBulkIndex.ts +6 -8
  127. package/src/lib/config.ts +2 -2
  128. package/src/models/components/index.ts +0 -1
  129. package/src/react-query/{searchAutocomplete.ts → clientSearchAutocomplete.ts} +19 -18
  130. package/src/react-query/{clientAdminSearchQuery.ts → clientSearchQueryAsAdmin.ts} +18 -18
  131. package/src/react-query/index.ts +2 -3
  132. package/src/react-query/indexingPeopleBulkIndex.ts +2 -4
  133. package/src/sdk/client.ts +4 -10
  134. package/src/sdk/indexing.ts +4 -4
  135. package/src/sdk/people.ts +153 -3
  136. package/src/sdk/sdk.ts +0 -12
  137. package/src/sdk/search.ts +74 -2
  138. package/dist/commonjs/funcs/clientAdminSearchQuery.d.ts.map +0 -1
  139. package/dist/commonjs/funcs/clientAdminSearchQuery.js.map +0 -1
  140. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -16
  141. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  142. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.js +0 -113
  143. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  144. package/dist/commonjs/funcs/searchAutocomplete.d.ts.map +0 -1
  145. package/dist/commonjs/funcs/searchAutocomplete.js.map +0 -1
  146. package/dist/commonjs/models/components/indexemployeelistrequest.d.ts +0 -36
  147. package/dist/commonjs/models/components/indexemployeelistrequest.d.ts.map +0 -1
  148. package/dist/commonjs/models/components/indexemployeelistrequest.js +0 -70
  149. package/dist/commonjs/models/components/indexemployeelistrequest.js.map +0 -1
  150. package/dist/commonjs/react-query/clientAdminSearchQuery.d.ts +0 -23
  151. package/dist/commonjs/react-query/clientAdminSearchQuery.d.ts.map +0 -1
  152. package/dist/commonjs/react-query/clientAdminSearchQuery.js.map +0 -1
  153. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -23
  154. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  155. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.js +0 -51
  156. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  157. package/dist/commonjs/react-query/searchAutocomplete.d.ts +0 -23
  158. package/dist/commonjs/react-query/searchAutocomplete.d.ts.map +0 -1
  159. package/dist/commonjs/react-query/searchAutocomplete.js.map +0 -1
  160. package/dist/commonjs/sdk/admin.d.ts +0 -7
  161. package/dist/commonjs/sdk/admin.d.ts.map +0 -1
  162. package/dist/commonjs/sdk/admin.js +0 -15
  163. package/dist/commonjs/sdk/admin.js.map +0 -1
  164. package/dist/commonjs/sdk/adminsearch.d.ts +0 -12
  165. package/dist/commonjs/sdk/adminsearch.d.ts.map +0 -1
  166. package/dist/commonjs/sdk/adminsearch.js +0 -22
  167. package/dist/commonjs/sdk/adminsearch.js.map +0 -1
  168. package/dist/commonjs/sdk/clientsearch.d.ts +0 -26
  169. package/dist/commonjs/sdk/clientsearch.d.ts.map +0 -1
  170. package/dist/commonjs/sdk/clientsearch.js +0 -42
  171. package/dist/commonjs/sdk/clientsearch.js.map +0 -1
  172. package/dist/commonjs/sdk/indexingpeople.d.ts +0 -76
  173. package/dist/commonjs/sdk/indexingpeople.d.ts.map +0 -1
  174. package/dist/commonjs/sdk/indexingpeople.js +0 -110
  175. package/dist/commonjs/sdk/indexingpeople.js.map +0 -1
  176. package/dist/esm/funcs/clientAdminSearchQuery.d.ts.map +0 -1
  177. package/dist/esm/funcs/clientAdminSearchQuery.js.map +0 -1
  178. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -16
  179. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  180. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.js +0 -77
  181. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  182. package/dist/esm/funcs/searchAutocomplete.d.ts.map +0 -1
  183. package/dist/esm/funcs/searchAutocomplete.js.map +0 -1
  184. package/dist/esm/models/components/indexemployeelistrequest.d.ts +0 -36
  185. package/dist/esm/models/components/indexemployeelistrequest.d.ts.map +0 -1
  186. package/dist/esm/models/components/indexemployeelistrequest.js +0 -32
  187. package/dist/esm/models/components/indexemployeelistrequest.js.map +0 -1
  188. package/dist/esm/react-query/clientAdminSearchQuery.d.ts +0 -23
  189. package/dist/esm/react-query/clientAdminSearchQuery.d.ts.map +0 -1
  190. package/dist/esm/react-query/clientAdminSearchQuery.js.map +0 -1
  191. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -23
  192. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  193. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.js +0 -46
  194. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  195. package/dist/esm/react-query/searchAutocomplete.d.ts +0 -23
  196. package/dist/esm/react-query/searchAutocomplete.d.ts.map +0 -1
  197. package/dist/esm/react-query/searchAutocomplete.js.map +0 -1
  198. package/dist/esm/sdk/admin.d.ts +0 -7
  199. package/dist/esm/sdk/admin.d.ts.map +0 -1
  200. package/dist/esm/sdk/admin.js +0 -11
  201. package/dist/esm/sdk/admin.js.map +0 -1
  202. package/dist/esm/sdk/adminsearch.d.ts +0 -12
  203. package/dist/esm/sdk/adminsearch.d.ts.map +0 -1
  204. package/dist/esm/sdk/adminsearch.js +0 -18
  205. package/dist/esm/sdk/adminsearch.js.map +0 -1
  206. package/dist/esm/sdk/clientsearch.d.ts +0 -26
  207. package/dist/esm/sdk/clientsearch.d.ts.map +0 -1
  208. package/dist/esm/sdk/clientsearch.js +0 -38
  209. package/dist/esm/sdk/clientsearch.js.map +0 -1
  210. package/dist/esm/sdk/indexingpeople.d.ts +0 -76
  211. package/dist/esm/sdk/indexingpeople.d.ts.map +0 -1
  212. package/dist/esm/sdk/indexingpeople.js +0 -106
  213. package/dist/esm/sdk/indexingpeople.js.map +0 -1
  214. package/docs/sdks/admin/README.md +0 -6
  215. package/docs/sdks/adminsearch/README.md +0 -520
  216. package/docs/sdks/clientsearch/README.md +0 -976
  217. package/docs/sdks/indexingpeople/README.md +0 -1005
  218. package/src/funcs/peoplePostApiIndexV1Bulkindexemployees.ts +0 -155
  219. package/src/models/components/indexemployeelistrequest.ts +0 -78
  220. package/src/react-query/peoplePostApiIndexV1Bulkindexemployees.ts +0 -92
  221. package/src/sdk/admin.ts +0 -13
  222. package/src/sdk/adminsearch.ts +0 -27
  223. package/src/sdk/clientsearch.ts +0 -63
  224. package/src/sdk/indexingpeople.ts +0 -179
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gleanwork/api-client",
5
- "version": "0.1.0-beta.7",
5
+ "version": "0.1.0-beta.9",
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.1.0-beta.7",
3
+ "version": "0.1.0-beta.9",
4
4
  "author": "Speakeasy",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -16,7 +16,7 @@ test("Admin Search Adminsearch", async () => {
16
16
  bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
17
17
  });
18
18
 
19
- const result = await glean.client.admin.search.query({
19
+ const result = await glean.client.search.queryAsAdmin({
20
20
  trackingToken: "trackingToken",
21
21
  sourceDocument: {
22
22
  metadata: {
@@ -15,7 +15,7 @@ test("Search Autocomplete", async () => {
15
15
  bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "value",
16
16
  });
17
17
 
18
- const result = await glean.search.autocomplete({
18
+ const result = await glean.client.search.autocomplete({
19
19
  trackingToken: "trackingToken",
20
20
  query: "San Fra",
21
21
  datasource: "GDRIVE",
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * @remarks
30
30
  * Retrieve query suggestions, operators and documents for the given partially typed query.
31
31
  */
32
- export function searchAutocomplete(
32
+ export function clientSearchAutocomplete(
33
33
  client: GleanCore,
34
34
  request: components.AutocompleteRequest,
35
35
  options?: RequestOptions,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * @remarks
31
31
  * Retrieves results for search query without respect for permissions. This is available only to privileged users.
32
32
  */
33
- export function clientAdminSearchQuery(
33
+ export function clientSearchQueryAsAdmin(
34
34
  client: GleanCore,
35
35
  request?: components.SearchRequest | undefined,
36
36
  options?: RequestOptions,
@@ -28,13 +28,11 @@ import { Result } from "../types/fp.js";
28
28
  * Bulk index employees
29
29
  *
30
30
  * @remarks
31
- * Bulk upload details of all the employees. This deletes all employees uploaded in the prior batch. SOON TO BE DEPRECATED in favor of /bulkindexemployees.
32
- *
33
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
31
+ * Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/docs/indexing_api_bulk_indexing/#bulk-upload-model) documentation for an explanation of how to use bulk endpoints.
34
32
  */
35
33
  export function indexingPeopleBulkIndex(
36
34
  client: GleanCore,
37
- request: components.IndexEmployeeListRequest,
35
+ request: components.BulkIndexEmployeesRequest,
38
36
  options?: RequestOptions,
39
37
  ): APIPromise<
40
38
  Result<
@@ -57,7 +55,7 @@ export function indexingPeopleBulkIndex(
57
55
 
58
56
  async function $do(
59
57
  client: GleanCore,
60
- request: components.IndexEmployeeListRequest,
58
+ request: components.BulkIndexEmployeesRequest,
61
59
  options?: RequestOptions,
62
60
  ): Promise<
63
61
  [
@@ -76,7 +74,7 @@ async function $do(
76
74
  > {
77
75
  const parsed = safeParse(
78
76
  request,
79
- (value) => components.IndexEmployeeListRequest$outboundSchema.parse(value),
77
+ (value) => components.BulkIndexEmployeesRequest$outboundSchema.parse(value),
80
78
  "Input validation failed",
81
79
  );
82
80
  if (!parsed.ok) {
@@ -85,7 +83,7 @@ async function $do(
85
83
  const payload = parsed.value;
86
84
  const body = encodeJSON("body", payload, { explode: true });
87
85
 
88
- const path = pathToFunc("/api/index/v1/indexemployeelist")();
86
+ const path = pathToFunc("/api/index/v1/bulkindexemployees")();
89
87
 
90
88
  const headers = new Headers(compactMap({
91
89
  "Content-Type": "application/json",
@@ -98,7 +96,7 @@ async function $do(
98
96
 
99
97
  const context = {
100
98
  baseURL: options?.serverURL ?? client._baseURL ?? "",
101
- operationID: "post_/api/index/v1/indexemployeelist",
99
+ operationID: "post_/api/index/v1/bulkindexemployees",
102
100
  oAuth2Scopes: [],
103
101
 
104
102
  resolvedSecurity: requestSecurity,
package/src/lib/config.ts CHANGED
@@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
64
64
  export const SDK_METADATA = {
65
65
  language: "typescript",
66
66
  openapiDocVersion: "0.9.0",
67
- sdkVersion: "0.1.0-beta.7",
67
+ sdkVersion: "0.1.0-beta.9",
68
68
  genVersion: "2.597.9",
69
69
  userAgent:
70
- "speakeasy-sdk/typescript 0.1.0-beta.7 2.597.9 0.9.0 @gleanwork/api-client",
70
+ "speakeasy-sdk/typescript 0.1.0-beta.9 2.597.9 0.9.0 @gleanwork/api-client",
71
71
  } as const;
@@ -220,7 +220,6 @@ export * from "./grouptype.js";
220
220
  export * from "./iconconfig.js";
221
221
  export * from "./indexdocumentrequest.js";
222
222
  export * from "./indexdocumentsrequest.js";
223
- export * from "./indexemployeelistrequest.js";
224
223
  export * from "./indexemployeerequest.js";
225
224
  export * from "./indexgrouprequest.js";
226
225
  export * from "./indexingshortcut.js";
@@ -8,7 +8,7 @@ import {
8
8
  UseMutationResult,
9
9
  } from "@tanstack/react-query";
10
10
  import { GleanCore } from "../core.js";
11
- import { searchAutocomplete } from "../funcs/searchAutocomplete.js";
11
+ import { clientSearchAutocomplete } from "../funcs/clientSearchAutocomplete.js";
12
12
  import { combineSignals } from "../lib/primitives.js";
13
13
  import { RequestOptions } from "../lib/sdks.js";
14
14
  import * as components from "../models/components/index.js";
@@ -16,12 +16,13 @@ import { unwrapAsync } from "../types/fp.js";
16
16
  import { useGleanContext } from "./_context.js";
17
17
  import { MutationHookOptions } from "./_types.js";
18
18
 
19
- export type SearchAutocompleteMutationVariables = {
19
+ export type ClientSearchAutocompleteMutationVariables = {
20
20
  request: components.AutocompleteRequest;
21
21
  options?: RequestOptions;
22
22
  };
23
23
 
24
- export type SearchAutocompleteMutationData = components.AutocompleteResponse;
24
+ export type ClientSearchAutocompleteMutationData =
25
+ components.AutocompleteResponse;
25
26
 
26
27
  /**
27
28
  * Autocomplete
@@ -29,43 +30,43 @@ export type SearchAutocompleteMutationData = components.AutocompleteResponse;
29
30
  * @remarks
30
31
  * Retrieve query suggestions, operators and documents for the given partially typed query.
31
32
  */
32
- export function useSearchAutocompleteMutation(
33
+ export function useClientSearchAutocompleteMutation(
33
34
  options?: MutationHookOptions<
34
- SearchAutocompleteMutationData,
35
+ ClientSearchAutocompleteMutationData,
35
36
  Error,
36
- SearchAutocompleteMutationVariables
37
+ ClientSearchAutocompleteMutationVariables
37
38
  >,
38
39
  ): UseMutationResult<
39
- SearchAutocompleteMutationData,
40
+ ClientSearchAutocompleteMutationData,
40
41
  Error,
41
- SearchAutocompleteMutationVariables
42
+ ClientSearchAutocompleteMutationVariables
42
43
  > {
43
44
  const client = useGleanContext();
44
45
  return useMutation({
45
- ...buildSearchAutocompleteMutation(client, options),
46
+ ...buildClientSearchAutocompleteMutation(client, options),
46
47
  ...options,
47
48
  });
48
49
  }
49
50
 
50
- export function mutationKeySearchAutocomplete(): MutationKey {
51
- return ["@gleanwork/api-client", "Search", "autocomplete"];
51
+ export function mutationKeyClientSearchAutocomplete(): MutationKey {
52
+ return ["@gleanwork/api-client", "search", "autocomplete"];
52
53
  }
53
54
 
54
- export function buildSearchAutocompleteMutation(
55
+ export function buildClientSearchAutocompleteMutation(
55
56
  client$: GleanCore,
56
57
  hookOptions?: RequestOptions,
57
58
  ): {
58
59
  mutationKey: MutationKey;
59
60
  mutationFn: (
60
- variables: SearchAutocompleteMutationVariables,
61
- ) => Promise<SearchAutocompleteMutationData>;
61
+ variables: ClientSearchAutocompleteMutationVariables,
62
+ ) => Promise<ClientSearchAutocompleteMutationData>;
62
63
  } {
63
64
  return {
64
- mutationKey: mutationKeySearchAutocomplete(),
65
- mutationFn: function searchAutocompleteMutationFn({
65
+ mutationKey: mutationKeyClientSearchAutocomplete(),
66
+ mutationFn: function clientSearchAutocompleteMutationFn({
66
67
  request,
67
68
  options,
68
- }): Promise<SearchAutocompleteMutationData> {
69
+ }): Promise<ClientSearchAutocompleteMutationData> {
69
70
  const mergedOptions = {
70
71
  ...hookOptions,
71
72
  ...options,
@@ -78,7 +79,7 @@ export function buildSearchAutocompleteMutation(
78
79
  ),
79
80
  },
80
81
  };
81
- return unwrapAsync(searchAutocomplete(
82
+ return unwrapAsync(clientSearchAutocomplete(
82
83
  client$,
83
84
  request,
84
85
  mergedOptions,
@@ -8,7 +8,7 @@ import {
8
8
  UseMutationResult,
9
9
  } from "@tanstack/react-query";
10
10
  import { GleanCore } from "../core.js";
11
- import { clientAdminSearchQuery } from "../funcs/clientAdminSearchQuery.js";
11
+ import { clientSearchQueryAsAdmin } from "../funcs/clientSearchQueryAsAdmin.js";
12
12
  import { combineSignals } from "../lib/primitives.js";
13
13
  import { RequestOptions } from "../lib/sdks.js";
14
14
  import * as components from "../models/components/index.js";
@@ -16,12 +16,12 @@ import { unwrapAsync } from "../types/fp.js";
16
16
  import { useGleanContext } from "./_context.js";
17
17
  import { MutationHookOptions } from "./_types.js";
18
18
 
19
- export type ClientAdminSearchQueryMutationVariables = {
19
+ export type ClientSearchQueryAsAdminMutationVariables = {
20
20
  request?: components.SearchRequest | undefined;
21
21
  options?: RequestOptions;
22
22
  };
23
23
 
24
- export type ClientAdminSearchQueryMutationData = components.SearchResponse;
24
+ export type ClientSearchQueryAsAdminMutationData = components.SearchResponse;
25
25
 
26
26
  /**
27
27
  * Search the index (admin)
@@ -29,43 +29,43 @@ export type ClientAdminSearchQueryMutationData = components.SearchResponse;
29
29
  * @remarks
30
30
  * Retrieves results for search query without respect for permissions. This is available only to privileged users.
31
31
  */
32
- export function useClientAdminSearchQueryMutation(
32
+ export function useClientSearchQueryAsAdminMutation(
33
33
  options?: MutationHookOptions<
34
- ClientAdminSearchQueryMutationData,
34
+ ClientSearchQueryAsAdminMutationData,
35
35
  Error,
36
- ClientAdminSearchQueryMutationVariables
36
+ ClientSearchQueryAsAdminMutationVariables
37
37
  >,
38
38
  ): UseMutationResult<
39
- ClientAdminSearchQueryMutationData,
39
+ ClientSearchQueryAsAdminMutationData,
40
40
  Error,
41
- ClientAdminSearchQueryMutationVariables
41
+ ClientSearchQueryAsAdminMutationVariables
42
42
  > {
43
43
  const client = useGleanContext();
44
44
  return useMutation({
45
- ...buildClientAdminSearchQueryMutation(client, options),
45
+ ...buildClientSearchQueryAsAdminMutation(client, options),
46
46
  ...options,
47
47
  });
48
48
  }
49
49
 
50
- export function mutationKeyClientAdminSearchQuery(): MutationKey {
51
- return ["@gleanwork/api-client", "search", "query"];
50
+ export function mutationKeyClientSearchQueryAsAdmin(): MutationKey {
51
+ return ["@gleanwork/api-client", "search", "queryAsAdmin"];
52
52
  }
53
53
 
54
- export function buildClientAdminSearchQueryMutation(
54
+ export function buildClientSearchQueryAsAdminMutation(
55
55
  client$: GleanCore,
56
56
  hookOptions?: RequestOptions,
57
57
  ): {
58
58
  mutationKey: MutationKey;
59
59
  mutationFn: (
60
- variables: ClientAdminSearchQueryMutationVariables,
61
- ) => Promise<ClientAdminSearchQueryMutationData>;
60
+ variables: ClientSearchQueryAsAdminMutationVariables,
61
+ ) => Promise<ClientSearchQueryAsAdminMutationData>;
62
62
  } {
63
63
  return {
64
- mutationKey: mutationKeyClientAdminSearchQuery(),
65
- mutationFn: function clientAdminSearchQueryMutationFn({
64
+ mutationKey: mutationKeyClientSearchQueryAsAdmin(),
65
+ mutationFn: function clientSearchQueryAsAdminMutationFn({
66
66
  request,
67
67
  options,
68
- }): Promise<ClientAdminSearchQueryMutationData> {
68
+ }): Promise<ClientSearchQueryAsAdminMutationData> {
69
69
  const mergedOptions = {
70
70
  ...hookOptions,
71
71
  ...options,
@@ -78,7 +78,7 @@ export function buildClientAdminSearchQueryMutation(
78
78
  ),
79
79
  },
80
80
  };
81
- return unwrapAsync(clientAdminSearchQuery(
81
+ return unwrapAsync(clientSearchQueryAsAdmin(
82
82
  client$,
83
83
  request,
84
84
  mergedOptions,
@@ -7,7 +7,6 @@ export * from "./_types.js";
7
7
 
8
8
  export * from "./clientActivityFeedback.js";
9
9
  export * from "./clientActivityReport.js";
10
- export * from "./clientAdminSearchQuery.js";
11
10
  export * from "./clientAgentsList.js";
12
11
  export * from "./clientAgentsRetrieveInputs.js";
13
12
  export * from "./clientAgentsRun.js";
@@ -51,7 +50,9 @@ export * from "./clientPinsList.js";
51
50
  export * from "./clientPinsRemove.js";
52
51
  export * from "./clientPinsRetrieve.js";
53
52
  export * from "./clientPinsUpdate.js";
53
+ export * from "./clientSearchAutocomplete.js";
54
54
  export * from "./clientSearchQuery.js";
55
+ export * from "./clientSearchQueryAsAdmin.js";
55
56
  export * from "./clientSearchRecommendations.js";
56
57
  export * from "./clientSearchRetrieveFeed.js";
57
58
  export * from "./clientShortcutsCreate.js";
@@ -99,5 +100,3 @@ export * from "./indexingPermissionsProcessMemberships.js";
99
100
  export * from "./indexingPermissionsUpdatePermissions.js";
100
101
  export * from "./indexingShortcutsBulkIndex.js";
101
102
  export * from "./indexingShortcutsUpload.js";
102
- export * from "./peoplePostApiIndexV1Bulkindexemployees.js";
103
- export * from "./searchAutocomplete.js";
@@ -17,7 +17,7 @@ import { useGleanContext } from "./_context.js";
17
17
  import { MutationHookOptions } from "./_types.js";
18
18
 
19
19
  export type IndexingPeopleBulkIndexMutationVariables = {
20
- request: components.IndexEmployeeListRequest;
20
+ request: components.BulkIndexEmployeesRequest;
21
21
  options?: RequestOptions;
22
22
  };
23
23
 
@@ -27,9 +27,7 @@ export type IndexingPeopleBulkIndexMutationData = void;
27
27
  * Bulk index employees
28
28
  *
29
29
  * @remarks
30
- * Bulk upload details of all the employees. This deletes all employees uploaded in the prior batch. SOON TO BE DEPRECATED in favor of /bulkindexemployees.
31
- *
32
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
30
+ * Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/docs/indexing_api_bulk_indexing/#bulk-upload-model) documentation for an explanation of how to use bulk endpoints.
33
31
  */
34
32
  export function useIndexingPeopleBulkIndexMutation(
35
33
  options?: MutationHookOptions<
package/src/sdk/client.ts CHANGED
@@ -4,20 +4,19 @@
4
4
 
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
6
  import { Activity } from "./activity.js";
7
- import { Admin } from "./admin.js";
8
7
  import { Agents } from "./agents.js";
9
8
  import { Announcements } from "./announcements.js";
10
9
  import { Answers } from "./answers.js";
11
10
  import { Chat } from "./chat.js";
12
11
  import { ClientAuthentication } from "./clientauthentication.js";
13
12
  import { ClientDocuments } from "./clientdocuments.js";
14
- import { ClientSearch } from "./clientsearch.js";
15
13
  import { ClientShortcuts } from "./clientshortcuts.js";
16
14
  import { Collections } from "./collections.js";
17
15
  import { Entities } from "./entities.js";
18
16
  import { Insights } from "./insights.js";
19
17
  import { Messages } from "./messages.js";
20
18
  import { Pins } from "./pins.js";
19
+ import { Search } from "./search.js";
21
20
  import { Verification } from "./verification.js";
22
21
 
23
22
  export class Client extends ClientSDK {
@@ -76,14 +75,9 @@ export class Client extends ClientSDK {
76
75
  return (this._pins ??= new Pins(this._options));
77
76
  }
78
77
 
79
- private _admin?: Admin;
80
- get admin(): Admin {
81
- return (this._admin ??= new Admin(this._options));
82
- }
83
-
84
- private _search?: ClientSearch;
85
- get search(): ClientSearch {
86
- return (this._search ??= new ClientSearch(this._options));
78
+ private _search?: Search;
79
+ get search(): Search {
80
+ return (this._search ??= new Search(this._options));
87
81
  }
88
82
 
89
83
  private _entities?: Entities;
@@ -7,8 +7,8 @@ import { Datasource } from "./datasource.js";
7
7
  import { Datasources } from "./datasources.js";
8
8
  import { IndexingAuthentication } from "./indexingauthentication.js";
9
9
  import { IndexingDocuments } from "./indexingdocuments.js";
10
- import { IndexingPeople } from "./indexingpeople.js";
11
10
  import { IndexingShortcuts } from "./indexingshortcuts.js";
11
+ import { People } from "./people.js";
12
12
  import { Permissions } from "./permissions.js";
13
13
 
14
14
  export class Indexing extends ClientSDK {
@@ -27,9 +27,9 @@ export class Indexing extends ClientSDK {
27
27
  return (this._datasource ??= new Datasource(this._options));
28
28
  }
29
29
 
30
- private _people?: IndexingPeople;
31
- get people(): IndexingPeople {
32
- return (this._people ??= new IndexingPeople(this._options));
30
+ private _people?: People;
31
+ get people(): People {
32
+ return (this._people ??= new People(this._options));
33
33
  }
34
34
 
35
35
  private _datasources?: Datasources;
package/src/sdk/people.ts CHANGED
@@ -2,23 +2,173 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { peoplePostApiIndexV1Bulkindexemployees } from "../funcs/peoplePostApiIndexV1Bulkindexemployees.js";
5
+ import { indexingPeopleBulkIndex } from "../funcs/indexingPeopleBulkIndex.js";
6
+ import { indexingPeopleBulkIndexTeams } from "../funcs/indexingPeopleBulkIndexTeams.js";
7
+ import { indexingPeopleCount } from "../funcs/indexingPeopleCount.js";
8
+ import { indexingPeopleDebug } from "../funcs/indexingPeopleDebug.js";
9
+ import { indexingPeopleDelete } from "../funcs/indexingPeopleDelete.js";
10
+ import { indexingPeopleDeleteTeam } from "../funcs/indexingPeopleDeleteTeam.js";
11
+ import { indexingPeopleIndex } from "../funcs/indexingPeopleIndex.js";
12
+ import { indexingPeopleIndexTeam } from "../funcs/indexingPeopleIndexTeam.js";
13
+ import { indexingPeopleProcessAllEmployeesAndTeams } from "../funcs/indexingPeopleProcessAllEmployeesAndTeams.js";
6
14
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
15
  import * as components from "../models/components/index.js";
8
16
  import { unwrapAsync } from "../types/fp.js";
9
17
 
10
18
  export class People extends ClientSDK {
19
+ /**
20
+ * Beta: Get user information
21
+ *
22
+ * @remarks
23
+ * Gives various information that would help in debugging related to a particular user. Currently in beta, might undergo breaking changes without prior notice.
24
+ *
25
+ * Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/docs/indexing_api/indexing_api_troubleshooting/) for more information.
26
+ */
27
+ async debug(
28
+ debugUserRequest: components.DebugUserRequest,
29
+ datasource: string,
30
+ options?: RequestOptions,
31
+ ): Promise<components.DebugUserResponse> {
32
+ return unwrapAsync(indexingPeopleDebug(
33
+ this,
34
+ debugUserRequest,
35
+ datasource,
36
+ options,
37
+ ));
38
+ }
39
+
40
+ /**
41
+ * Get user count
42
+ *
43
+ * @remarks
44
+ * Fetches user count for the specified custom datasource.
45
+ *
46
+ * Tip: Use [/debug/{datasource}/status](https://developers.glean.com/docs/indexing_api/indexing_api_troubleshooting/#debug-datasource-status) for richer information.
47
+ *
48
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
49
+ */
50
+ async count(
51
+ request: components.GetUserCountRequest,
52
+ options?: RequestOptions,
53
+ ): Promise<components.GetUserCountResponse> {
54
+ return unwrapAsync(indexingPeopleCount(
55
+ this,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ /**
62
+ * Index employee
63
+ *
64
+ * @remarks
65
+ * Adds an employee or updates information about an employee
66
+ */
67
+ async index(
68
+ request: components.IndexEmployeeRequest,
69
+ options?: RequestOptions,
70
+ ): Promise<void> {
71
+ return unwrapAsync(indexingPeopleIndex(
72
+ this,
73
+ request,
74
+ options,
75
+ ));
76
+ }
77
+
11
78
  /**
12
79
  * Bulk index employees
13
80
  *
14
81
  * @remarks
15
82
  * Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/docs/indexing_api_bulk_indexing/#bulk-upload-model) documentation for an explanation of how to use bulk endpoints.
16
83
  */
17
- async postApiIndexV1Bulkindexemployees(
84
+ async bulkIndex(
18
85
  request: components.BulkIndexEmployeesRequest,
19
86
  options?: RequestOptions,
20
87
  ): Promise<void> {
21
- return unwrapAsync(peoplePostApiIndexV1Bulkindexemployees(
88
+ return unwrapAsync(indexingPeopleBulkIndex(
89
+ this,
90
+ request,
91
+ options,
92
+ ));
93
+ }
94
+
95
+ /**
96
+ * Schedules the processing of uploaded employees and teams
97
+ *
98
+ * @remarks
99
+ * Schedules the immediate processing of employees and teams uploaded through the indexing API. By default all uploaded people data will be processed asynchronously but this API can be used to schedule its processing on demand.
100
+ */
101
+ async processAllEmployeesAndTeams(
102
+ options?: RequestOptions,
103
+ ): Promise<void> {
104
+ return unwrapAsync(indexingPeopleProcessAllEmployeesAndTeams(
105
+ this,
106
+ options,
107
+ ));
108
+ }
109
+
110
+ /**
111
+ * Delete employee
112
+ *
113
+ * @remarks
114
+ * Delete an employee. Silently succeeds if employee is not present.
115
+ */
116
+ async delete(
117
+ request: components.DeleteEmployeeRequest,
118
+ options?: RequestOptions,
119
+ ): Promise<void> {
120
+ return unwrapAsync(indexingPeopleDelete(
121
+ this,
122
+ request,
123
+ options,
124
+ ));
125
+ }
126
+
127
+ /**
128
+ * Index team
129
+ *
130
+ * @remarks
131
+ * Adds a team or updates information about a team
132
+ */
133
+ async indexTeam(
134
+ request: components.IndexTeamRequest,
135
+ options?: RequestOptions,
136
+ ): Promise<void> {
137
+ return unwrapAsync(indexingPeopleIndexTeam(
138
+ this,
139
+ request,
140
+ options,
141
+ ));
142
+ }
143
+
144
+ /**
145
+ * Delete team
146
+ *
147
+ * @remarks
148
+ * Delete a team based on provided id.
149
+ */
150
+ async deleteTeam(
151
+ request: components.DeleteTeamRequest,
152
+ options?: RequestOptions,
153
+ ): Promise<void> {
154
+ return unwrapAsync(indexingPeopleDeleteTeam(
155
+ this,
156
+ request,
157
+ options,
158
+ ));
159
+ }
160
+
161
+ /**
162
+ * Bulk index teams
163
+ *
164
+ * @remarks
165
+ * Replaces all the currently indexed teams using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/docs/indexing_api_bulk_indexing/#bulk-upload-model) documentation for an explanation of how to use bulk endpoints.
166
+ */
167
+ async bulkIndexTeams(
168
+ request: components.BulkIndexTeamsRequest,
169
+ options?: RequestOptions,
170
+ ): Promise<void> {
171
+ return unwrapAsync(indexingPeopleBulkIndexTeams(
22
172
  this,
23
173
  request,
24
174
  options,
package/src/sdk/sdk.ts CHANGED
@@ -5,8 +5,6 @@
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
6
  import { Client } from "./client.js";
7
7
  import { Indexing } from "./indexing.js";
8
- import { People } from "./people.js";
9
- import { Search } from "./search.js";
10
8
 
11
9
  export class Glean extends ClientSDK {
12
10
  private _client?: Client;
@@ -14,18 +12,8 @@ export class Glean extends ClientSDK {
14
12
  return (this._client ??= new Client(this._options));
15
13
  }
16
14
 
17
- private _search?: Search;
18
- get search(): Search {
19
- return (this._search ??= new Search(this._options));
20
- }
21
-
22
15
  private _indexing?: Indexing;
23
16
  get indexing(): Indexing {
24
17
  return (this._indexing ??= new Indexing(this._options));
25
18
  }
26
-
27
- private _people?: People;
28
- get people(): People {
29
- return (this._people ??= new People(this._options));
30
- }
31
19
  }