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

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 (181) hide show
  1. package/README.md +33 -45
  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/funcs/{clientAdminSearchQuery.d.ts → clientSearchQueryAsAdmin.d.ts} +2 -2
  5. package/dist/commonjs/funcs/clientSearchQueryAsAdmin.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +3 -3
  7. package/dist/commonjs/funcs/clientSearchQueryAsAdmin.js.map +1 -0
  8. package/dist/commonjs/funcs/indexingPeopleBulkIndex.d.ts +2 -4
  9. package/dist/commonjs/funcs/indexingPeopleBulkIndex.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/indexingPeopleBulkIndex.js +4 -6
  11. package/dist/commonjs/funcs/indexingPeopleBulkIndex.js.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/models/components/index.d.ts +0 -1
  15. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/index.js +0 -1
  17. package/dist/commonjs/models/components/index.js.map +1 -1
  18. package/dist/commonjs/react-query/clientSearchQueryAsAdmin.d.ts +23 -0
  19. package/dist/commonjs/react-query/clientSearchQueryAsAdmin.d.ts.map +1 -0
  20. package/dist/commonjs/react-query/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +13 -13
  21. package/dist/commonjs/react-query/clientSearchQueryAsAdmin.js.map +1 -0
  22. package/dist/commonjs/react-query/index.d.ts +1 -2
  23. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  24. package/dist/commonjs/react-query/index.js +1 -2
  25. package/dist/commonjs/react-query/index.js.map +1 -1
  26. package/dist/commonjs/react-query/indexingPeopleBulkIndex.d.ts +2 -4
  27. package/dist/commonjs/react-query/indexingPeopleBulkIndex.d.ts.map +1 -1
  28. package/dist/commonjs/react-query/indexingPeopleBulkIndex.js +1 -3
  29. package/dist/commonjs/react-query/indexingPeopleBulkIndex.js.map +1 -1
  30. package/dist/commonjs/sdk/client.d.ts +0 -3
  31. package/dist/commonjs/sdk/client.d.ts.map +1 -1
  32. package/dist/commonjs/sdk/client.js +0 -4
  33. package/dist/commonjs/sdk/client.js.map +1 -1
  34. package/dist/commonjs/sdk/clientsearch.d.ts +7 -0
  35. package/dist/commonjs/sdk/clientsearch.d.ts.map +1 -1
  36. package/dist/commonjs/sdk/clientsearch.js +10 -0
  37. package/dist/commonjs/sdk/clientsearch.js.map +1 -1
  38. package/dist/commonjs/sdk/indexing.d.ts +2 -2
  39. package/dist/commonjs/sdk/indexing.d.ts.map +1 -1
  40. package/dist/commonjs/sdk/indexing.js +2 -2
  41. package/dist/commonjs/sdk/indexing.js.map +1 -1
  42. package/dist/commonjs/sdk/people.d.ts +63 -1
  43. package/dist/commonjs/sdk/people.d.ts.map +1 -1
  44. package/dist/commonjs/sdk/people.js +89 -3
  45. package/dist/commonjs/sdk/people.js.map +1 -1
  46. package/dist/commonjs/sdk/sdk.d.ts +0 -3
  47. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  48. package/dist/commonjs/sdk/sdk.js +0 -4
  49. package/dist/commonjs/sdk/sdk.js.map +1 -1
  50. package/dist/esm/__tests__/adminsearch.test.js +1 -1
  51. package/dist/esm/__tests__/adminsearch.test.js.map +1 -1
  52. package/dist/esm/funcs/{clientAdminSearchQuery.d.ts → clientSearchQueryAsAdmin.d.ts} +2 -2
  53. package/dist/esm/funcs/clientSearchQueryAsAdmin.d.ts.map +1 -0
  54. package/dist/esm/funcs/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +2 -2
  55. package/dist/esm/funcs/clientSearchQueryAsAdmin.js.map +1 -0
  56. package/dist/esm/funcs/indexingPeopleBulkIndex.d.ts +2 -4
  57. package/dist/esm/funcs/indexingPeopleBulkIndex.d.ts.map +1 -1
  58. package/dist/esm/funcs/indexingPeopleBulkIndex.js +4 -6
  59. package/dist/esm/funcs/indexingPeopleBulkIndex.js.map +1 -1
  60. package/dist/esm/lib/config.d.ts +2 -2
  61. package/dist/esm/lib/config.js +2 -2
  62. package/dist/esm/models/components/index.d.ts +0 -1
  63. package/dist/esm/models/components/index.d.ts.map +1 -1
  64. package/dist/esm/models/components/index.js +0 -1
  65. package/dist/esm/models/components/index.js.map +1 -1
  66. package/dist/esm/react-query/clientSearchQueryAsAdmin.d.ts +23 -0
  67. package/dist/esm/react-query/clientSearchQueryAsAdmin.d.ts.map +1 -0
  68. package/dist/esm/react-query/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +10 -10
  69. package/dist/esm/react-query/clientSearchQueryAsAdmin.js.map +1 -0
  70. package/dist/esm/react-query/index.d.ts +1 -2
  71. package/dist/esm/react-query/index.d.ts.map +1 -1
  72. package/dist/esm/react-query/index.js +1 -2
  73. package/dist/esm/react-query/index.js.map +1 -1
  74. package/dist/esm/react-query/indexingPeopleBulkIndex.d.ts +2 -4
  75. package/dist/esm/react-query/indexingPeopleBulkIndex.d.ts.map +1 -1
  76. package/dist/esm/react-query/indexingPeopleBulkIndex.js +1 -3
  77. package/dist/esm/react-query/indexingPeopleBulkIndex.js.map +1 -1
  78. package/dist/esm/sdk/client.d.ts +0 -3
  79. package/dist/esm/sdk/client.d.ts.map +1 -1
  80. package/dist/esm/sdk/client.js +0 -4
  81. package/dist/esm/sdk/client.js.map +1 -1
  82. package/dist/esm/sdk/clientsearch.d.ts +7 -0
  83. package/dist/esm/sdk/clientsearch.d.ts.map +1 -1
  84. package/dist/esm/sdk/clientsearch.js +10 -0
  85. package/dist/esm/sdk/clientsearch.js.map +1 -1
  86. package/dist/esm/sdk/indexing.d.ts +2 -2
  87. package/dist/esm/sdk/indexing.d.ts.map +1 -1
  88. package/dist/esm/sdk/indexing.js +2 -2
  89. package/dist/esm/sdk/indexing.js.map +1 -1
  90. package/dist/esm/sdk/people.d.ts +63 -1
  91. package/dist/esm/sdk/people.d.ts.map +1 -1
  92. package/dist/esm/sdk/people.js +89 -3
  93. package/dist/esm/sdk/people.js.map +1 -1
  94. package/dist/esm/sdk/sdk.d.ts +0 -3
  95. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  96. package/dist/esm/sdk/sdk.js +0 -4
  97. package/dist/esm/sdk/sdk.js.map +1 -1
  98. package/docs/sdks/clientsearch/README.md +513 -0
  99. package/docs/sdks/people/README.md +838 -10
  100. package/jsr.json +1 -1
  101. package/package.json +1 -1
  102. package/src/__tests__/adminsearch.test.ts +1 -1
  103. package/src/funcs/{clientAdminSearchQuery.ts → clientSearchQueryAsAdmin.ts} +1 -1
  104. package/src/funcs/indexingPeopleBulkIndex.ts +6 -8
  105. package/src/lib/config.ts +2 -2
  106. package/src/models/components/index.ts +0 -1
  107. package/src/react-query/{clientAdminSearchQuery.ts → clientSearchQueryAsAdmin.ts} +18 -18
  108. package/src/react-query/index.ts +1 -2
  109. package/src/react-query/indexingPeopleBulkIndex.ts +2 -4
  110. package/src/sdk/client.ts +0 -6
  111. package/src/sdk/clientsearch.ts +18 -0
  112. package/src/sdk/indexing.ts +4 -4
  113. package/src/sdk/people.ts +153 -3
  114. package/src/sdk/sdk.ts +0 -6
  115. package/dist/commonjs/funcs/clientAdminSearchQuery.d.ts.map +0 -1
  116. package/dist/commonjs/funcs/clientAdminSearchQuery.js.map +0 -1
  117. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -16
  118. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  119. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.js +0 -113
  120. package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  121. package/dist/commonjs/models/components/indexemployeelistrequest.d.ts +0 -36
  122. package/dist/commonjs/models/components/indexemployeelistrequest.d.ts.map +0 -1
  123. package/dist/commonjs/models/components/indexemployeelistrequest.js +0 -70
  124. package/dist/commonjs/models/components/indexemployeelistrequest.js.map +0 -1
  125. package/dist/commonjs/react-query/clientAdminSearchQuery.d.ts +0 -23
  126. package/dist/commonjs/react-query/clientAdminSearchQuery.d.ts.map +0 -1
  127. package/dist/commonjs/react-query/clientAdminSearchQuery.js.map +0 -1
  128. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -23
  129. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  130. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.js +0 -51
  131. package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  132. package/dist/commonjs/sdk/admin.d.ts +0 -7
  133. package/dist/commonjs/sdk/admin.d.ts.map +0 -1
  134. package/dist/commonjs/sdk/admin.js +0 -15
  135. package/dist/commonjs/sdk/admin.js.map +0 -1
  136. package/dist/commonjs/sdk/adminsearch.d.ts +0 -12
  137. package/dist/commonjs/sdk/adminsearch.d.ts.map +0 -1
  138. package/dist/commonjs/sdk/adminsearch.js +0 -22
  139. package/dist/commonjs/sdk/adminsearch.js.map +0 -1
  140. package/dist/commonjs/sdk/indexingpeople.d.ts +0 -76
  141. package/dist/commonjs/sdk/indexingpeople.d.ts.map +0 -1
  142. package/dist/commonjs/sdk/indexingpeople.js +0 -110
  143. package/dist/commonjs/sdk/indexingpeople.js.map +0 -1
  144. package/dist/esm/funcs/clientAdminSearchQuery.d.ts.map +0 -1
  145. package/dist/esm/funcs/clientAdminSearchQuery.js.map +0 -1
  146. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -16
  147. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  148. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.js +0 -77
  149. package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  150. package/dist/esm/models/components/indexemployeelistrequest.d.ts +0 -36
  151. package/dist/esm/models/components/indexemployeelistrequest.d.ts.map +0 -1
  152. package/dist/esm/models/components/indexemployeelistrequest.js +0 -32
  153. package/dist/esm/models/components/indexemployeelistrequest.js.map +0 -1
  154. package/dist/esm/react-query/clientAdminSearchQuery.d.ts +0 -23
  155. package/dist/esm/react-query/clientAdminSearchQuery.d.ts.map +0 -1
  156. package/dist/esm/react-query/clientAdminSearchQuery.js.map +0 -1
  157. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -23
  158. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
  159. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.js +0 -46
  160. package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
  161. package/dist/esm/sdk/admin.d.ts +0 -7
  162. package/dist/esm/sdk/admin.d.ts.map +0 -1
  163. package/dist/esm/sdk/admin.js +0 -11
  164. package/dist/esm/sdk/admin.js.map +0 -1
  165. package/dist/esm/sdk/adminsearch.d.ts +0 -12
  166. package/dist/esm/sdk/adminsearch.d.ts.map +0 -1
  167. package/dist/esm/sdk/adminsearch.js +0 -18
  168. package/dist/esm/sdk/adminsearch.js.map +0 -1
  169. package/dist/esm/sdk/indexingpeople.d.ts +0 -76
  170. package/dist/esm/sdk/indexingpeople.d.ts.map +0 -1
  171. package/dist/esm/sdk/indexingpeople.js +0 -106
  172. package/dist/esm/sdk/indexingpeople.js.map +0 -1
  173. package/docs/sdks/admin/README.md +0 -6
  174. package/docs/sdks/adminsearch/README.md +0 -520
  175. package/docs/sdks/indexingpeople/README.md +0 -1005
  176. package/src/funcs/peoplePostApiIndexV1Bulkindexemployees.ts +0 -155
  177. package/src/models/components/indexemployeelistrequest.ts +0 -78
  178. package/src/react-query/peoplePostApiIndexV1Bulkindexemployees.ts +0 -92
  179. package/src/sdk/admin.ts +0 -13
  180. package/src/sdk/adminsearch.ts +0 -27
  181. package/src/sdk/indexingpeople.ts +0 -179
@@ -1,155 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { GleanCore } from "../core.js";
7
- import { encodeJSON } from "../lib/encodings.js";
8
- import * as M from "../lib/matchers.js";
9
- import { compactMap } from "../lib/primitives.js";
10
- import { safeParse } from "../lib/schemas.js";
11
- import { RequestOptions } from "../lib/sdks.js";
12
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
- import { pathToFunc } from "../lib/url.js";
14
- import * as components from "../models/components/index.js";
15
- import { GleanError } from "../models/errors/gleanerror.js";
16
- import {
17
- ConnectionError,
18
- InvalidRequestError,
19
- RequestAbortedError,
20
- RequestTimeoutError,
21
- UnexpectedClientError,
22
- } from "../models/errors/httpclienterrors.js";
23
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
- import { APICall, APIPromise } from "../types/async.js";
25
- import { Result } from "../types/fp.js";
26
-
27
- /**
28
- * Bulk index employees
29
- *
30
- * @remarks
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.
32
- */
33
- export function peoplePostApiIndexV1Bulkindexemployees(
34
- client: GleanCore,
35
- request: components.BulkIndexEmployeesRequest,
36
- options?: RequestOptions,
37
- ): APIPromise<
38
- Result<
39
- void,
40
- | GleanError
41
- | SDKValidationError
42
- | UnexpectedClientError
43
- | InvalidRequestError
44
- | RequestAbortedError
45
- | RequestTimeoutError
46
- | ConnectionError
47
- >
48
- > {
49
- return new APIPromise($do(
50
- client,
51
- request,
52
- options,
53
- ));
54
- }
55
-
56
- async function $do(
57
- client: GleanCore,
58
- request: components.BulkIndexEmployeesRequest,
59
- options?: RequestOptions,
60
- ): Promise<
61
- [
62
- Result<
63
- void,
64
- | GleanError
65
- | SDKValidationError
66
- | UnexpectedClientError
67
- | InvalidRequestError
68
- | RequestAbortedError
69
- | RequestTimeoutError
70
- | ConnectionError
71
- >,
72
- APICall,
73
- ]
74
- > {
75
- const parsed = safeParse(
76
- request,
77
- (value) => components.BulkIndexEmployeesRequest$outboundSchema.parse(value),
78
- "Input validation failed",
79
- );
80
- if (!parsed.ok) {
81
- return [parsed, { status: "invalid" }];
82
- }
83
- const payload = parsed.value;
84
- const body = encodeJSON("body", payload, { explode: true });
85
-
86
- const path = pathToFunc("/api/index/v1/bulkindexemployees")();
87
-
88
- const headers = new Headers(compactMap({
89
- "Content-Type": "application/json",
90
- Accept: "*/*",
91
- }));
92
-
93
- const secConfig = await extractSecurity(client._options.bearerAuth);
94
- const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
95
- const requestSecurity = resolveGlobalSecurity(securityInput);
96
-
97
- const context = {
98
- baseURL: options?.serverURL ?? client._baseURL ?? "",
99
- operationID: "post_/api/index/v1/bulkindexemployees",
100
- oAuth2Scopes: [],
101
-
102
- resolvedSecurity: requestSecurity,
103
-
104
- securitySource: client._options.bearerAuth,
105
- retryConfig: options?.retries
106
- || client._options.retryConfig
107
- || { strategy: "none" },
108
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
109
- };
110
-
111
- const requestRes = client._createRequest(context, {
112
- security: requestSecurity,
113
- method: "POST",
114
- baseURL: options?.serverURL,
115
- path: path,
116
- headers: headers,
117
- body: body,
118
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
119
- }, options);
120
- if (!requestRes.ok) {
121
- return [requestRes, { status: "invalid" }];
122
- }
123
- const req = requestRes.value;
124
-
125
- const doResult = await client._do(req, {
126
- context,
127
- errorCodes: ["400", "401", "409", "4XX", "5XX"],
128
- retryConfig: context.retryConfig,
129
- retryCodes: context.retryCodes,
130
- });
131
- if (!doResult.ok) {
132
- return [doResult, { status: "request-error", request: req }];
133
- }
134
- const response = doResult.value;
135
-
136
- const [result] = await M.match<
137
- void,
138
- | GleanError
139
- | SDKValidationError
140
- | UnexpectedClientError
141
- | InvalidRequestError
142
- | RequestAbortedError
143
- | RequestTimeoutError
144
- | ConnectionError
145
- >(
146
- M.nil(200, z.void()),
147
- M.fail([400, 401, 409, "4XX"]),
148
- M.fail("5XX"),
149
- )(response);
150
- if (!result.ok) {
151
- return [result, { status: "complete", request: req, response }];
152
- }
153
-
154
- return [result, { status: "complete", request: req, response }];
155
- }
@@ -1,78 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../../types/fp.js";
8
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
- import {
10
- IndexEmployeeRequest,
11
- IndexEmployeeRequest$inboundSchema,
12
- IndexEmployeeRequest$Outbound,
13
- IndexEmployeeRequest$outboundSchema,
14
- } from "./indexemployeerequest.js";
15
-
16
- /**
17
- * Describes the request body of the /indexemployeelist API call
18
- */
19
- export type IndexEmployeeListRequest = {
20
- /**
21
- * List of employee info and version.
22
- */
23
- employees?: Array<IndexEmployeeRequest> | undefined;
24
- };
25
-
26
- /** @internal */
27
- export const IndexEmployeeListRequest$inboundSchema: z.ZodType<
28
- IndexEmployeeListRequest,
29
- z.ZodTypeDef,
30
- unknown
31
- > = z.object({
32
- employees: z.array(IndexEmployeeRequest$inboundSchema).optional(),
33
- });
34
-
35
- /** @internal */
36
- export type IndexEmployeeListRequest$Outbound = {
37
- employees?: Array<IndexEmployeeRequest$Outbound> | undefined;
38
- };
39
-
40
- /** @internal */
41
- export const IndexEmployeeListRequest$outboundSchema: z.ZodType<
42
- IndexEmployeeListRequest$Outbound,
43
- z.ZodTypeDef,
44
- IndexEmployeeListRequest
45
- > = z.object({
46
- employees: z.array(IndexEmployeeRequest$outboundSchema).optional(),
47
- });
48
-
49
- /**
50
- * @internal
51
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
- */
53
- export namespace IndexEmployeeListRequest$ {
54
- /** @deprecated use `IndexEmployeeListRequest$inboundSchema` instead. */
55
- export const inboundSchema = IndexEmployeeListRequest$inboundSchema;
56
- /** @deprecated use `IndexEmployeeListRequest$outboundSchema` instead. */
57
- export const outboundSchema = IndexEmployeeListRequest$outboundSchema;
58
- /** @deprecated use `IndexEmployeeListRequest$Outbound` instead. */
59
- export type Outbound = IndexEmployeeListRequest$Outbound;
60
- }
61
-
62
- export function indexEmployeeListRequestToJSON(
63
- indexEmployeeListRequest: IndexEmployeeListRequest,
64
- ): string {
65
- return JSON.stringify(
66
- IndexEmployeeListRequest$outboundSchema.parse(indexEmployeeListRequest),
67
- );
68
- }
69
-
70
- export function indexEmployeeListRequestFromJSON(
71
- jsonString: string,
72
- ): SafeParseResult<IndexEmployeeListRequest, SDKValidationError> {
73
- return safeParse(
74
- jsonString,
75
- (x) => IndexEmployeeListRequest$inboundSchema.parse(JSON.parse(x)),
76
- `Failed to parse 'IndexEmployeeListRequest' from JSON`,
77
- );
78
- }
@@ -1,92 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import {
6
- MutationKey,
7
- useMutation,
8
- UseMutationResult,
9
- } from "@tanstack/react-query";
10
- import { GleanCore } from "../core.js";
11
- import { peoplePostApiIndexV1Bulkindexemployees } from "../funcs/peoplePostApiIndexV1Bulkindexemployees.js";
12
- import { combineSignals } from "../lib/primitives.js";
13
- import { RequestOptions } from "../lib/sdks.js";
14
- import * as components from "../models/components/index.js";
15
- import { unwrapAsync } from "../types/fp.js";
16
- import { useGleanContext } from "./_context.js";
17
- import { MutationHookOptions } from "./_types.js";
18
-
19
- export type PeoplePostApiIndexV1BulkindexemployeesMutationVariables = {
20
- request: components.BulkIndexEmployeesRequest;
21
- options?: RequestOptions;
22
- };
23
-
24
- export type PeoplePostApiIndexV1BulkindexemployeesMutationData = void;
25
-
26
- /**
27
- * Bulk index employees
28
- *
29
- * @remarks
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.
31
- */
32
- export function usePeoplePostApiIndexV1BulkindexemployeesMutation(
33
- options?: MutationHookOptions<
34
- PeoplePostApiIndexV1BulkindexemployeesMutationData,
35
- Error,
36
- PeoplePostApiIndexV1BulkindexemployeesMutationVariables
37
- >,
38
- ): UseMutationResult<
39
- PeoplePostApiIndexV1BulkindexemployeesMutationData,
40
- Error,
41
- PeoplePostApiIndexV1BulkindexemployeesMutationVariables
42
- > {
43
- const client = useGleanContext();
44
- return useMutation({
45
- ...buildPeoplePostApiIndexV1BulkindexemployeesMutation(client, options),
46
- ...options,
47
- });
48
- }
49
-
50
- export function mutationKeyPeoplePostApiIndexV1Bulkindexemployees(): MutationKey {
51
- return [
52
- "@gleanwork/api-client",
53
- "People",
54
- "postApiIndexV1Bulkindexemployees",
55
- ];
56
- }
57
-
58
- export function buildPeoplePostApiIndexV1BulkindexemployeesMutation(
59
- client$: GleanCore,
60
- hookOptions?: RequestOptions,
61
- ): {
62
- mutationKey: MutationKey;
63
- mutationFn: (
64
- variables: PeoplePostApiIndexV1BulkindexemployeesMutationVariables,
65
- ) => Promise<PeoplePostApiIndexV1BulkindexemployeesMutationData>;
66
- } {
67
- return {
68
- mutationKey: mutationKeyPeoplePostApiIndexV1Bulkindexemployees(),
69
- mutationFn: function peoplePostApiIndexV1BulkindexemployeesMutationFn({
70
- request,
71
- options,
72
- }): Promise<PeoplePostApiIndexV1BulkindexemployeesMutationData> {
73
- const mergedOptions = {
74
- ...hookOptions,
75
- ...options,
76
- fetchOptions: {
77
- ...hookOptions?.fetchOptions,
78
- ...options?.fetchOptions,
79
- signal: combineSignals(
80
- hookOptions?.fetchOptions?.signal,
81
- options?.fetchOptions?.signal,
82
- ),
83
- },
84
- };
85
- return unwrapAsync(peoplePostApiIndexV1Bulkindexemployees(
86
- client$,
87
- request,
88
- mergedOptions,
89
- ));
90
- },
91
- };
92
- }
package/src/sdk/admin.ts DELETED
@@ -1,13 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { ClientSDK } from "../lib/sdks.js";
6
- import { AdminSearch } from "./adminsearch.js";
7
-
8
- export class Admin extends ClientSDK {
9
- private _search?: AdminSearch;
10
- get search(): AdminSearch {
11
- return (this._search ??= new AdminSearch(this._options));
12
- }
13
- }
@@ -1,27 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { clientAdminSearchQuery } from "../funcs/clientAdminSearchQuery.js";
6
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
- import * as components from "../models/components/index.js";
8
- import { unwrapAsync } from "../types/fp.js";
9
-
10
- export class AdminSearch extends ClientSDK {
11
- /**
12
- * Search the index (admin)
13
- *
14
- * @remarks
15
- * Retrieves results for search query without respect for permissions. This is available only to privileged users.
16
- */
17
- async query(
18
- request?: components.SearchRequest | undefined,
19
- options?: RequestOptions,
20
- ): Promise<components.SearchResponse> {
21
- return unwrapAsync(clientAdminSearchQuery(
22
- this,
23
- request,
24
- options,
25
- ));
26
- }
27
- }
@@ -1,179 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
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";
14
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
15
- import * as components from "../models/components/index.js";
16
- import { unwrapAsync } from "../types/fp.js";
17
-
18
- export class IndexingPeople 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
-
78
- /**
79
- * Bulk index employees
80
- *
81
- * @remarks
82
- * Bulk upload details of all the employees. This deletes all employees uploaded in the prior batch. SOON TO BE DEPRECATED in favor of /bulkindexemployees.
83
- *
84
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
85
- */
86
- async bulkIndex(
87
- request: components.IndexEmployeeListRequest,
88
- options?: RequestOptions,
89
- ): Promise<void> {
90
- return unwrapAsync(indexingPeopleBulkIndex(
91
- this,
92
- request,
93
- options,
94
- ));
95
- }
96
-
97
- /**
98
- * Schedules the processing of uploaded employees and teams
99
- *
100
- * @remarks
101
- * 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.
102
- */
103
- async processAllEmployeesAndTeams(
104
- options?: RequestOptions,
105
- ): Promise<void> {
106
- return unwrapAsync(indexingPeopleProcessAllEmployeesAndTeams(
107
- this,
108
- options,
109
- ));
110
- }
111
-
112
- /**
113
- * Delete employee
114
- *
115
- * @remarks
116
- * Delete an employee. Silently succeeds if employee is not present.
117
- */
118
- async delete(
119
- request: components.DeleteEmployeeRequest,
120
- options?: RequestOptions,
121
- ): Promise<void> {
122
- return unwrapAsync(indexingPeopleDelete(
123
- this,
124
- request,
125
- options,
126
- ));
127
- }
128
-
129
- /**
130
- * Index team
131
- *
132
- * @remarks
133
- * Adds a team or updates information about a team
134
- */
135
- async indexTeam(
136
- request: components.IndexTeamRequest,
137
- options?: RequestOptions,
138
- ): Promise<void> {
139
- return unwrapAsync(indexingPeopleIndexTeam(
140
- this,
141
- request,
142
- options,
143
- ));
144
- }
145
-
146
- /**
147
- * Delete team
148
- *
149
- * @remarks
150
- * Delete a team based on provided id.
151
- */
152
- async deleteTeam(
153
- request: components.DeleteTeamRequest,
154
- options?: RequestOptions,
155
- ): Promise<void> {
156
- return unwrapAsync(indexingPeopleDeleteTeam(
157
- this,
158
- request,
159
- options,
160
- ));
161
- }
162
-
163
- /**
164
- * Bulk index teams
165
- *
166
- * @remarks
167
- * 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.
168
- */
169
- async bulkIndexTeams(
170
- request: components.BulkIndexTeamsRequest,
171
- options?: RequestOptions,
172
- ): Promise<void> {
173
- return unwrapAsync(indexingPeopleBulkIndexTeams(
174
- this,
175
- request,
176
- options,
177
- ));
178
- }
179
- }